Table of Contents

Interface IFileAssetLocation

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

The location of the published file asset.

public interface IFileAssetLocation

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;
             var fileAssetLocation = new FileAssetLocation {
                 BucketName = "bucketName",
                 HttpUrl = "httpUrl",
                 ObjectKey = "objectKey",
                 S3ObjectUrl = "s3ObjectUrl",

                 // the properties below are optional
                 KmsKeyArn = "kmsKeyArn",
                 S3ObjectUrlWithPlaceholders = "s3ObjectUrlWithPlaceholders",
                 S3Url = "s3Url"
             };

Remarks

This is where the asset can be consumed at runtime.

ExampleMetadata: fixture=_generated

Properties

BucketName

The name of the Amazon S3 bucket.

string BucketName { get; }

Property Value

string

HttpUrl

The HTTP URL of this asset on Amazon S3.

string HttpUrl { get; }

Property Value

string

Remarks

This value suitable for inclusion in a CloudFormation template, and may be an encoded token.

Example value: https://s3-us-east-1.amazonaws.com/mybucket/myobject

KmsKeyArn

The ARN of the KMS key used to encrypt the file asset bucket, if any.

string? KmsKeyArn { get; }

Property Value

string

Remarks

The CDK bootstrap stack comes with a key policy that does not require setting this property, so you only need to set this property if you have customized the bootstrap stack to require it.

Default: - Asset bucket is not encrypted, or decryption permissions are defined by a Key Policy.

ObjectKey

The Amazon S3 object key.

string ObjectKey { get; }

Property Value

string

S3ObjectUrl

The S3 URL of this asset on Amazon S3.

string S3ObjectUrl { get; }

Property Value

string

Remarks

This value suitable for inclusion in a CloudFormation template, and may be an encoded token.

Example value: s3://mybucket/myobject

S3ObjectUrlWithPlaceholders

Like s3ObjectUrl, but not suitable for CloudFormation consumption.

string? S3ObjectUrlWithPlaceholders { get; }

Property Value

string

Remarks

If there are placeholders in the S3 URL, they will be returned unreplaced and un-evaluated.

Default: - This feature cannot be used

S3Url

(deprecated) The HTTP URL of this asset on Amazon S3.

[Obsolete("use `httpUrl`")]
string? S3Url { get; }

Property Value

string

Remarks

Default: - value specified in httpUrl is used.

Stability: Deprecated