Class PublicDnsNamespace
Define a Public DNS Namespace.
Inherited Members
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PublicDnsNamespace : Resource, IPublicDnsNamespace, INamespace, IResource
Syntax (vb)
Public Class PublicDnsNamespace
Inherits Resource
Implements IPublicDnsNamespace, INamespace, IResource
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
Examples
using Amazon.CDK;
using Amazon.CDK;
var app = new App();
var stack = new Stack(app, "aws-servicediscovery-integ");
var namespace = new PublicDnsNamespace(stack, "Namespace", new PublicDnsNamespaceProps {
Name = "foobar.com"
});
var service = namespace.CreateService("Service", new DnsServiceProps {
Name = "foo",
DnsRecordType = DnsRecordType.A,
DnsTtl = Duration.Seconds(30),
HealthCheck = new HealthCheckConfig {
Type = HealthCheckType.HTTPS,
ResourcePath = "/healthcheck",
FailureThreshold = 2
}
});
service.RegisterIpInstance("IpInstance", new IpInstanceBaseProps {
Ipv4 = "54.239.25.192",
Port = 443
});
app.Synth();
Synopsis
Constructors
Public |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Public |
Used by jsii to construct an instance of this class from DeputyProps |
Public |
Properties
Namespace |
Namespace Arn for the namespace. |
Namespace |
ID of hosted zone created by namespace. |
Namespace |
Namespace Id for the namespace. |
Namespace |
A name for the namespace. |
Public |
|
Public |
|
Public |
|
Type | Type of the namespace. |
Methods
Create |
Creates a service within the namespace. |
From |
Constructors
PublicDnsNamespace(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected PublicDnsNamespace(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
PublicDnsNamespace(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected PublicDnsNamespace(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
PublicDnsNamespace(Construct, String, IPublicDnsNamespaceProps)
public PublicDnsNamespace(Construct scope, string id, IPublicDnsNamespaceProps props)
Parameters
- scope Constructs.
Construct - id System.
String - props IPublic
Dns Namespace Props
Properties
NamespaceArn
Namespace Arn for the namespace.
public virtual string NamespaceArn { get; }
Property Value
System.
NamespaceHostedZoneId
ID of hosted zone created by namespace.
public virtual string NamespaceHostedZoneId { get; }
Property Value
System.
NamespaceId
Namespace Id for the namespace.
public virtual string NamespaceId { get; }
Property Value
System.
NamespaceName
A name for the namespace.
public virtual string NamespaceName { get; }
Property Value
System.
PublicDnsNamespaceArn
public virtual string PublicDnsNamespaceArn { get; }
Property Value
System.
Remarks
Attribute: true
PublicDnsNamespaceId
public virtual string PublicDnsNamespaceId { get; }
Property Value
System.
Remarks
Attribute: true
PublicDnsNamespaceName
public virtual string PublicDnsNamespaceName { get; }
Property Value
System.
Remarks
Attribute: true
Type
Methods
CreateService(String, IDnsServiceProps)
Creates a service within the namespace.
public virtual Service CreateService(string id, IDnsServiceProps props = null)
Parameters
- id System.
String - props IDns
Service Props
Returns
FromPublicDnsNamespaceAttributes(Construct, String, IPublicDnsNamespaceAttributes)
public static IPublicDnsNamespace FromPublicDnsNamespaceAttributes(Construct scope, string id, IPublicDnsNamespaceAttributes attrs)
Parameters
- scope Constructs.
Construct - id System.
String - attrs IPublic
Dns Namespace Attributes
Returns