Skip to content

Latest commit

 

History

History
311 lines (184 loc) · 10.9 KB

API.md

File metadata and controls

311 lines (184 loc) · 10.9 KB

API Reference

Constructs

KubectlV29Layer

A CDK Asset construct that contains kubectl and helm.

Initializers

import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'

new KubectlV29Layer(scope: Construct, id: string)
Name Type Description
scope constructs.Construct No description.
id string No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

Methods

Name Description
toString Returns a string representation of this construct.
applyRemovalPolicy Apply the given removal policy to this resource.
addPermission Add permission for this layer version to specific entities.

toString
public toString(): string

Returns a string representation of this construct.

applyRemovalPolicy
public applyRemovalPolicy(policy: RemovalPolicy): void

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

policyRequired
  • Type: aws-cdk-lib.RemovalPolicy

addPermission
public addPermission(id: string, permission: LayerVersionPermission): void

Add permission for this layer version to specific entities.

Usage within 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 lambda:GetLayerVersion permission on the layer version.

idRequired
  • Type: string

permissionRequired
  • Type: aws-cdk-lib.aws_lambda.LayerVersionPermission

Static Functions

Name Description
isConstruct Checks if x is a construct.
isOwnedResource Returns true if the construct was created by CDK, and false otherwise.
isResource Check whether the given construct is a Resource.
fromLayerVersionArn Imports a layer version by ARN.
fromLayerVersionAttributes Imports a Layer that has been defined externally.

isConstruct
import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'

KubectlV29Layer.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


isOwnedResource
import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'

KubectlV29Layer.isOwnedResource(construct: IConstruct)

Returns true if the construct was created by CDK, and false otherwise.

constructRequired
  • Type: constructs.IConstruct

isResource
import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'

KubectlV29Layer.isResource(construct: IConstruct)

Check whether the given construct is a Resource.

constructRequired
  • Type: constructs.IConstruct

fromLayerVersionArn
import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'

KubectlV29Layer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string)

Imports a layer version by ARN.

Assumes it is compatible with all Lambda runtimes.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

layerVersionArnRequired
  • Type: string

fromLayerVersionAttributes
import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29'

KubectlV29Layer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes)

Imports a Layer that has been defined externally.

scopeRequired
  • Type: constructs.Construct

the parent Construct that will use the imported layer.


idRequired
  • Type: string

the id of the imported layer in the construct tree.


attrsRequired
  • Type: aws-cdk-lib.aws_lambda.LayerVersionAttributes

the properties of the imported layer.


Properties

Name Type Description
node constructs.Node The tree node.
env aws-cdk-lib.ResourceEnvironment The environment this resource belongs to.
stack aws-cdk-lib.Stack The stack in which this resource is defined.
layerVersionArn string The ARN of the Lambda Layer version that this Layer defines.
compatibleRuntimes aws-cdk-lib.aws_lambda.Runtime[] The runtimes compatible with this Layer.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


envRequired
public readonly env: ResourceEnvironment;
  • Type: aws-cdk-lib.ResourceEnvironment

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.


stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The stack in which this resource is defined.


layerVersionArnRequired
public readonly layerVersionArn: string;
  • Type: string

The ARN of the Lambda Layer version that this Layer defines.


compatibleRuntimesOptional
public readonly compatibleRuntimes: Runtime[];
  • Type: aws-cdk-lib.aws_lambda.Runtime[]

The runtimes compatible with this Layer.