@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:07.348Z") @Stability(value=Experimental) 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()
(experimental) The ec2 capacity to add to the cluster.
|
default List<String> |
getCapacityProviders()
Deprecated.
Use
ClusterProps.enableFargateCapacityProviders instead. |
default String |
getClusterName()
(experimental) The name for the cluster.
|
default Boolean |
getContainerInsights()
(experimental) If true CloudWatch Container Insights will be enabled for the cluster.
|
default CloudMapNamespaceOptions |
getDefaultCloudMapNamespace()
(experimental) The service discovery namespace created in this cluster.
|
default Boolean |
getEnableFargateCapacityProviders()
(experimental) Whether to enable Fargate Capacity Providers.
|
default ExecuteCommandConfiguration |
getExecuteCommandConfiguration()
(experimental) The execute command configuration for the cluster.
|
default IVpc |
getVpc()
(experimental) The VPC where your ECS instances will be running or your ENIs will be deployed.
|
@Stability(value=Experimental) @Nullable default AddCapacityOptions getCapacity()
Default: - no EC2 capacity will be added, you can use `addCapacity` to add capacity later.
@Stability(value=Deprecated) @Deprecated @Nullable default List<String> getCapacityProviders()
ClusterProps.enableFargateCapacityProviders instead.Default: - None. Currently only FARGATE and FARGATE_SPOT are supported.
@Stability(value=Experimental) @Nullable default String getClusterName()
Default: CloudFormation-generated name
@Stability(value=Experimental) @Nullable default Boolean getContainerInsights()
Default: - Container Insights will be disabled for this cluser.
@Stability(value=Experimental) @Nullable default CloudMapNamespaceOptions getDefaultCloudMapNamespace()
Default: - no service discovery namespace created, you can use `addDefaultCloudMapNamespace` to add a default service discovery namespace later.
@Stability(value=Experimental) @Nullable default Boolean getEnableFargateCapacityProviders()
Default: false
@Stability(value=Experimental) @Nullable default ExecuteCommandConfiguration getExecuteCommandConfiguration()
Default: - no configuration will be provided.
@Stability(value=Experimental) @Nullable default IVpc getVpc()
Default: - creates a new VPC with two AZs
@Stability(value=Experimental) static ClusterProps.Builder builder()
ClusterProps.Builder of ClusterPropsCopyright © 2022. All rights reserved.