# AssociateCloudMapServiceOptions

The options for using a cloudmap service.

- Source: [`aws-ecs/lib/base/base-service.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts#L2097)

## Example

```ts
declare const cloudMapService: cloudmap.Service;
declare const ecsService: ecs.FargateService;

ecsService.associateCloudMapService({
  service: cloudMapService,
});
```

## Properties

- `container`: [ContainerDefinition](/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinition.html) — The container to point to for a SRV record.

  **Default:** the task definition's default container

- `containerPort`: number — The port to point to for a SRV record.

  **Default:** the default port of the task definition's default container

- `service`: [IService](/cdk/api/v2/docs/aws-cdk-lib.aws_servicediscovery.IService.html) (required) — The cloudmap service to register with.
