CfnCluster

class aws_cdk.aws_ecs.CfnCluster(scope, id, *, capacity_providers=None, cluster_name=None, cluster_settings=None, configuration=None, default_capacity_provider_strategy=None, service_connect_defaults=None, tags=None)

Bases: CfnResource

A CloudFormation AWS::ECS::Cluster.

The AWS::ECS::Cluster resource creates an Amazon Elastic Container Service (Amazon ECS) cluster.

CloudformationResource:

AWS::ECS::Cluster

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html

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_ecs as ecs

cfn_cluster = ecs.CfnCluster(self, "MyCfnCluster",
    capacity_providers=["capacityProviders"],
    cluster_name="clusterName",
    cluster_settings=[ecs.CfnCluster.ClusterSettingsProperty(
        name="name",
        value="value"
    )],
    configuration=ecs.CfnCluster.ClusterConfigurationProperty(
        execute_command_configuration=ecs.CfnCluster.ExecuteCommandConfigurationProperty(
            kms_key_id="kmsKeyId",
            log_configuration=ecs.CfnCluster.ExecuteCommandLogConfigurationProperty(
                cloud_watch_encryption_enabled=False,
                cloud_watch_log_group_name="cloudWatchLogGroupName",
                s3_bucket_name="s3BucketName",
                s3_encryption_enabled=False,
                s3_key_prefix="s3KeyPrefix"
            ),
            logging="logging"
        )
    ),
    default_capacity_provider_strategy=[ecs.CfnCluster.CapacityProviderStrategyItemProperty(
        base=123,
        capacity_provider="capacityProvider",
        weight=123
    )],
    service_connect_defaults=ecs.CfnCluster.ServiceConnectDefaultsProperty(
        namespace="namespace"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Create a new AWS::ECS::Cluster.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • capacity_providers (Optional[Sequence[str]]) – The short name of one or more capacity providers to associate with the cluster. A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy when calling the CreateService or RunTask actions. If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must be created but not associated with another cluster. New Auto Scaling group capacity providers can be created with the CreateCapacityProvider API operation. To use a AWS Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used. The PutCapacityProvider API operation is used to update the list of available capacity providers for a cluster after the cluster is created.

  • cluster_name (Optional[str]) – A user-generated string that you use to identify your cluster. If you don’t specify a name, AWS CloudFormation generates a unique physical ID for the name.

  • cluster_settings (Union[IResolvable, Sequence[Union[IResolvable, ClusterSettingsProperty, Dict[str, Any]]], None]) – The settings to use when creating a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster.

  • configuration (Union[IResolvable, ClusterConfigurationProperty, Dict[str, Any], None]) – The execute command configuration for the cluster.

  • default_capacity_provider_strategy (Union[IResolvable, Sequence[Union[IResolvable, CapacityProviderStrategyItemProperty, Dict[str, Any]]], None]) – The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

  • service_connect_defaults (Union[IResolvable, ServiceConnectDefaultsProperty, Dict[str, Any], None]) – Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration . You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter. Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide .

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. The following basic restrictions apply to tags: - Maximum number of tags per resource - 50 - For each resource, each tag key must be unique, and each tag key can have only one value. - Maximum key length - 128 Unicode characters in UTF-8 - Maximum value length - 256 Unicode characters in UTF-8 - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @. - Tag keys and values are case-sensitive. - Do not use aws: , AWS: , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource)

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str)

  • value (Any)

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy])

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str)

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::ECS::Cluster'
attr_arn

The Amazon Resource Name (ARN) of the Amazon ECS cluster, such as arn:aws:ecs:us-east-2:123456789012:cluster/MyECSCluster .

CloudformationAttribute:

Arn

capacity_providers

The short name of one or more capacity providers to associate with the cluster.

A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy when calling the CreateService or RunTask actions.

If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must be created but not associated with another cluster. New Auto Scaling group capacity providers can be created with the CreateCapacityProvider API operation.

To use a AWS Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.

The PutCapacityProvider API operation is used to update the list of available capacity providers for a cluster after the cluster is created.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-capacityproviders

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

cluster_name

A user-generated string that you use to identify your cluster.

If you don’t specify a name, AWS CloudFormation generates a unique physical ID for the name.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername

cluster_settings

