Show / Hide Table of Contents

Class CfnClusterProps

Properties for defining a CfnCluster.

Inheritance
System.Object
CfnClusterProps
Implements
ICfnClusterProps
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class CfnClusterProps : Object, ICfnClusterProps
Syntax (vb)
Public Class CfnClusterProps
    Inherits Object
    Implements ICfnClusterProps
Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var cfnClusterProps = new CfnClusterProps {
    CapacityProviders = new [] { "capacityProviders" },
    ClusterName = "clusterName",
    ClusterSettings = new [] { new ClusterSettingsProperty {
        Name = "name",
        Value = "value"
    } },
    Configuration = new ClusterConfigurationProperty {
        ExecuteCommandConfiguration = new ExecuteCommandConfigurationProperty {
            KmsKeyId = "kmsKeyId",
            LogConfiguration = new ExecuteCommandLogConfigurationProperty {
                CloudWatchEncryptionEnabled = false,
                CloudWatchLogGroupName = "cloudWatchLogGroupName",
                S3BucketName = "s3BucketName",
                S3EncryptionEnabled = false,
                S3KeyPrefix = "s3KeyPrefix"
            },
            Logging = "logging"
        }
    },
    DefaultCapacityProviderStrategy = new [] { new CapacityProviderStrategyItemProperty {
        Base = 123,
        CapacityProvider = "capacityProvider",
        Weight = 123
    } },
    ServiceConnectDefaults = new ServiceConnectDefaultsProperty {
        Namespace = "namespace"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};

Synopsis

Constructors

CfnClusterProps()

Properties

CapacityProviders

The short name of one or more capacity providers to associate with the cluster.

ClusterName

A user-generated string that you use to identify your cluster.

ClusterSettings

The settings to use when creating a cluster.

Configuration

The execute command configuration for the cluster.

DefaultCapacityProviderStrategy

The default capacity provider strategy for the cluster.

ServiceConnectDefaults

Use this parameter to set a default Service Connect namespace.

Tags

The metadata that you apply to the cluster to help you categorize and organize them.

Constructors

CfnClusterProps()

public CfnClusterProps()

Properties

CapacityProviders

The short name of one or more capacity providers to associate with the cluster.

public string[] CapacityProviders { get; set; }
Property Value

System.String[]

Remarks

A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy when calling the CreateService or RunTask actions.

If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must be created but not associated with another cluster. New Auto Scaling group capacity providers can be created with the CreateCapacityProvider API operation.

To use a AWS Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.

The PutCapacityProvider API operation is used to update the list of available capacity providers for a cluster after the cluster is created.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-capacityproviders

ClusterName

A user-generated string that you use to identify your cluster.

public string ClusterName { get; set; }
Property Value

System.String

Remarks

If you don't specify a name, AWS CloudFormation generates a unique physical ID for the name.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername

ClusterSettings

The settings to use when creating a cluster.

public object ClusterSettings { get; set; }
Property Value

System.Object

Remarks

This parameter is used to turn on CloudWatch Container Insights for a cluster.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings

Configuration

The execute command configuration for the cluster.

public object Configuration { get; set; }
Property Value

System.Object

Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-configuration

DefaultCapacityProviderStrategy

The default capacity provider strategy for the cluster.

public object DefaultCapacityProviderStrategy { get; set; }
Property Value

System.Object

Remarks

When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-defaultcapacityproviderstrategy

ServiceConnectDefaults

Use this parameter to set a default Service Connect namespace.

public object ServiceConnectDefaults { get; set; }
Property Value

System.Object

Remarks

After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration . You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-serviceconnectdefaults

Tags

The metadata that you apply to the cluster to help you categorize and organize them.

public ICfnTag[] Tags { get; set; }
Property Value

ICfnTag[]

Remarks

Each tag consists of a key and an optional value. You define both.

The following basic restrictions apply to tags:

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags

    Implements

    ICfnClusterProps
    Back to top Generated by DocFX