Class ClusterAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.ClusterAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClusterAttributes>
- Enclosing interface:
ClusterAttributes
@Stability(Stable)
public static final class ClusterAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<ClusterAttributes>
A builder for
ClusterAttributes-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoscalingGroup(IAutoScalingGroup autoscalingGroup) Sets the value ofClusterAttributes.getAutoscalingGroup()build()Builds the configured instance.clusterArn(String clusterArn) Sets the value ofClusterAttributes.getClusterArn()clusterName(String clusterName) Sets the value ofClusterAttributes.getClusterName()defaultCloudMapNamespace(INamespace defaultCloudMapNamespace) Sets the value ofClusterAttributes.getDefaultCloudMapNamespace()executeCommandConfiguration(ExecuteCommandConfiguration executeCommandConfiguration) Sets the value ofClusterAttributes.getExecuteCommandConfiguration()hasEc2Capacity(Boolean hasEc2Capacity) Sets the value ofClusterAttributes.getHasEc2Capacity()securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofClusterAttributes.getSecurityGroups()Sets the value ofClusterAttributes.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clusterName
Sets the value ofClusterAttributes.getClusterName()- Parameters:
clusterName- The name of the cluster. This parameter is required.- Returns:
this
-
vpc
Sets the value ofClusterAttributes.getVpc()- Parameters:
vpc- The VPC associated with the cluster. This parameter is required.- Returns:
this
-
autoscalingGroup
@Stability(Stable) public ClusterAttributes.Builder autoscalingGroup(IAutoScalingGroup autoscalingGroup) Sets the value ofClusterAttributes.getAutoscalingGroup()- Parameters:
autoscalingGroup- Autoscaling group added to the cluster if capacity is added.- Returns:
this
-
clusterArn
Sets the value ofClusterAttributes.getClusterArn()- Parameters:
clusterArn- The Amazon Resource Name (ARN) that identifies the cluster.- Returns:
this
-
defaultCloudMapNamespace
@Stability(Stable) public ClusterAttributes.Builder defaultCloudMapNamespace(INamespace defaultCloudMapNamespace) Sets the value ofClusterAttributes.getDefaultCloudMapNamespace()- Parameters:
defaultCloudMapNamespace- The AWS Cloud Map namespace to associate with the cluster.- Returns:
this
-
executeCommandConfiguration
@Stability(Stable) public ClusterAttributes.Builder executeCommandConfiguration(ExecuteCommandConfiguration executeCommandConfiguration) Sets the value ofClusterAttributes.getExecuteCommandConfiguration()- Parameters:
executeCommandConfiguration- The execute command configuration for the cluster.- Returns:
this
-
hasEc2Capacity
Sets the value ofClusterAttributes.getHasEc2Capacity()- Parameters:
hasEc2Capacity- Specifies whether the cluster has EC2 instance capacity.- Returns:
this
-
securityGroups
@Stability(Stable) public ClusterAttributes.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofClusterAttributes.getSecurityGroups()- Parameters:
securityGroups- The security groups associated with the container instances registered to the cluster.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ClusterAttributes>- Returns:
- a new instance of
ClusterAttributes - Throws:
NullPointerException- if any required attribute was not provided
-