# ExternalServiceAttributes

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

- Source: [`aws-ecs/lib/external/external-service.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ecs/lib/external/external-service.ts#L60)
- Type last changed: v2.60.0 · 12 Jan 2023

## Example

```ts
// 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 externalServiceAttributes: ecs.ExternalServiceAttributes = {
  cluster: cluster,

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

## Properties

- `cluster`: [ICluster](/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ICluster.html) (required) — The cluster that hosts the service.

- `serviceArn`: string — The service ARN.

  **Default:** either this, or `serviceName`, is required

- `serviceName`: string — The name of the service.

  **Default:** either this, or `serviceArn`, is required
