ClusterAttributes
- class aws_cdk.aws_ecs.ClusterAttributes(*, cluster_name, security_groups, vpc, autoscaling_group=None, cluster_arn=None, default_cloud_map_namespace=None, execute_command_configuration=None, has_ec2_capacity=None)
Bases:
object
The properties to import from the ECS cluster.
- Parameters:
cluster_name (
str
) – The name of the cluster.security_groups (
Sequence
[ISecurityGroup
]) – The security groups associated with the container instances registered to the cluster.vpc (
IVpc
) – The VPC associated with the cluster.autoscaling_group (
Optional
[IAutoScalingGroup
]) – Autoscaling group added to the cluster if capacity is added. Default: - No default autoscaling groupcluster_arn (
Optional
[str
]) – The Amazon Resource Name (ARN) that identifies the cluster. Default: Derived from clusterNamedefault_cloud_map_namespace (
Optional
[INamespace
]) – The AWS Cloud Map namespace to associate with the cluster. Default: - No default namespaceexecute_command_configuration (
Union
[ExecuteCommandConfiguration
,Dict
[str
,Any
],None
]) – The execute command configuration for the cluster. Default: - none.has_ec2_capacity (
Optional
[bool
]) – Specifies whether the cluster has EC2 instance capacity. Default: true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_autoscaling as autoscaling import aws_cdk.aws_ec2 as ec2 import aws_cdk.aws_ecs as ecs import aws_cdk.aws_kms as kms import aws_cdk.aws_logs as logs import aws_cdk.aws_s3 as s3 import aws_cdk.aws_servicediscovery as servicediscovery # auto_scaling_group: autoscaling.AutoScalingGroup # bucket: s3.Bucket # key: kms.Key # log_group: logs.LogGroup # namespace: servicediscovery.INamespace # security_group: ec2.SecurityGroup # vpc: ec2.Vpc cluster_attributes = ecs.ClusterAttributes( cluster_name="clusterName", security_groups=[security_group], vpc=vpc, # the properties below are optional autoscaling_group=auto_scaling_group, cluster_arn="clusterArn", default_cloud_map_namespace=namespace, execute_command_configuration=ecs.ExecuteCommandConfiguration( kms_key=key, log_configuration=ecs.ExecuteCommandLogConfiguration( cloud_watch_encryption_enabled=False, cloud_watch_log_group=log_group, s3_bucket=bucket, s3_encryption_enabled=False, s3_key_prefix="s3KeyPrefix" ), logging=ecs.ExecuteCommandLogging.NONE ), has_ec2_capacity=False )
Attributes
- autoscaling_group
Autoscaling group added to the cluster if capacity is added.
- Default:
No default autoscaling group
- cluster_arn
The Amazon Resource Name (ARN) that identifies the cluster.
- Default:
Derived from clusterName
- cluster_name
The name of the cluster.
- default_cloud_map_namespace
The AWS Cloud Map namespace to associate with the cluster.
- Default:
No default namespace
- execute_command_configuration
The execute command configuration for the cluster.
- Default:
none.
- has_ec2_capacity
Specifies whether the cluster has EC2 instance capacity.
- Default:
true
- security_groups
The security groups associated with the container instances registered to the cluster.
- vpc
The VPC associated with the cluster.