Skip to content
v2.277.0

AssociateCloudMapServiceOptions Struct ​

The options for using a cloudmap service.

Example ​

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

ecsService.associateCloudMapService({
  service: cloudMapService,
});
python
# cloud_map_service: cloudmap.Service
# ecs_service: ecs.FargateService


ecs_service.associate_cloud_map_service(
    service=cloud_map_service
)
java
Service cloudMapService;
FargateService ecsService;


ecsService.associateCloudMapService(AssociateCloudMapServiceOptions.builder()
        .service(cloudMapService)
        .build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
Service cloudMapService;
FargateService ecsService;


ecsService.AssociateCloudMapService(new AssociateCloudMapServiceOptions {
    Service = cloudMapService
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cloudMapService Service
var ecsService FargateService


ecsService.AssociateCloudMapService(&AssociateCloudMapServiceOptions{
	Service: cloudMapService,
})

Properties ​

containeroptionalContainerDefinitioncontaineroptionalContainerDefinitioncontaineroptionalContainerDefinitionContaineroptionalContainerDefinitionContaineroptionalContainerDefinition #
The container to point to for a SRV record.

Default: the task definition's default container

containerPortoptionalnumbercontainer_portoptionalint | floatcontainerPortoptionalNumberContainerPortoptionaldoubleContainerPortoptional*float64 #
The port to point to for a SRV record.

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

serviceIServiceserviceIServiceserviceIServiceServiceIServiceServiceIService required #
The cloudmap service to register with.