class KubectlLayer (construct)
An AWS Lambda layer that includes kubectl and the AWS CLI.
new KubectlLayer(scope: Construct, id: string, props?: KubectlLayerProps)
|application||The Serverless Application Repository application ID which contains the kubectl layer.|
|version?||The semantic version of the kubectl AWS Lambda Layer SAR app to use.|
(optional, default: The ARN for the
lambda-layer-kubectl SAR app.)
The Serverless Application Repository application ID which contains the kubectl layer.
(optional, default: '2.0.0')
The semantic version of the kubectl AWS Lambda Layer SAR app to use.
|env||The environment this resource belongs to.|
|layer||The ARN of the AWS Lambda layer version.|
|node||The construct tree node associated with this construct.|
|stack||The stack in which this resource is defined.|
|compatible||All runtimes are compatible.|
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
The ARN of the AWS Lambda layer version.
The construct tree node associated with this construct.
The stack in which this resource is defined.
All runtimes are compatible.
|add||Add permission for this layer version to specific entities.|
|to||Returns a string representation of this construct.|
public addPermission(_id: string, _permission: LayerVersionPermission): void
Add permission for this layer version to specific entities.
the same account where the layer is defined is always allowed and does not
require calling this method. Note that the principal that creates the
Lambda function using the layer (for example, a CloudFormation changeset
execution role) also needs to have the
permission on the layer version.
public toString(): string
Returns a string representation of this construct.