Interface IClusterAttributes
The properties to import from the ECS cluster.
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public interface IClusterAttributes
Syntax (vb)
Public Interface IClusterAttributes
Remarks
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.AutoScaling;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.KMS;
using Amazon.CDK.AWS.Logs;
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.ServiceDiscovery;
AutoScalingGroup autoScalingGroup;
Bucket bucket;
Key key;
LogGroup logGroup;
INamespace namespace;
SecurityGroup securityGroup;
Vpc vpc;
var clusterAttributes = new ClusterAttributes {
ClusterName = "clusterName",
SecurityGroups = new [] { securityGroup },
Vpc = vpc,
// the properties below are optional
AutoscalingGroup = autoScalingGroup,
ClusterArn = "clusterArn",
DefaultCloudMapNamespace = namespace,
ExecuteCommandConfiguration = new ExecuteCommandConfiguration {
KmsKey = key,
LogConfiguration = new ExecuteCommandLogConfiguration {
CloudWatchEncryptionEnabled = false,
CloudWatchLogGroup = logGroup,
S3Bucket = bucket,
S3EncryptionEnabled = false,
S3KeyPrefix = "s3KeyPrefix"
},
Logging = ExecuteCommandLogging.NONE
},
HasEc2Capacity = false
};
Synopsis
Properties
AutoscalingGroup | Autoscaling group added to the cluster if capacity is added. |
ClusterArn | The Amazon Resource Name (ARN) that identifies the cluster. |
ClusterName | The name of the cluster. |
DefaultCloudMapNamespace | The AWS Cloud Map namespace to associate with the cluster. |
ExecuteCommandConfiguration | The execute command configuration for the cluster. |
HasEc2Capacity | Specifies whether the cluster has EC2 instance capacity. |
SecurityGroups | The security groups associated with the container instances registered to the cluster. |
Vpc | The VPC associated with the cluster. |
Properties
AutoscalingGroup
Autoscaling group added to the cluster if capacity is added.
virtual IAutoScalingGroup AutoscalingGroup { get; }
Property Value
Remarks
Default: - No default autoscaling group
ClusterArn
The Amazon Resource Name (ARN) that identifies the cluster.
virtual string ClusterArn { get; }
Property Value
System.String
Remarks
Default: Derived from clusterName
ClusterName
The name of the cluster.
string ClusterName { get; }
Property Value
System.String
DefaultCloudMapNamespace
The AWS Cloud Map namespace to associate with the cluster.
virtual INamespace DefaultCloudMapNamespace { get; }
Property Value
Remarks
Default: - No default namespace
ExecuteCommandConfiguration
The execute command configuration for the cluster.
virtual IExecuteCommandConfiguration ExecuteCommandConfiguration { get; }
Property Value
Remarks
Default: - none.
HasEc2Capacity
Specifies whether the cluster has EC2 instance capacity.
virtual Nullable<bool> HasEc2Capacity { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
SecurityGroups
The security groups associated with the container instances registered to the cluster.
ISecurityGroup[] SecurityGroups { get; }
Property Value