Class ClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.ClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClusterProps>
- Enclosing interface:
ClusterProps
@Stability(Stable)
public static final class ClusterProps.Builder
extends Object
implements software.amazon.jsii.Builder<ClusterProps>
A builder for
ClusterProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.capacity(AddCapacityOptions capacity) Sets the value ofClusterProps.getCapacity()clusterName(String clusterName) Sets the value ofClusterProps.getClusterName()containerInsights(Boolean containerInsights) Deprecated.containerInsightsV2(ContainerInsights containerInsightsV2) Sets the value ofClusterProps.getContainerInsightsV2()defaultCloudMapNamespace(CloudMapNamespaceOptions defaultCloudMapNamespace) Sets the value ofClusterProps.getDefaultCloudMapNamespace()enableFargateCapacityProviders(Boolean enableFargateCapacityProviders) Sets the value ofClusterProps.getEnableFargateCapacityProviders()executeCommandConfiguration(ExecuteCommandConfiguration executeCommandConfiguration) Sets the value ofClusterProps.getExecuteCommandConfiguration()managedStorageConfiguration(ManagedStorageConfiguration managedStorageConfiguration) Sets the value ofClusterProps.getManagedStorageConfiguration()Sets the value ofClusterProps.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
capacity
Sets the value ofClusterProps.getCapacity()- Parameters:
capacity- The ec2 capacity to add to the cluster.- Returns:
this
-
clusterName
Sets the value ofClusterProps.getClusterName()- Parameters:
clusterName- The name for the cluster.- Returns:
this
-
containerInsights
@Stability(Deprecated) @Deprecated public ClusterProps.Builder containerInsights(Boolean containerInsights) Deprecated.SeecontainerInsightsV2Sets the value ofClusterProps.getContainerInsights()- Parameters:
containerInsights- If true CloudWatch Container Insights will be enabled for the cluster.- Returns:
this
-
containerInsightsV2
@Stability(Stable) public ClusterProps.Builder containerInsightsV2(ContainerInsights containerInsightsV2) Sets the value ofClusterProps.getContainerInsightsV2()- Parameters:
containerInsightsV2- The CloudWatch Container Insights configuration for the cluster.- Returns:
this
-
defaultCloudMapNamespace
@Stability(Stable) public ClusterProps.Builder defaultCloudMapNamespace(CloudMapNamespaceOptions defaultCloudMapNamespace) Sets the value ofClusterProps.getDefaultCloudMapNamespace()- Parameters:
defaultCloudMapNamespace- The service discovery namespace created in this cluster.- Returns:
this
-
enableFargateCapacityProviders
@Stability(Stable) public ClusterProps.Builder enableFargateCapacityProviders(Boolean enableFargateCapacityProviders) Sets the value ofClusterProps.getEnableFargateCapacityProviders()- Parameters:
enableFargateCapacityProviders- Whether to enable Fargate Capacity Providers.- Returns:
this
-
executeCommandConfiguration
@Stability(Stable) public ClusterProps.Builder executeCommandConfiguration(ExecuteCommandConfiguration executeCommandConfiguration) Sets the value ofClusterProps.getExecuteCommandConfiguration()- Parameters:
executeCommandConfiguration- The execute command configuration for the cluster.- Returns:
this
-
managedStorageConfiguration
@Stability(Stable) public ClusterProps.Builder managedStorageConfiguration(ManagedStorageConfiguration managedStorageConfiguration) Sets the value ofClusterProps.getManagedStorageConfiguration()- Parameters:
managedStorageConfiguration- Encryption configuration for ECS Managed storage.- Returns:
this
-
vpc
Sets the value ofClusterProps.getVpc()- Parameters:
vpc- The VPC where your ECS instances will be running or your ENIs will be deployed.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ClusterProps>- Returns:
- a new instance of
ClusterProps - Throws:
NullPointerException- if any required attribute was not provided
-
containerInsightsV2