Class ClusterAttributes
The properties to import from the ECS cluster.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ClusterAttributes : Object, IClusterAttributes
Syntax (vb)
Public Class ClusterAttributes
Inherits Object
Implements 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",
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,
SecurityGroups = new [] { securityGroup }
};
Synopsis
Constructors
ClusterAttributes() |
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. |
Constructors
ClusterAttributes()
public ClusterAttributes()
Properties
AutoscalingGroup
Autoscaling group added to the cluster if capacity is added.
public IAutoScalingGroup AutoscalingGroup { get; set; }
Property Value
Remarks
Default: - No default autoscaling group
ClusterArn
The Amazon Resource Name (ARN) that identifies the cluster.
public string ClusterArn { get; set; }
Property Value
System.String
Remarks
Default: Derived from clusterName
ClusterName
The name of the cluster.
public string ClusterName { get; set; }
Property Value
System.String
DefaultCloudMapNamespace
The AWS Cloud Map namespace to associate with the cluster.
public INamespace DefaultCloudMapNamespace { get; set; }
Property Value
Remarks
Default: - No default namespace
ExecuteCommandConfiguration
The execute command configuration for the cluster.
public IExecuteCommandConfiguration ExecuteCommandConfiguration { get; set; }
Property Value
Remarks
Default: - none.
HasEc2Capacity
Specifies whether the cluster has EC2 instance capacity.
public Nullable<bool> HasEc2Capacity { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
SecurityGroups
The security groups associated with the container instances registered to the cluster.
public ISecurityGroup[] SecurityGroups { get; set; }
Property Value
Remarks
Default: - no security groups