Class PublicDnsNamespace

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:24.905Z") @Stability(Stable) public class PublicDnsNamespace extends Resource implements IPublicDnsNamespace
Define a Public DNS Namespace.

Example:

 import software.amazon.awscdk.*;
 import software.amazon.awscdk.*;
 App app = new App();
 Stack stack = new Stack(app, "aws-servicediscovery-integ");
 PublicDnsNamespace namespace = PublicDnsNamespace.Builder.create(stack, "Namespace")
         .name("foobar.com")
         .build();
 Service service = namespace.createService("Service", DnsServiceProps.builder()
         .name("foo")
         .dnsRecordType(DnsRecordType.A)
         .dnsTtl(Duration.seconds(30))
         .healthCheck(HealthCheckConfig.builder()
                 .type(HealthCheckType.HTTPS)
                 .resourcePath("/healthcheck")
                 .failureThreshold(2)
                 .build())
         .build());
 service.registerIpInstance("IpInstance", IpInstanceBaseProps.builder()
         .ipv4("54.239.25.192")
         .port(443)
         .build());
 app.synth();
 
  • Constructor Details

    • PublicDnsNamespace

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

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

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

    • fromPublicDnsNamespaceAttributes

      @Stability(Stable) @NotNull public static IPublicDnsNamespace fromPublicDnsNamespaceAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PublicDnsNamespaceAttributes 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 for 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 for the namespace.
      Specified by:
      getNamespaceId in interface INamespace
    • getNamespaceName

      @Stability(Stable) @NotNull public String getNamespaceName()
      A name for the namespace.
      Specified by:
      getNamespaceName in interface INamespace
    • getPublicDnsNamespaceArn

      @Stability(Stable) @NotNull public String getPublicDnsNamespaceArn()
    • getPublicDnsNamespaceId

      @Stability(Stable) @NotNull public String getPublicDnsNamespaceId()
    • getPublicDnsNamespaceName

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

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