aws-cdk-lib.aws_ecs.Ec2ServiceAttributes

interface Ec2ServiceAttributes

LanguageType name
.NETAmazon.CDK.AWS.ECS.Ec2ServiceAttributes
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecs#Ec2ServiceAttributes
Javasoftware.amazon.awscdk.services.ecs.Ec2ServiceAttributes
Pythonaws_cdk.aws_ecs.Ec2ServiceAttributes
TypeScript (source)aws-cdk-lib » aws_ecs » Ec2ServiceAttributes

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

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';

declare const cluster: ecs.Cluster;
const ec2ServiceAttributes: ecs.Ec2ServiceAttributes = {
  cluster: cluster,

  // the properties below are optional
  serviceArn: 'serviceArn',
  serviceName: 'serviceName',
};

Properties

NameTypeDescription
clusterIClusterThe cluster that hosts the service.
serviceArn?stringThe service ARN.
serviceName?stringThe name of the service.

cluster

Type: ICluster

The cluster that hosts the service.


serviceArn?

Type: string (optional, default: either this, or serviceName, is required)

The service ARN.


serviceName?

Type: string (optional, default: either this, or serviceArn, is required)

The name of the service.