Ec2ServiceAttributes

class aws_cdk.aws_ecs.Ec2ServiceAttributes(*, cluster, service_arn=None, service_name=None)

Bases: object

The properties to import from the service using the EC2 launch type.

Parameters:
  • cluster (ICluster) – The cluster that hosts the service.

  • service_arn (Optional[str]) – The service ARN. Default: - either this, or serviceName, is required

  • service_name (Optional[str]) – The name of the service. Default: - either this, or serviceArn, is required

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

# cluster: ecs.Cluster

ec2_service_attributes = ecs.Ec2ServiceAttributes(
    cluster=cluster,

    # the properties below are optional
    service_arn="serviceArn",
    service_name="serviceName"
)

Attributes

cluster

The cluster that hosts the service.

service_arn

The service ARN.

Default:
  • either this, or serviceName, is required

service_name

The name of the service.

Default:
  • either this, or serviceArn, is required