FileAssetLocation
- class aws_cdk.core.FileAssetLocation(*, bucket_name, http_url, object_key, s3_object_url, kms_key_arn=None, s3_object_url_with_placeholders=None, s3_url=None)
Bases:
object
The location of the published file asset.
This is where the asset can be consumed at runtime.
- Parameters:
bucket_name (
str
) – The name of the Amazon S3 bucket.http_url (
str
) – The HTTP URL of this asset on Amazon S3. 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
object_key (
str
) – The Amazon S3 object key.s3_object_url (
str
) – The S3 URL of this asset on Amazon S3. This value suitable for inclusion in a CloudFormation template, and may be an encoded token. Example value:s3://mybucket/myobject
kms_key_arn (
Optional
[str
]) – The ARN of the KMS key used to encrypt the file asset bucket, if any. 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.s3_object_url_with_placeholders (
Optional
[str
]) – Likes3ObjectUrl
, but not suitable for CloudFormation consumption. If there are placeholders in the S3 URL, they will be returned unreplaced and un-evaluated. Default: - This feature cannot be useds3_url (
Optional
[str
]) – (deprecated) The HTTP URL of this asset on Amazon S3. Default: - value specified inhttpUrl
is used.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.core as cdk file_asset_location = cdk.FileAssetLocation( bucket_name="bucketName", http_url="httpUrl", object_key="objectKey", s3_object_url="s3ObjectUrl", # the properties below are optional kms_key_arn="kmsKeyArn", s3_object_url_with_placeholders="s3ObjectUrlWithPlaceholders", s3_url="s3Url" )
Attributes
- bucket_name
The name of the Amazon S3 bucket.
- http_url
The HTTP URL of this asset on Amazon S3.
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
- kms_key_arn
The ARN of the KMS key used to encrypt the file asset bucket, if any.
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.
- object_key
The Amazon S3 object key.
- s3_object_url
The S3 URL of this asset on Amazon S3.
This value suitable for inclusion in a CloudFormation template, and may be an encoded token.
Example value:
s3://mybucket/myobject
- s3_object_url_with_placeholders
Like
s3ObjectUrl
, but not suitable for CloudFormation consumption.If there are placeholders in the S3 URL, they will be returned unreplaced and un-evaluated.
- Default:
This feature cannot be used
- s3_url
(deprecated) The HTTP URL of this asset on Amazon S3.
- Default:
value specified in
httpUrl
is used.
- Deprecated:
use
httpUrl
- Stability:
deprecated