Documentation ¶
Overview ¶
An Asset construct that contains the AWS CLI, for use in Lambda Layers
An Asset construct that contains the AWS CLI, for use in Lambda Layers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwsCliAsset_IsConstruct ¶
func AwsCliAsset_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func NewAwsCliAsset_Override ¶
func NewAwsCliAsset_Override(a AwsCliAsset, scope constructs.Construct, id *string, options *awss3assets.AssetOptions)
Types ¶
type AwsCliAsset ¶
type AwsCliAsset interface { awss3assets.Asset // A hash of this asset, which is available at construction time. // // As this is a plain string, it // can be used in construct IDs in order to enforce creation of a new resource when the content // hash has changed. AssetHash() *string // The path to the asset, relative to the current Cloud Assembly. // // If asset staging is disabled, this will just be the original path. // If asset staging is enabled it will be the staged path. AssetPath() *string // The S3 bucket in which this asset resides. Bucket() awss3.IBucket // Attribute which represents the S3 HTTP URL of this asset. // // For example, `https://s3.us-west-1.amazonaws.com/bucket/key` HttpUrl() *string // Indicates if this asset is a single file. // // Allows constructs to ensure that the // correct file type was used. IsFile() *bool // Indicates if this asset is a zip archive. // // Allows constructs to ensure that the // correct file type was used. IsZipArchive() *bool // The tree node. Node() constructs.Node // Attribute that represents the name of the bucket this asset exists in. S3BucketName() *string // Attribute which represents the S3 object key of this asset. S3ObjectKey() *string // Attribute which represents the S3 URL of this asset. // // For example, `s3://bucket/key`. S3ObjectUrl() *string // Adds CloudFormation template metadata to the specified resource with information that indicates which resource property is mapped to this local asset. // // This can be used by tools such as SAM CLI to provide local // experience such as local invocation and debugging of Lambda functions. // // Asset metadata will only be included if the stack is synthesized with the // "aws:cdk:enable-asset-metadata" context key defined, which is the default // behavior when synthesizing via the CDK Toolkit. // See: https://github.com/aws/aws-cdk/issues/1432 // AddResourceMetadata(resource awscdk.CfnResource, resourceProperty *string) // Grants read permissions to the principal on the assets bucket. GrantRead(grantee awsiam.IGrantable) // Returns a string representation of this construct. ToString() *string }
A CDK Asset construct that contains the AWS CLI.
func NewAwsCliAsset ¶
func NewAwsCliAsset(scope constructs.Construct, id *string, options *awss3assets.AssetOptions) AwsCliAsset