Show / Hide Table of Contents

Class ClusterAttributes

The properties to import from the ECS cluster.

Inheritance
object
ClusterAttributes
Implements
IClusterAttributes
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ClusterAttributes : IClusterAttributes
Syntax (vb)
Public Class ClusterAttributes 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()

The properties to import from the ECS cluster.

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()

The properties to import from the ECS cluster.

public ClusterAttributes()
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 }
            };

Properties

AutoscalingGroup

Autoscaling group added to the cluster if capacity is added.

public IAutoScalingGroup? AutoscalingGroup { get; set; }
Property Value

IAutoScalingGroup

Remarks

Default: - No default autoscaling group

ClusterArn

The Amazon Resource Name (ARN) that identifies the cluster.

public string? ClusterArn { get; set; }
Property Value

string

Remarks

Default: Derived from clusterName

ClusterName

The name of the cluster.

public string ClusterName { get; set; }
Property Value

string

Remarks

ExampleMetadata: fixture=_generated

DefaultCloudMapNamespace

The AWS Cloud Map namespace to associate with the cluster.

public INamespace? DefaultCloudMapNamespace { get; set; }
Property Value

INamespace

Remarks

Default: - No default namespace

ExecuteCommandConfiguration

The execute command configuration for the cluster.

public IExecuteCommandConfiguration? ExecuteCommandConfiguration { get; set; }
Property Value

IExecuteCommandConfiguration

Remarks

Default: - none.

HasEc2Capacity

Specifies whether the cluster has EC2 instance capacity.

public bool? HasEc2Capacity { get; set; }
Property Value

bool?

Remarks

Default: true

SecurityGroups

The security groups associated with the container instances registered to the cluster.

public ISecurityGroup[]? SecurityGroups { get; set; }
Property Value

ISecurityGroup[]

Remarks

Default: - no security groups

Vpc

The VPC associated with the cluster.

public IVpc Vpc { get; set; }
Property Value

IVpc

Remarks

ExampleMetadata: fixture=_generated

Implements

IClusterAttributes
Back to top Generated by DocFX