interface ClusterAttributes
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.ClusterAttributes |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#ClusterAttributes |
Java | software.amazon.awscdk.services.ecs.ClusterAttributes |
Python | aws_cdk.aws_ecs.ClusterAttributes |
TypeScript (source) | aws-cdk-lib » aws_ecs » ClusterAttributes |
The properties to import from the ECS cluster.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_kms as kms } from 'aws-cdk-lib';
import { aws_logs as logs } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
import { aws_servicediscovery as servicediscovery } from 'aws-cdk-lib';
declare const autoScalingGroup: autoscaling.AutoScalingGroup;
declare const bucket: s3.Bucket;
declare const key: kms.Key;
declare const logGroup: logs.LogGroup;
declare const namespace: servicediscovery.INamespace;
declare const securityGroup: ec2.SecurityGroup;
declare const vpc: ec2.Vpc;
const clusterAttributes: ecs.ClusterAttributes = {
clusterName: 'clusterName',
vpc: vpc,
// the properties below are optional
autoscalingGroup: autoScalingGroup,
clusterArn: 'clusterArn',
defaultCloudMapNamespace: namespace,
executeCommandConfiguration: {
kmsKey: key,
logConfiguration: {
cloudWatchEncryptionEnabled: false,
cloudWatchLogGroup: logGroup,
s3Bucket: bucket,
s3EncryptionEnabled: false,
s3KeyPrefix: 's3KeyPrefix',
},
logging: ecs.ExecuteCommandLogging.NONE,
},
hasEc2Capacity: false,
securityGroups: [securityGroup],
};
Properties
Name | Type | Description |
---|---|---|
cluster | string | The name of the cluster. |
vpc | IVpc | The VPC associated with the cluster. |
autoscaling | IAuto | Autoscaling group added to the cluster if capacity is added. |
cluster | string | The Amazon Resource Name (ARN) that identifies the cluster. |
default | INamespace | The AWS Cloud Map namespace to associate with the cluster. |
execute | Execute | The execute command configuration for the cluster. |
has | boolean | Specifies whether the cluster has EC2 instance capacity. |
security | ISecurity [] | The security groups associated with the container instances registered to the cluster. |
clusterName
Type:
string
The name of the cluster.
vpc
Type:
IVpc
The VPC associated with the cluster.
autoscalingGroup?
Type:
IAuto
(optional, default: No default autoscaling group)
Autoscaling group added to the cluster if capacity is added.
clusterArn?
Type:
string
(optional, default: Derived from clusterName)
The Amazon Resource Name (ARN) that identifies the cluster.
defaultCloudMapNamespace?
Type:
INamespace
(optional, default: No default namespace)
The AWS Cloud Map namespace to associate with the cluster.
executeCommandConfiguration?
Type:
Execute
(optional, default: none.)
The execute command configuration for the cluster.
hasEc2Capacity?
Type:
boolean
(optional, default: true)
Specifies whether the cluster has EC2 instance capacity.
securityGroups?
Type:
ISecurity
[]
(optional, default: no security groups)
The security groups associated with the container instances registered to the cluster.