The settings to use when creating a cluster.

This parameter is used to turn on CloudWatch Container Insights for a cluster.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings

configuration

The execute command configuration for the cluster.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-configuration

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

default_capacity_provider_strategy

The default capacity provider strategy for the cluster.

When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-defaultcapacityproviderstrategy

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

service_connect_defaults

Use this parameter to set a default Service Connect namespace.

After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration . You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-serviceconnectdefaults

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

The metadata that you apply to the cluster to help you categorize and organize them.

Each tag consists of a key and an optional value. You define both.

The following basic restrictions apply to tags:

  • Maximum number of tags per resource - 50

  • For each resource, each tag key must be unique, and each tag key can have only one value.

  • Maximum key length - 128 Unicode characters in UTF-8

  • Maximum value length - 256 Unicode characters in UTF-8

  • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

  • Tag keys and values are case-sensitive.

  • Do not use aws: , AWS: , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any)

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct)

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any)

Return type:

bool

CapacityProviderStrategyItemProperty

class CfnCluster.CapacityProviderStrategyItemProperty(*, base=None, capacity_provider=None, weight=None)

Bases: object

The CapacityProviderStrategyItem property specifies the details of the default capacity provider strategy for the cluster.

When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

Parameters:
  • base (Union[int, float, None]) – The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.

  • capacity_provider (Optional[str]) – The short name of the capacity provider.

  • weight (Union[int, float, None]) – The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied. If no weight value is specified, the default value of 0 is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of 0 can’t be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of 0 , any RunTask or CreateService actions using the capacity provider strategy will fail. An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of 1 , then when the base is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of 1 for capacityProviderA and a weight of 4 for capacityProviderB , then for every one task that’s run using capacityProviderA , four tasks would use capacityProviderB .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html

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_ecs as ecs

capacity_provider_strategy_item_property = ecs.CfnCluster.CapacityProviderStrategyItemProperty(
    base=123,
    capacity_provider="capacityProvider",
    weight=123
)

Attributes

base

The base value designates how many tasks, at a minimum, to run on the specified capacity provider.

Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html#cfn-ecs-cluster-capacityproviderstrategyitem-base

capacity_provider

The short name of the capacity provider.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html#cfn-ecs-cluster-capacityproviderstrategyitem-capacityprovider

weight

The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.

The weight value is taken into consideration after the base value, if defined, is satisfied.

If no weight value is specified, the default value of 0 is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of 0 can’t be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of 0 , any RunTask or CreateService actions using the capacity provider strategy will fail.

An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of 1 , then when the base is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of 1 for capacityProviderA and a weight of 4 for capacityProviderB , then for every one task that’s run using capacityProviderA , four tasks would use capacityProviderB .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html#cfn-ecs-cluster-capacityproviderstrategyitem-weight

ClusterConfigurationProperty

class CfnCluster.ClusterConfigurationProperty(*, execute_command_configuration=None)

Bases: object

The execute command configuration for the cluster.

Parameters:

execute_command_configuration (Union[IResolvable, ExecuteCommandConfigurationProperty, Dict[str, Any], None]) – The details of the execute command configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clusterconfiguration.html

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_ecs as ecs

cluster_configuration_property = ecs.CfnCluster.ClusterConfigurationProperty(
    execute_command_configuration=ecs.CfnCluster.ExecuteCommandConfigurationProperty(
        kms_key_id="kmsKeyId",
        log_configuration=ecs.CfnCluster.ExecuteCommandLogConfigurationProperty(
            cloud_watch_encryption_enabled=False,
            cloud_watch_log_group_name="cloudWatchLogGroupName",
            s3_bucket_name="s3BucketName",
            s3_encryption_enabled=False,
            s3_key_prefix="s3KeyPrefix"
        ),
        logging="logging"
    )
)

Attributes

execute_command_configuration

The details of the execute command configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clusterconfiguration.html#cfn-ecs-cluster-clusterconfiguration-executecommandconfiguration

ClusterSettingsProperty

class CfnCluster.ClusterSettingsProperty(*, name=None, value=None)

Bases: object

The settings to use when creating a cluster.

This parameter is used to turn on CloudWatch Container Insights for a cluster.

