Interface ClusterProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ClusterProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:01.041Z")
@Stability(Stable)
public interface ClusterProps
extends software.amazon.jsii.JsiiSerializable
The properties used to define an ECS cluster.
Example:
IVpc vpc = Vpc.fromLookup(this, "Vpc", VpcLookupOptions.builder() .isDefault(true) .build()); Cluster cluster = Cluster.Builder.create(this, "ECSCluster").vpc(vpc).build(); TaskDefinition taskDefinition = TaskDefinition.Builder.create(this, "TD") .compatibility(Compatibility.FARGATE) .cpu("256") .memoryMiB("512") .build(); taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder() .image(ContainerImage.fromRegistry("foo/bar")) .build()); EcsRunTask runTask = EcsRunTask.Builder.create(this, "Run") .integrationPattern(IntegrationPattern.RUN_JOB) .cluster(cluster) .taskDefinition(taskDefinition) .launchTarget(new EcsFargateLaunchTarget()) .cpu("1024") .memoryMiB("1048") .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forClusterProps
static final class
An implementation forClusterProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterProps.Builder
builder()
default AddCapacityOptions
The ec2 capacity to add to the cluster.default String
The name for the cluster.default Boolean
If true CloudWatch Container Insights will be enabled for the cluster.default CloudMapNamespaceOptions
The service discovery namespace created in this cluster.default Boolean
Whether to enable Fargate Capacity Providers.default ExecuteCommandConfiguration
The execute command configuration for the cluster.default ManagedStorageConfiguration
Encryption configuration for ECS Managed storage.default IVpc
getVpc()
The VPC where your ECS instances will be running or your ENIs will be deployed.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCapacity
The ec2 capacity to add to the cluster.Default: - no EC2 capacity will be added, you can use `addCapacity` to add capacity later.
-
getClusterName
The name for the cluster.Default: CloudFormation-generated name
-
getContainerInsights
If true CloudWatch Container Insights will be enabled for the cluster.Default: - Container Insights will be disabled for this cluster.
-
getDefaultCloudMapNamespace
The service discovery namespace created in this cluster.Default: - no service discovery namespace created, you can use `addDefaultCloudMapNamespace` to add a default service discovery namespace later.
-
getEnableFargateCapacityProviders
Whether to enable Fargate Capacity Providers.Default: false
-
getExecuteCommandConfiguration
The execute command configuration for the cluster.Default: - no configuration will be provided.
-
getManagedStorageConfiguration
Encryption configuration for ECS Managed storage.Default: - no encryption will be applied.
-
getVpc
The VPC where your ECS instances will be running or your ENIs will be deployed.Default: - creates a new VPC with two AZs
-
builder
- Returns:
- a
ClusterProps.Builder
ofClusterProps
-