io.github.cdklabs.cdk.ecr.deployment.ECRDeployment Maven / Gradle / Ivy
Show all versions of cdk-ecr-deployment Show documentation
package io.github.cdklabs.cdk.ecr.deployment;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-06T18:17:25.173Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.ecr.deployment.$Module.class, fqn = "cdk-ecr-deployment.ECRDeployment")
public class ECRDeployment extends software.constructs.Construct {
protected ECRDeployment(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected ECRDeployment(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public ECRDeployment(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.ecr.deployment.ECRDeploymentProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* @param statement This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.AddToPrincipalPolicyResult addToPrincipalPolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.PolicyStatement statement) {
return software.amazon.jsii.Kernel.call(this, "addToPrincipalPolicy", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.AddToPrincipalPolicyResult.class), new Object[] { java.util.Objects.requireNonNull(statement, "statement is required") });
}
/**
* A fluent builder for {@link io.github.cdklabs.cdk.ecr.deployment.ECRDeployment}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final io.github.cdklabs.cdk.ecr.deployment.ECRDeploymentProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.cdklabs.cdk.ecr.deployment.ECRDeploymentProps.Builder();
}
/**
* The destination of the docker image.
*
* @return {@code this}
* @param dest The destination of the docker image. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dest(final io.github.cdklabs.cdk.ecr.deployment.IImageName dest) {
this.props.dest(dest);
return this;
}
/**
* The source of the docker image.
*
* @return {@code this}
* @param src The source of the docker image. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder src(final io.github.cdklabs.cdk.ecr.deployment.IImageName src) {
this.props.src(src);
return this;
}
/**
* 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.
*
* Default: - public.ecr.aws/sam/build-go1.x:latest
*
* @return {@code this}
* @param buildImage Image to use to build Golang lambda for custom resource, if download fails or is not wanted. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder buildImage(final java.lang.String buildImage) {
this.props.buildImage(buildImage);
return this;
}
/**
* The environment variable to set.
*
* @return {@code this}
* @param environment The environment variable to set. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder environment(final java.util.Map environment) {
this.props.environment(environment);
return this;
}
/**
* The name of the lambda handler.
*
* Default: - bootstrap
*
* @return {@code this}
* @param lambdaHandler The name of the lambda handler. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lambdaHandler(final java.lang.String lambdaHandler) {
this.props.lambdaHandler(lambdaHandler);
return this;
}
/**
* The lambda function runtime environment.
*
* Default: - lambda.Runtime.PROVIDED_AL2023
*
* @return {@code this}
* @param lambdaRuntime The lambda function runtime environment. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lambdaRuntime(final software.amazon.awscdk.services.lambda.Runtime lambdaRuntime) {
this.props.lambdaRuntime(lambdaRuntime);
return this;
}
/**
* 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.
*
* Default: - 512
*
* @return {@code this}
* @param memoryLimit 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. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder memoryLimit(final java.lang.Number memoryLimit) {
this.props.memoryLimit(memoryLimit);
return this;
}
/**
* Execution role associated with this function.
*
* Default: - A role is automatically created
*
* @return {@code this}
* @param role Execution role associated with this function. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder role(final software.amazon.awscdk.services.iam.IRole role) {
this.props.role(role);
return this;
}
/**
* The list of security groups to associate with the Lambda's network interfaces.
*
* Only used if 'vpc' is supplied.
*
* 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.
*
* @return {@code this}
* @param securityGroups The list of security groups to associate with the Lambda's network interfaces. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder securityGroups(final java.util.List extends software.amazon.awscdk.services.ec2.SecurityGroup> securityGroups) {
this.props.securityGroups(securityGroups);
return this;
}
/**
* The VPC network to place the deployment lambda handler in.
*
* Default: - None
*
* @return {@code this}
* @param vpc The VPC network to place the deployment lambda handler in. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpc(final software.amazon.awscdk.services.ec2.IVpc vpc) {
this.props.vpc(vpc);
return this;
}
/**
* Where in the VPC to place the deployment lambda handler.
*
* Only used if 'vpc' is supplied.
*
* Default: - the Vpc default strategy if not specified
*
* @return {@code this}
* @param vpcSubnets Where in the VPC to place the deployment lambda handler. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcSubnets(final software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets) {
this.props.vpcSubnets(vpcSubnets);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdk.ecr.deployment.ECRDeployment}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.cdklabs.cdk.ecr.deployment.ECRDeployment build() {
return new io.github.cdklabs.cdk.ecr.deployment.ECRDeployment(
this.scope,
this.id,
this.props.build()
);
}
}
}