Parameters:
  • name (Optional[str]) – The name of the cluster setting. The value is containerInsights .

  • value (Optional[str]) – The value to set for the cluster setting. The supported values are enabled and disabled . If you set name to containerInsights and value to enabled , CloudWatch Container Insights will be on for the cluster, otherwise it will be off unless the containerInsights account setting is turned on. If a cluster value is specified, it will override the containerInsights value set with PutAccountSetting or PutAccountSettingDefault .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clustersettings.html

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_ecs as ecs

cluster_settings_property = ecs.CfnCluster.ClusterSettingsProperty(
    name="name",
    value="value"
)

Attributes

name

The name of the cluster setting.

The value is containerInsights .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clustersettings.html#cfn-ecs-cluster-clustersettings-name

value

The value to set for the cluster setting. The supported values are enabled and disabled .

If you set name to containerInsights and value to enabled , CloudWatch Container Insights will be on for the cluster, otherwise it will be off unless the containerInsights account setting is turned on. If a cluster value is specified, it will override the containerInsights value set with PutAccountSetting or PutAccountSettingDefault .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clustersettings.html#cfn-ecs-cluster-clustersettings-value

ExecuteCommandConfigurationProperty

class CfnCluster.ExecuteCommandConfigurationProperty(*, kms_key_id=None, log_configuration=None, logging=None)

Bases: object

The details of the execute command configuration.

Parameters:
  • kms_key_id (Optional[str]) – Specify an AWS Key Management Service key ID to encrypt the data between the local client and the container.

  • log_configuration (Union[IResolvable, ExecuteCommandLogConfigurationProperty, Dict[str, Any], None]) – The log configuration for the results of the execute command actions. The logs can be sent to CloudWatch Logs or an Amazon S3 bucket. When logging=OVERRIDE is specified, a logConfiguration must be provided.

  • logging (Optional[str]) – The log setting to use for redirecting logs for your execute command results. The following log settings are available. - NONE : The execute command session is not logged. - DEFAULT : The awslogs configuration in the task definition is used. If no logging parameter is specified, it defaults to this value. If no awslogs log driver is configured in the task definition, the output won’t be logged. - OVERRIDE : Specify the logging details as a part of logConfiguration . If the OVERRIDE logging option is specified, the logConfiguration is required.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html

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_ecs as ecs

execute_command_configuration_property = ecs.CfnCluster.ExecuteCommandConfigurationProperty(
    kms_key_id="kmsKeyId",
    log_configuration=ecs.CfnCluster.ExecuteCommandLogConfigurationProperty(
        cloud_watch_encryption_enabled=False,
        cloud_watch_log_group_name="cloudWatchLogGroupName",
        s3_bucket_name="s3BucketName",
        s3_encryption_enabled=False,
        s3_key_prefix="s3KeyPrefix"
    ),
    logging="logging"
)

Attributes

kms_key_id

Specify an AWS Key Management Service key ID to encrypt the data between the local client and the container.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-kmskeyid

log_configuration

The log configuration for the results of the execute command actions.

The logs can be sent to CloudWatch Logs or an Amazon S3 bucket. When logging=OVERRIDE is specified, a logConfiguration must be provided.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-logconfiguration

logging

The log setting to use for redirecting logs for your execute command results. The following log settings are available.

  • NONE : The execute command session is not logged.

  • DEFAULT : The awslogs configuration in the task definition is used. If no logging parameter is specified, it defaults to this value. If no awslogs log driver is configured in the task definition, the output won’t be logged.

  • OVERRIDE : Specify the logging details as a part of logConfiguration . If the OVERRIDE logging option is specified, the logConfiguration is required.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-logging

ExecuteCommandLogConfigurationProperty

class CfnCluster.ExecuteCommandLogConfigurationProperty(*, cloud_watch_encryption_enabled=None, cloud_watch_log_group_name=None, s3_bucket_name=None, s3_encryption_enabled=None, s3_key_prefix=None)

Bases: object

The log configuration for the results of the execute command actions.

The logs can be sent to CloudWatch Logs or an Amazon S3 bucket.

