@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-22T10:27:17.229Z") @Stability(value=Stable) public interface ClusterProps extends software.amazon.jsii.JsiiSerializable
Example:
Vpc vpc = Vpc.Builder.create(this, "Vpc").maxAzs(1).build();
Cluster cluster = Cluster.Builder.create(this, "EcsCluster").vpc(vpc).build();
SecurityGroup securityGroup = SecurityGroup.Builder.create(this, "SG").vpc(vpc).build();
ScheduledFargateTask scheduledFargateTask = ScheduledFargateTask.Builder.create(this, "ScheduledFargateTask")
.cluster(cluster)
.scheduledFargateTaskImageOptions(ScheduledFargateTaskImageOptions.builder()
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.memoryLimitMiB(512)
.build())
.schedule(Schedule.expression("rate(1 minute)"))
.securityGroups(List.of(securityGroup))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
ClusterProps.Builder
A builder for
ClusterProps |
static class |
ClusterProps.Jsii$Proxy
An implementation for
ClusterProps |
| Modifier and Type | Method and Description |
|---|---|
static ClusterProps.Builder |
builder() |
default AddCapacityOptions |
getCapacity()
The ec2 capacity to add to the cluster.
|
default String |
getClusterName()
The name for the cluster.
|
default Boolean |
getContainerInsights()
If true CloudWatch Container Insights will be enabled for the cluster.
|
default CloudMapNamespaceOptions |
getDefaultCloudMapNamespace()
The service discovery namespace created in this cluster.
|
default Boolean |
getEnableFargateCapacityProviders()
Whether to enable Fargate Capacity Providers.
|
default ExecuteCommandConfiguration |
getExecuteCommandConfiguration()
The execute command configuration for the cluster.
|
default IVpc |
getVpc()
The VPC where your ECS instances will be running or your ENIs will be deployed.
|
@Stability(value=Stable) @Nullable default AddCapacityOptions getCapacity()
Default: - no EC2 capacity will be added, you can use `addCapacity` to add capacity later.
@Stability(value=Stable) @Nullable default String getClusterName()
Default: CloudFormation-generated name
@Stability(value=Stable) @Nullable default Boolean getContainerInsights()
Default: - Container Insights will be disabled for this cluser.
@Stability(value=Stable) @Nullable default CloudMapNamespaceOptions getDefaultCloudMapNamespace()
Default: - no service discovery namespace created, you can use `addDefaultCloudMapNamespace` to add a default service discovery namespace later.
@Stability(value=Stable) @Nullable default Boolean getEnableFargateCapacityProviders()
Default: false
@Stability(value=Stable) @Nullable default ExecuteCommandConfiguration getExecuteCommandConfiguration()
Default: - no configuration will be provided.
@Stability(value=Stable) @Nullable default IVpc getVpc()
Default: - creates a new VPC with two AZs
@Stability(value=Stable) static ClusterProps.Builder builder()
ClusterProps.Builder of ClusterPropsCopyright © 2021. All rights reserved.