Interface CloudMapNamespaceOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CloudMapNamespaceOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:01.038Z") @Stability(Stable) public interface CloudMapNamespaceOptions extends software.amazon.jsii.JsiiSerializable
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)
         .serviceConnectConfiguration(ServiceConnectProps.builder()
                 .services(List.of(ServiceConnectService.builder()
                         .portMappingName("api")
                         .dnsName("http-api")
                         .port(80)
                         .build()))
                 .build())
         .build();
 
  • Method Details

    • getName

      @Stability(Stable) @NotNull String getName()
      The name of the namespace, such as example.com.
    • getType

      @Stability(Stable) @Nullable default NamespaceType getType()
      The type of CloudMap Namespace to create.

      Default: PrivateDns

    • getUseForServiceConnect

      @Stability(Stable) @Nullable default Boolean getUseForServiceConnect()
      This property specifies whether to set the provided namespace as the service connect default in the cluster properties.

      Default: false

    • getVpc

      @Stability(Stable) @Nullable default IVpc 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

      @Stability(Stable) static CloudMapNamespaceOptions.Builder builder()
      Returns:
      a CloudMapNamespaceOptions.Builder of CloudMapNamespaceOptions