Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset_IsConstruct ¶
func Asset_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func NewAsset_Override ¶
func NewAsset_Override(a Asset, scope constructs.Construct, id *string, props *AssetProps)
Experimental.
Types ¶
type Asset ¶
type Asset interface { constructs.Construct awscdk.IAsset AssetHash() *string AssetPath() *string Bucket() awss3.IBucket HttpUrl() *string IsFile() *bool IsZipArchive() *bool Node() constructs.Node S3BucketName() *string S3ObjectKey() *string S3ObjectUrl() *string S3Url() *string SourceHash() *string AddResourceMetadata(resource awscdk.CfnResource, resourceProperty *string) GrantRead(grantee awsiam.IGrantable) ToString() *string }
An asset represents a local file or directory, which is automatically uploaded to S3 and then can be referenced within a CDK application. Experimental.
func NewAsset ¶
func NewAsset(scope constructs.Construct, id *string, props *AssetProps) Asset
Experimental.
type AssetOptions ¶
type AssetOptions struct { // Glob patterns to exclude from the copy. // Experimental. Exclude *[]*string `json:"exclude"` // A strategy for how to handle symlinks. // Deprecated: use `followSymlinks` instead Follow assets.FollowMode `json:"follow"` // The ignore behavior to use for exclude patterns. // Experimental. IgnoreMode awscdk.IgnoreMode `json:"ignoreMode"` // A strategy for how to handle symlinks. // Experimental. FollowSymlinks awscdk.SymlinkFollowMode `json:"followSymlinks"` // Specify a custom hash for this asset. // // If `assetHashType` is set it must // be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will // be SHA256 hashed and encoded as hex. The resulting hash will be the asset // hash. // // NOTE: the hash is used in order to identify a specific revision of the asset, and // used for optimizing and caching deployment activities related to this asset such as // packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will // need to make sure it is updated every time the asset changes, or otherwise it is // possible that some deployments will not be invalidated. // Experimental. AssetHash *string `json:"assetHash"` // Specifies the type of hash to calculate for this asset. // // If `assetHash` is configured, this option must be `undefined` or // `AssetHashType.CUSTOM`. // Experimental. AssetHashType awscdk.AssetHashType `json:"assetHashType"` // Bundle the asset by executing a command in a Docker container or a custom bundling provider. // // The asset path will be mounted at `/asset-input`. The Docker // container is responsible for putting content at `/asset-output`. // The content at `/asset-output` will be zipped and used as the // final asset. // Experimental. Bundling *awscdk.BundlingOptions `json:"bundling"` // A list of principals that should be able to read this asset from S3. // // You can use `asset.grantRead(principal)` to grant read permissions later. // Experimental. Readers *[]awsiam.IGrantable `json:"readers"` // Custom hash to use when identifying the specific version of the asset. // // For consistency, // this custom hash will be SHA256 hashed and encoded as hex. The resulting hash will be // the asset hash. // // NOTE: the source hash is used in order to identify a specific revision of the asset, // and used for optimizing and caching deployment activities related to this asset such as // packaging, uploading to Amazon S3, etc. If you chose to customize the source hash, // you will need to make sure it is updated every time the source changes, or otherwise // it is possible that some deployments will not be invalidated. // Deprecated: see `assetHash` and `assetHashType` SourceHash *string `json:"sourceHash"` }
Experimental.
type AssetProps ¶
type AssetProps struct { // Glob patterns to exclude from the copy. // Experimental. Exclude *[]*string `json:"exclude"` // A strategy for how to handle symlinks. // Deprecated: use `followSymlinks` instead Follow assets.FollowMode `json:"follow"` // The ignore behavior to use for exclude patterns. // Experimental. IgnoreMode awscdk.IgnoreMode `json:"ignoreMode"` // A strategy for how to handle symlinks. // Experimental. FollowSymlinks awscdk.SymlinkFollowMode `json:"followSymlinks"` // Specify a custom hash for this asset. // // If `assetHashType` is set it must // be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will // be SHA256 hashed and encoded as hex. The resulting hash will be the asset // hash. // // NOTE: the hash is used in order to identify a specific revision of the asset, and // used for optimizing and caching deployment activities related to this asset such as // packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will // need to make sure it is updated every time the asset changes, or otherwise it is // possible that some deployments will not be invalidated. // Experimental. AssetHash *string `json:"assetHash"` // Specifies the type of hash to calculate for this asset. // // If `assetHash` is configured, this option must be `undefined` or // `AssetHashType.CUSTOM`. // Experimental. AssetHashType awscdk.AssetHashType `json:"assetHashType"` // Bundle the asset by executing a command in a Docker container or a custom bundling provider. // // The asset path will be mounted at `/asset-input`. The Docker // container is responsible for putting content at `/asset-output`. // The content at `/asset-output` will be zipped and used as the // final asset. // Experimental. Bundling *awscdk.BundlingOptions `json:"bundling"` // A list of principals that should be able to read this asset from S3. // // You can use `asset.grantRead(principal)` to grant read permissions later. // Experimental. Readers *[]awsiam.IGrantable `json:"readers"` // Custom hash to use when identifying the specific version of the asset. // // For consistency, // this custom hash will be SHA256 hashed and encoded as hex. The resulting hash will be // the asset hash. // // NOTE: the source hash is used in order to identify a specific revision of the asset, // and used for optimizing and caching deployment activities related to this asset such as // packaging, uploading to Amazon S3, etc. If you chose to customize the source hash, // you will need to make sure it is updated every time the source changes, or otherwise // it is possible that some deployments will not be invalidated. // Deprecated: see `assetHash` and `assetHashType` SourceHash *string `json:"sourceHash"` // The disk location of the asset. // // The path should refer to one of the following: // - A regular file or a .zip file, in which case the file will be uploaded as-is to S3. // - A directory, in which case it will be archived into a .zip file and uploaded to S3. // Experimental. Path *string `json:"path"` }
Experimental.
Click to show internal directories.
Click to hide internal directories.