Class PrivateDnsNamespace

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.servicediscovery.PrivateDnsNamespace
All Implemented Interfaces:
IResource, INamespace, IPrivateDnsNamespace, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:14.002Z") @Stability(Stable) public class PrivateDnsNamespace extends Resource implements IPrivateDnsNamespace
Define a Service Discovery HTTP Namespace.

Example:

 Mesh mesh;
 // Cloud Map service discovery is currently required for host ejection by outlier detection
 Vpc vpc = new Vpc(this, "vpc");
 PrivateDnsNamespace namespace = PrivateDnsNamespace.Builder.create(this, "test-namespace")
         .vpc(vpc)
         .name("domain.local")
         .build();
 Service service = namespace.createService("Svc");
 VirtualNode node = mesh.addVirtualNode("virtual-node", VirtualNodeBaseProps.builder()
         .serviceDiscovery(ServiceDiscovery.cloudMap(service))
         .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
                 .outlierDetection(OutlierDetection.builder()
                         .baseEjectionDuration(Duration.seconds(10))
                         .interval(Duration.seconds(30))
                         .maxEjectionPercent(50)
                         .maxServerErrors(5)
                         .build())
                 .build())))
         .build());
 
  • Constructor Details

    • PrivateDnsNamespace

      protected PrivateDnsNamespace(software.amazon.jsii.JsiiObjectRef objRef)
    • PrivateDnsNamespace

      protected PrivateDnsNamespace(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • PrivateDnsNamespace

      @Stability(Stable) public PrivateDnsNamespace(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PrivateDnsNamespaceProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromPrivateDnsNamespaceAttributes

      @Stability(Stable) @NotNull public static IPrivateDnsNamespace fromPrivateDnsNamespaceAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PrivateDnsNamespaceAttributes attrs)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • createService

      @Stability(Stable) @NotNull public Service createService(@NotNull String id, @Nullable DnsServiceProps props)
      Creates a service within the namespace.

      Parameters:
      id - This parameter is required.
      props -
    • createService

      @Stability(Stable) @NotNull public Service createService(@NotNull String id)
      Creates a service within the namespace.

      Parameters:
      id - This parameter is required.
    • getNamespaceArn

      @Stability(Stable) @NotNull public String getNamespaceArn()
      Namespace Arn of the namespace.
      Specified by:
      getNamespaceArn in interface INamespace
    • getNamespaceHostedZoneId

      @Stability(Stable) @NotNull public String getNamespaceHostedZoneId()
      ID of hosted zone created by namespace.
    • getNamespaceId

      @Stability(Stable) @NotNull public String getNamespaceId()
      Namespace Id of the PrivateDnsNamespace.
      Specified by:
      getNamespaceId in interface INamespace
    • getNamespaceName

      @Stability(Stable) @NotNull public String getNamespaceName()
      The name of the PrivateDnsNamespace.
      Specified by:
      getNamespaceName in interface INamespace
    • getPrivateDnsNamespaceArn

      @Stability(Stable) @NotNull public String getPrivateDnsNamespaceArn()
    • getPrivateDnsNamespaceId

      @Stability(Stable) @NotNull public String getPrivateDnsNamespaceId()
    • getPrivateDnsNamespaceName

      @Stability(Stable) @NotNull public String getPrivateDnsNamespaceName()
    • getType

      @Stability(Stable) @NotNull public NamespaceType getType()
      Type of the namespace.
      Specified by:
      getType in interface INamespace