Class CfnCluster

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:16.279Z") @Stability(Stable) public class CfnCluster extends CfnResource implements IInspectable, ITaggable
The AWS::ECS::Cluster resource creates an Amazon Elastic Container Service (Amazon 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.ecs.*;
 CfnCluster cfnCluster = CfnCluster.Builder.create(this, "MyCfnCluster")
         .capacityProviders(List.of("capacityProviders"))
         .clusterName("clusterName")
         .clusterSettings(List.of(ClusterSettingsProperty.builder()
                 .name("name")
                 .value("value")
                 .build()))
         .configuration(ClusterConfigurationProperty.builder()
                 .executeCommandConfiguration(ExecuteCommandConfigurationProperty.builder()
                         .kmsKeyId("kmsKeyId")
                         .logConfiguration(ExecuteCommandLogConfigurationProperty.builder()
                                 .cloudWatchEncryptionEnabled(false)
                                 .cloudWatchLogGroupName("cloudWatchLogGroupName")
                                 .s3BucketName("s3BucketName")
                                 .s3EncryptionEnabled(false)
                                 .s3KeyPrefix("s3KeyPrefix")
                                 .build())
                         .logging("logging")
                         .build())
                 .build())
         .defaultCapacityProviderStrategy(List.of(CapacityProviderStrategyItemProperty.builder()
                 .base(123)
                 .capacityProvider("capacityProvider")
                 .weight(123)
                 .build()))
         .serviceConnectDefaults(ServiceConnectDefaultsProperty.builder()
                 .namespace("namespace")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnCluster

      protected CfnCluster(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnCluster

      protected CfnCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnCluster

      @Stability(Stable) public CfnCluster(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnClusterProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnCluster

      @Stability(Stable) public CfnCluster(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the Amazon ECS cluster, such as arn:aws:ecs:us-east-2:123456789012:cluster/MyECSCluster .
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getCapacityProviders

      @Stability(Stable) @Nullable public List<String> getCapacityProviders()
      The short name of one or more capacity providers to associate with the cluster.
    • setCapacityProviders

      @Stability(Stable) public void setCapacityProviders(@Nullable List<String> value)
      The short name of one or more capacity providers to associate with the cluster.
    • getClusterName

      @Stability(Stable) @Nullable public String getClusterName()
      A user-generated string that you use to identify your cluster.
    • setClusterName

      @Stability(Stable) public void setClusterName(@Nullable String value)
      A user-generated string that you use to identify your cluster.
    • getClusterSettings

      @Stability(Stable) @Nullable public Object getClusterSettings()
      The settings to use when creating a cluster.
    • setClusterSettings

      @Stability(Stable) public void setClusterSettings(@Nullable IResolvable value)
      The settings to use when creating a cluster.
    • setClusterSettings

      @Stability(Stable) public void setClusterSettings(@Nullable List<Object> value)
      The settings to use when creating a cluster.
    • getConfiguration

      @Stability(Stable) @Nullable public Object getConfiguration()
      The execute command configuration for the cluster.
    • setConfiguration

      @Stability(Stable) public void setConfiguration(@Nullable IResolvable value)
      The execute command configuration for the cluster.
    • setConfiguration

      @Stability(Stable) public void setConfiguration(@Nullable CfnCluster.ClusterConfigurationProperty value)
      The execute command configuration for the cluster.
    • getDefaultCapacityProviderStrategy

      @Stability(Stable) @Nullable public Object getDefaultCapacityProviderStrategy()
      The default capacity provider strategy for the cluster.
    • setDefaultCapacityProviderStrategy

      @Stability(Stable) public void setDefaultCapacityProviderStrategy(@Nullable IResolvable value)
      The default capacity provider strategy for the cluster.
    • setDefaultCapacityProviderStrategy

      @Stability(Stable) public void setDefaultCapacityProviderStrategy(@Nullable List<Object> value)
      The default capacity provider strategy for the cluster.
    • getServiceConnectDefaults

      @Stability(Stable) @Nullable public Object getServiceConnectDefaults()
      Use this parameter to set a default Service Connect namespace.
    • setServiceConnectDefaults

      @Stability(Stable) public void setServiceConnectDefaults(@Nullable IResolvable value)
      Use this parameter to set a default Service Connect namespace.
    • setServiceConnectDefaults

      @Stability(Stable) public void setServiceConnectDefaults(@Nullable CfnCluster.ServiceConnectDefaultsProperty value)
      Use this parameter to set a default Service Connect namespace.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The metadata that you apply to the cluster to help you categorize and organize them.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The metadata that you apply to the cluster to help you categorize and organize them.