software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDB Maven / Gradle / Ivy
Show all versions of fargatedynamodb Show documentation
package software.amazon.awsconstructs.services.fargatedynamodb;
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-18T13:39:27.864Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.fargatedynamodb.$Module.class, fqn = "@aws-solutions-constructs/aws-fargate-dynamodb.FargateToDynamoDB")
public class FargateToDynamoDB extends software.constructs.Construct {
protected FargateToDynamoDB(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected FargateToDynamoDB(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
public FargateToDynamoDB(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDBProps 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") });
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.ContainerDefinition getContainer() {
return software.amazon.jsii.Kernel.get(this, "container", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.ContainerDefinition.class));
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.dynamodb.ITable getDynamoTableInterface() {
return software.amazon.jsii.Kernel.get(this, "dynamoTableInterface", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.dynamodb.ITable.class));
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.FargateService getService() {
return software.amazon.jsii.Kernel.get(this, "service", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.FargateService.class));
}
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.IVpc getVpc() {
return software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class));
}
public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.dynamodb.Table getDynamoTable() {
return software.amazon.jsii.Kernel.get(this, "dynamoTable", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.dynamodb.Table.class));
}
/**
* A fluent builder for {@link software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDB}.
*/
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.
*/
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 software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDBProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDBProps.Builder();
}
/**
* Whether the construct is deploying a private or public API.
*
* This has implications for the VPC deployed
* by this construct.
*
* @return {@code this}
* @param publicApi Whether the construct is deploying a private or public API. This parameter is required.
*/
public Builder publicApi(final java.lang.Boolean publicApi) {
this.props.publicApi(publicApi);
return this;
}
/**
* Optional properties to create a new ECS cluster.
*
* @return {@code this}
* @param clusterProps Optional properties to create a new ECS cluster. This parameter is required.
*/
public Builder clusterProps(final software.amazon.awscdk.services.ecs.ClusterProps clusterProps) {
this.props.clusterProps(clusterProps);
return this;
}
/**
* @return {@code this}
* @param containerDefinitionProps This parameter is required.
*/
public Builder containerDefinitionProps(final java.lang.Object containerDefinitionProps) {
this.props.containerDefinitionProps(containerDefinitionProps);
return this;
}
/**
* Optional user provided props to override the default props for DynamoDB Table.
*
* Default: - Default props are used
*
* @return {@code this}
* @param dynamoTableProps Optional user provided props to override the default props for DynamoDB Table. This parameter is required.
*/
public Builder dynamoTableProps(final software.amazon.awscdk.services.dynamodb.TableProps dynamoTableProps) {
this.props.dynamoTableProps(dynamoTableProps);
return this;
}
/**
* The version of the image to use from the repository.
*
* Default: - 'latest'
*
* @return {@code this}
* @param ecrImageVersion The version of the image to use from the repository. This parameter is required.
*/
public Builder ecrImageVersion(final java.lang.String ecrImageVersion) {
this.props.ecrImageVersion(ecrImageVersion);
return this;
}
/**
* The arn of an ECR Repository containing the image to use to generate the containers.
*
* format:
* arn:aws:ecr:[region]:[account number]:repository/[Repository Name]
*
* @return {@code this}
* @param ecrRepositoryArn The arn of an ECR Repository containing the image to use to generate the containers. This parameter is required.
*/
public Builder ecrRepositoryArn(final java.lang.String ecrRepositoryArn) {
this.props.ecrRepositoryArn(ecrRepositoryArn);
return this;
}
/**
* @return {@code this}
* @param existingContainerDefinitionObject This parameter is required.
*/
public Builder existingContainerDefinitionObject(final software.amazon.awscdk.services.ecs.ContainerDefinition existingContainerDefinitionObject) {
this.props.existingContainerDefinitionObject(existingContainerDefinitionObject);
return this;
}
/**
* A Fargate Service already instantiated (probably by another Solutions Construct).
*
* If
* this is specified, then no props defining a new service can be provided, including:
* existingImageObject, ecrImageVersion, containerDefinitionProps, fargateTaskDefinitionProps,
* ecrRepositoryArn, fargateServiceProps, clusterProps, existingClusterInterface. If this value
* is provided, then existingContainerDefinitionObject must be provided as well.
*
* Default: - none
*
* @return {@code this}
* @param existingFargateServiceObject A Fargate Service already instantiated (probably by another Solutions Construct). This parameter is required.
*/
public Builder existingFargateServiceObject(final software.amazon.awscdk.services.ecs.FargateService existingFargateServiceObject) {
this.props.existingFargateServiceObject(existingFargateServiceObject);
return this;
}
/**
* Optional user provided props to override the default props for DynamoDB Table.
*
* Default: - None
*
* @return {@code this}
* @param existingTableInterface Optional user provided props to override the default props for DynamoDB Table. This parameter is required.
*/
public Builder existingTableInterface(final software.amazon.awscdk.services.dynamodb.ITable existingTableInterface) {
this.props.existingTableInterface(existingTableInterface);
return this;
}
/**
* An existing VPC in which to deploy the construct.
*
* Providing both this and
* vpcProps is an error. If the client provides an existing Fargate service,
* this value must be the VPC where the service is running. An DynamoDB Interface
* endpoint will be added to this VPC.
*
* Default: - none
*
* @return {@code this}
* @param existingVpc An existing VPC in which to deploy the construct. This parameter is required.
*/
public Builder existingVpc(final software.amazon.awscdk.services.ec2.IVpc existingVpc) {
this.props.existingVpc(existingVpc);
return this;
}
/**
* Optional values to override default Fargate Task definition properties (fargate-defaults.ts). The construct will default to launching the service is the most isolated subnets available (precedence: Isolated, Private and Public). Override those and other defaults here.
*
* defaults - fargate-defaults.ts
*
* @return {@code this}
* @param fargateServiceProps Optional values to override default Fargate Task definition properties (fargate-defaults.ts). The construct will default to launching the service is the most isolated subnets available (precedence: Isolated, Private and Public). Override those and other defaults here. This parameter is required.
*/
public Builder fargateServiceProps(final java.lang.Object fargateServiceProps) {
this.props.fargateServiceProps(fargateServiceProps);
return this;
}
/**
* @return {@code this}
* @param fargateTaskDefinitionProps This parameter is required.
*/
public Builder fargateTaskDefinitionProps(final java.lang.Object fargateTaskDefinitionProps) {
this.props.fargateTaskDefinitionProps(fargateTaskDefinitionProps);
return this;
}
/**
* Optional Name for the container environment variable set to the ARN for the DynamoDB table.
*
* Default: - DYNAMODB_TABLE_ARN
*
* @return {@code this}
* @param tableArnEnvironmentVariableName Optional Name for the container environment variable set to the ARN for the DynamoDB table. This parameter is required.
*/
public Builder tableArnEnvironmentVariableName(final java.lang.String tableArnEnvironmentVariableName) {
this.props.tableArnEnvironmentVariableName(tableArnEnvironmentVariableName);
return this;
}
/**
* Optional Name for the container environment variable set to the name of the DynamoDB table.
*
* Default: - DYNAMODB_TABLE_NAME
*
* @return {@code this}
* @param tableEnvironmentVariableName Optional Name for the container environment variable set to the name of the DynamoDB table. This parameter is required.
*/
public Builder tableEnvironmentVariableName(final java.lang.String tableEnvironmentVariableName) {
this.props.tableEnvironmentVariableName(tableEnvironmentVariableName);
return this;
}
/**
* Optional table permissions to grant to the Fargate service.
*
* One of the following may be specified: All
, Read
, ReadWrite
, Write
.
*
* Default: - 'ReadWrite'
*
* @return {@code this}
* @param tablePermissions Optional table permissions to grant to the Fargate service. This parameter is required.
*/
public Builder tablePermissions(final java.lang.String tablePermissions) {
this.props.tablePermissions(tablePermissions);
return this;
}
/**
* Optional custom properties for a VPC the construct will create.
*
* This VPC will
* be used by the new Fargate service the construct creates (that's
* why targetGroupProps can't include a VPC). Providing
* both this and existingVpc is an error. An DynamoDB Interface
* endpoint will be included in this VPC.
*
* Default: - none
*
* @return {@code this}
* @param vpcProps Optional custom properties for a VPC the construct will create. This parameter is required.
*/
public Builder vpcProps(final software.amazon.awscdk.services.ec2.VpcProps vpcProps) {
this.props.vpcProps(vpcProps);
return this;
}
/**
* @return a newly built instance of {@link software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDB}.
*/
@Override
public software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDB build() {
return new software.amazon.awsconstructs.services.fargatedynamodb.FargateToDynamoDB(
this.scope,
this.id,
this.props.build()
);
}
}
}