Parameters:
  • cloud_watch_encryption_enabled (Union[bool, IResolvable, None]) – Determines whether to use encryption on the CloudWatch logs. If not specified, encryption will be off.

  • cloud_watch_log_group_name (Optional[str]) – The name of the CloudWatch log group to send logs to. .. epigraph:: The CloudWatch log group must already be created.

  • s3_bucket_name (Optional[str]) – The name of the S3 bucket to send logs to. .. epigraph:: The S3 bucket must already be created.

  • s3_encryption_enabled (Union[bool, IResolvable, None]) – Determines whether to use encryption on the S3 logs. If not specified, encryption is not used.

  • s3_key_prefix (Optional[str]) – An optional folder in the S3 bucket to place logs in.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html

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_ecs as ecs

execute_command_log_configuration_property = ecs.CfnCluster.ExecuteCommandLogConfigurationProperty(
    cloud_watch_encryption_enabled=False,
    cloud_watch_log_group_name="cloudWatchLogGroupName",
    s3_bucket_name="s3BucketName",
    s3_encryption_enabled=False,
    s3_key_prefix="s3KeyPrefix"
)

Attributes

cloud_watch_encryption_enabled

Determines whether to use encryption on the CloudWatch logs.

If not specified, encryption will be off.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html#cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchencryptionenabled

cloud_watch_log_group_name

The name of the CloudWatch log group to send logs to.

The CloudWatch log group must already be created.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html#cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchloggroupname

s3_bucket_name

The name of the S3 bucket to send logs to.

The S3 bucket must already be created.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html#cfn-ecs-cluster-executecommandlogconfiguration-s3bucketname

s3_encryption_enabled

Determines whether to use encryption on the S3 logs.

If not specified, encryption is not used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html#cfn-ecs-cluster-executecommandlogconfiguration-s3encryptionenabled

s3_key_prefix

An optional folder in the S3 bucket to place logs in.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html#cfn-ecs-cluster-executecommandlogconfiguration-s3keyprefix

ServiceConnectDefaultsProperty

class CfnCluster.ServiceConnectDefaultsProperty(*, namespace=None)

Bases: object

Use this parameter to set a default Service Connect namespace.

After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration . You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide .

Parameters:

namespace (Optional[str]) – The namespace name or full Amazon Resource Name (ARN) of the AWS Cloud Map namespace that’s used when you create a service and don’t specify a Service Connect configuration. The namespace name can include up to 1024 characters. The name is case-sensitive. The name can’t include hyphens (-), tilde (~), greater than (>), less than (<), or slash (/). If you enter an existing namespace name or ARN, then that namespace will be used. Any namespace type is supported. The namespace must be in this account and this AWS Region. If you enter a new name, a AWS Cloud Map namespace will be created. Amazon ECS creates a AWS Cloud Map namespace with the “API calls” method of instance discovery only. This instance discovery method is the “HTTP” namespace type in the AWS Command Line Interface . Other types of instance discovery aren’t used by Service Connect. If you update the service with an empty string "" for the namespace name, the cluster configuration for Service Connect is removed. Note that the namespace will remain in AWS Cloud Map and must be deleted separately. For more information about AWS Cloud Map , see Working with Services in the AWS Cloud Map Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-serviceconnectdefaults.html

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_ecs as ecs

service_connect_defaults_property = ecs.CfnCluster.ServiceConnectDefaultsProperty(
    namespace="namespace"
)

Attributes

namespace

The namespace name or full Amazon Resource Name (ARN) of the AWS Cloud Map namespace that’s used when you create a service and don’t specify a Service Connect configuration.

The namespace name can include up to 1024 characters. The name is case-sensitive. The name can’t include hyphens (-), tilde (~), greater than (>), less than (<), or slash (/).

If you enter an existing namespace name or ARN, then that namespace will be used. Any namespace type is supported. The namespace must be in this account and this AWS Region.

If you enter a new name, a AWS Cloud Map namespace will be created. Amazon ECS creates a AWS Cloud Map namespace with the “API calls” method of instance discovery only. This instance discovery method is the “HTTP” namespace type in the AWS Command Line Interface . Other types of instance discovery aren’t used by Service Connect.

If you update the service with an empty string "" for the namespace name, the cluster configuration for Service Connect is removed. Note that the namespace will remain in AWS Cloud Map and must be deleted separately.

For more information about AWS Cloud Map , see Working with Services in the AWS Cloud Map Developer Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-serviceconnectdefaults.html#cfn-ecs-cluster-serviceconnectdefaults-namespace