Skip to content

Latest commit

 

History

History
520 lines (308 loc) · 16.5 KB

API.md

File metadata and controls

520 lines (308 loc) · 16.5 KB

API Reference

Constructs

ECRDeployment

Initializers

import { ECRDeployment } from 'cdk-ecr-deployment'

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

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
addToPrincipalPolicy No description.

toString
public toString(): string

Returns a string representation of this construct.

addToPrincipalPolicy
public addToPrincipalPolicy(statement: PolicyStatement): AddToPrincipalPolicyResult
statementRequired
  • Type: aws-cdk-lib.aws_iam.PolicyStatement

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { ECRDeployment } from 'cdk-ecr-deployment'

ECRDeployment.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

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

The tree node.


Structs

ECRDeploymentProps

Initializer

import { ECRDeploymentProps } from 'cdk-ecr-deployment'

const eCRDeploymentProps: ECRDeploymentProps = { ... }

Properties

Name Type Description
dest IImageName The destination of the docker image.
src IImageName The source of the docker image.
buildImage string Image to use to build Golang lambda for custom resource, if download fails or is not wanted.
environment {[ key: string ]: string} The environment variable to set.
imageArch string[] The image architecture to be copied.
lambdaHandler string The name of the lambda handler.
lambdaRuntime aws-cdk-lib.aws_lambda.Runtime The lambda function runtime environment.
memoryLimit number The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket.
role aws-cdk-lib.aws_iam.IRole Execution role associated with this function.
securityGroups aws-cdk-lib.aws_ec2.SecurityGroup[] The list of security groups to associate with the Lambda's network interfaces.
vpc aws-cdk-lib.aws_ec2.IVpc The VPC network to place the deployment lambda handler in.
vpcSubnets aws-cdk-lib.aws_ec2.SubnetSelection Where in the VPC to place the deployment lambda handler.

destRequired
public readonly dest: IImageName;

The destination of the docker image.


srcRequired
public readonly src: IImageName;

The source of the docker image.


buildImageOptional
public readonly buildImage: string;
  • Type: string
  • Default: public.ecr.aws/sam/build-go1.x:latest

Image to use to build Golang lambda for custom resource, if download fails or is not wanted.

Might be needed for local build if all images need to come from own registry.

Note that image should use yum as a package manager and have golang available.


environmentOptional
public readonly environment: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

The environment variable to set.


imageArchOptional
public readonly imageArch: string[];
  • Type: string[]
  • Default: ['amd64']

The image architecture to be copied.

The 'amd64' architecture will be copied by default. Specify the architecture or architectures to copy here.

It is currently not possible to copy more than one architecture at a time: the array you specify must contain exactly one string.


lambdaHandlerOptional
public readonly lambdaHandler: string;
  • Type: string
  • Default: bootstrap

The name of the lambda handler.


lambdaRuntimeOptional
public readonly lambdaRuntime: Runtime;
  • Type: aws-cdk-lib.aws_lambda.Runtime
  • Default: lambda.Runtime.PROVIDED_AL2023

The lambda function runtime environment.


memoryLimitOptional
public readonly memoryLimit: number;
  • Type: number
  • Default: 512

The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket.

If you are deploying large files, you will need to increase this number accordingly.


roleOptional
public readonly role: IRole;
  • Type: aws-cdk-lib.aws_iam.IRole
  • Default: A role is automatically created

Execution role associated with this function.


securityGroupsOptional
public readonly securityGroups: SecurityGroup[];
  • Type: aws-cdk-lib.aws_ec2.SecurityGroup[]
  • Default: If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function.

The list of security groups to associate with the Lambda's network interfaces.

Only used if 'vpc' is supplied.


vpcOptional
public readonly vpc: IVpc;
  • Type: aws-cdk-lib.aws_ec2.IVpc
  • Default: None

The VPC network to place the deployment lambda handler in.


vpcSubnetsOptional
public readonly vpcSubnets: SubnetSelection;
  • Type: aws-cdk-lib.aws_ec2.SubnetSelection
  • Default: the Vpc default strategy if not specified

Where in the VPC to place the deployment lambda handler.

Only used if 'vpc' is supplied.


Classes

DockerImageName

Initializers

import { DockerImageName } from 'cdk-ecr-deployment'

new DockerImageName(name: string, creds?: string)
Name Type Description
name string No description.
creds string The credentials of the docker image.

nameRequired
  • Type: string

credsOptional
  • Type: string

The credentials of the docker image.

Format user:password or AWS Secrets Manager secret arn or AWS Secrets Manager secret name


Properties

Name Type Description
uri string The uri of the docker image.
creds string The credentials of the docker image.

uriRequired
public readonly uri: string;
  • Type: string

The uri of the docker image.

The uri spec follows https://github.com/containers/skopeo


credsOptional
public readonly creds: string;
  • Type: string

The credentials of the docker image.

Format user:password or AWS Secrets Manager secret arn or AWS Secrets Manager secret name


S3ArchiveName

Initializers

import { S3ArchiveName } from 'cdk-ecr-deployment'

new S3ArchiveName(p: string, ref?: string, creds?: string)
Name Type Description
p string No description.
ref string No description.
creds string The credentials of the docker image.

pRequired
  • Type: string

refOptional
  • Type: string

credsOptional
  • Type: string

The credentials of the docker image.

Format user:password or AWS Secrets Manager secret arn or AWS Secrets Manager secret name


Properties

Name Type Description
uri string The uri of the docker image.
creds string The credentials of the docker image.

uriRequired
public readonly uri: string;
  • Type: string

The uri of the docker image.

The uri spec follows https://github.com/containers/skopeo


credsOptional
public readonly creds: string;
  • Type: string

The credentials of the docker image.

Format user:password or AWS Secrets Manager secret arn or AWS Secrets Manager secret name


Protocols

IImageName

Properties

Name Type Description
uri string The uri of the docker image.
creds string The credentials of the docker image.

uriRequired
public readonly uri: string;
  • Type: string

The uri of the docker image.

The uri spec follows https://github.com/containers/skopeo


credsOptional
public readonly creds: string;
  • Type: string

The credentials of the docker image.

Format user:password or AWS Secrets Manager secret arn or AWS Secrets Manager secret name