Interface ClusterAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ClusterAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:47.245Z") @Stability(Stable) public interface ClusterAttributes extends software.amazon.jsii.JsiiSerializable
The properties to import from the ECS cluster.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.autoscaling.*;
 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.services.ecs.*;
 import software.amazon.awscdk.services.kms.*;
 import software.amazon.awscdk.services.logs.*;
 import software.amazon.awscdk.services.s3.*;
 import software.amazon.awscdk.services.servicediscovery.*;
 AutoScalingGroup autoScalingGroup;
 Bucket bucket;
 Key key;
 LogGroup logGroup;
 INamespace namespace;
 SecurityGroup securityGroup;
 Vpc vpc;
 ClusterAttributes clusterAttributes = ClusterAttributes.builder()
         .clusterName("clusterName")
         .securityGroups(List.of(securityGroup))
         .vpc(vpc)
         // the properties below are optional
         .autoscalingGroup(autoScalingGroup)
         .clusterArn("clusterArn")
         .defaultCloudMapNamespace(namespace)
         .executeCommandConfiguration(ExecuteCommandConfiguration.builder()
                 .kmsKey(key)
                 .logConfiguration(ExecuteCommandLogConfiguration.builder()
                         .cloudWatchEncryptionEnabled(false)
                         .cloudWatchLogGroup(logGroup)
                         .s3Bucket(bucket)
                         .s3EncryptionEnabled(false)
                         .s3KeyPrefix("s3KeyPrefix")
                         .build())
                 .logging(ExecuteCommandLogging.NONE)
                 .build())
         .hasEc2Capacity(false)
         .build();
 
  • Method Details

    • getClusterName

      @Stability(Stable) @NotNull String getClusterName()
      The name of the cluster.
    • getSecurityGroups

      @Stability(Stable) @NotNull List<ISecurityGroup> getSecurityGroups()
      The security groups associated with the container instances registered to the cluster.
    • getVpc

      @Stability(Stable) @NotNull IVpc getVpc()
      The VPC associated with the cluster.
    • getAutoscalingGroup

      @Stability(Stable) @Nullable default IAutoScalingGroup getAutoscalingGroup()
      Autoscaling group added to the cluster if capacity is added.

      Default: - No default autoscaling group

    • getClusterArn

      @Stability(Stable) @Nullable default String getClusterArn()
      The Amazon Resource Name (ARN) that identifies the cluster.

      Default: Derived from clusterName

    • getDefaultCloudMapNamespace

      @Stability(Stable) @Nullable default INamespace getDefaultCloudMapNamespace()
      The AWS Cloud Map namespace to associate with the cluster.

      Default: - No default namespace

    • getExecuteCommandConfiguration

      @Stability(Stable) @Nullable default ExecuteCommandConfiguration getExecuteCommandConfiguration()
      The execute command configuration for the cluster.

      Default: - none.

    • getHasEc2Capacity

      @Stability(Stable) @Nullable default Boolean getHasEc2Capacity()
      Specifies whether the cluster has EC2 instance capacity.

      Default: true

    • builder

      @Stability(Stable) static ClusterAttributes.Builder builder()
      Returns:
      a ClusterAttributes.Builder of ClusterAttributes