Interface CloudMapNamespaceOptions
- All Superinterfaces:
CloudMapNamespaceOptionsBase,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CloudMapNamespaceOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)",
date="2026-07-31T10:49:29.108Z")
@Stability(Stable)
public interface CloudMapNamespaceOptions
extends software.amazon.jsii.JsiiSerializable, CloudMapNamespaceOptionsBase
The options for creating an AWS Cloud Map namespace.
Example:
Cluster cluster;
TaskDefinition taskDefinition;
ContainerDefinitionOptions containerOptions;
ContainerDefinition container = taskDefinition.addContainer("MyContainer", containerOptions);
container.addPortMappings(PortMapping.builder()
.name("api")
.containerPort(8080)
.build());
cluster.addDefaultCloudMapNamespace(CloudMapNamespaceOptions.builder()
.name("local")
.build());
FargateService service = FargateService.Builder.create(this, "Service")
.cluster(cluster)
.taskDefinition(taskDefinition)
.minHealthyPercent(100)
.serviceConnectConfiguration(ServiceConnectProps.builder()
.services(List.of(ServiceConnectService.builder()
.portMappingName("api")
.dnsName("http-api")
.port(80)
.build()))
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCloudMapNamespaceOptionsstatic final classAn implementation forCloudMapNamespaceOptions -
Method Summary
Methods inherited from interface software.amazon.awscdk.services.ecs.CloudMapNamespaceOptionsBase
getUseForServiceConnectMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
The name of the namespace, such as example.com. -
getType
The type of CloudMap Namespace to create.Default: PrivateDns
-
getVpc
The VPC to associate the namespace with.This property is required for private DNS namespaces.
Default: VPC of the cluster for Private DNS Namespace, otherwise none
-
builder
- Returns:
- a
CloudMapNamespaceOptions.BuilderofCloudMapNamespaceOptions
-