Interface ICfnClusterProps
Properties for defining a CfnCluster
.
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnClusterProps
Syntax (vb)
Public Interface ICfnClusterProps
Remarks
See: 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"
},
ManagedStorageConfiguration = new ManagedStorageConfigurationProperty {
FargateEphemeralStorageKmsKeyId = "fargateEphemeralStorageKmsKeyId",
KmsKeyId = "kmsKeyId"
}
},
DefaultCapacityProviderStrategy = new [] { new CapacityProviderStrategyItemProperty {
Base = 123,
CapacityProvider = "capacityProvider",
Weight = 123
} },
ServiceConnectDefaults = new ServiceConnectDefaultsProperty {
Namespace = "namespace"
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
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 and managed storage 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. |
Properties
CapacityProviders
The short name of one or more capacity providers to associate with the cluster.
virtual string[] CapacityProviders { get; }
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.
ClusterName
A user-generated string that you use to identify your cluster.
virtual string ClusterName { get; }
Property Value
System.String
Remarks
If you don't specify a name, AWS CloudFormation generates a unique physical ID for the name.
ClusterSettings
The settings to use when creating a cluster.
virtual object ClusterSettings { get; }
Property Value
System.Object
Remarks
This parameter is used to turn on CloudWatch Container Insights for a cluster.
Configuration
The execute command and managed storage configuration for the cluster.
virtual object Configuration { get; }
Property Value
System.Object
Remarks
DefaultCapacityProviderStrategy
The default capacity provider strategy for the cluster.
virtual object DefaultCapacityProviderStrategy { get; }
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.
ServiceConnectDefaults
Use this parameter to set a default Service Connect namespace.
virtual object ServiceConnectDefaults { get; }
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 .
Tags
The metadata that you apply to the cluster to help you categorize and organize them.
virtual ICfnTag[] Tags { get; }
Property Value
ICfnTag[]
Remarks
Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
: .
- Tag keys and values are case-sensitive.
- Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.