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, IConstruct, IDependable
Syntax (vb)
Public Class PublicDnsNamespace Inherits Resource Implements IPublicDnsNamespace, INamespace, IResource, IConstruct, IDependable
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
PublicDnsNamespace(Construct, string, IPublicDnsNamespaceProps) | Define a Public DNS Namespace. |
Properties
NamespaceArn | Namespace Arn for the namespace. |
NamespaceHostedZoneId | ID of hosted zone created by namespace. |
NamespaceId | Namespace Id for the namespace. |
NamespaceName | A name for the namespace. |
PROPERTY_INJECTION_ID | Uniquely identifies this class. |
PublicDnsNamespaceArn | Define a Public DNS Namespace. |
PublicDnsNamespaceId | Define a Public DNS Namespace. |
PublicDnsNamespaceName | Define a Public DNS Namespace. |
Type | Type of the namespace. |
Methods
CreateService(string, IDnsServiceProps?) | Creates a service within the namespace. |
FromPublicDnsNamespaceAttributes(Construct, string, IPublicDnsNamespaceAttributes) | Define a Public DNS Namespace. |
Constructors
PublicDnsNamespace(Construct, string, IPublicDnsNamespaceProps)
Define a Public DNS Namespace.
public PublicDnsNamespace(Construct scope, string id, IPublicDnsNamespaceProps props)
Parameters
- scope Construct
- id string
- props IPublicDnsNamespaceProps
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();
Properties
NamespaceArn
Namespace Arn for the namespace.
public virtual string NamespaceArn { get; }
Property Value
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
NamespaceHostedZoneId
ID of hosted zone created by namespace.
public virtual string NamespaceHostedZoneId { get; }
Property Value
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
NamespaceId
Namespace Id for the namespace.
public virtual string NamespaceId { get; }
Property Value
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
NamespaceName
A name for the namespace.
public virtual string NamespaceName { get; }
Property Value
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
PublicDnsNamespaceArn
Define a Public DNS Namespace.
public virtual string PublicDnsNamespaceArn { get; }
Property Value
Remarks
Attribute: true
PublicDnsNamespaceId
Define a Public DNS Namespace.
public virtual string PublicDnsNamespaceId { get; }
Property Value
Remarks
Attribute: true
PublicDnsNamespaceName
Define a Public DNS Namespace.
public virtual string PublicDnsNamespaceName { get; }
Property Value
Remarks
Attribute: true
Type
Type of the namespace.
public virtual NamespaceType Type { get; }
Property Value
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
Methods
CreateService(string, IDnsServiceProps?)
Creates a service within the namespace.
public virtual Service CreateService(string id, IDnsServiceProps? props = null)
Parameters
- id string
- props IDnsServiceProps
Returns
Remarks
ExampleMetadata: lit=aws-servicediscovery/test/integ.service-with-public-dns-namespace.lit.ts infused
FromPublicDnsNamespaceAttributes(Construct, string, IPublicDnsNamespaceAttributes)
Define a Public DNS Namespace.
public static IPublicDnsNamespace FromPublicDnsNamespaceAttributes(Construct scope, string id, IPublicDnsNamespaceAttributes attrs)
Parameters
- scope Construct
- id string
- attrs IPublicDnsNamespaceAttributes
Returns
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();