Class PrivateDnsNamespace
Define a Service Discovery HTTP Namespace.
Inherited Members
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PrivateDnsNamespace : Resource, IPrivateDnsNamespace, INamespace, IResource
Syntax (vb)
Public Class PrivateDnsNamespace
Inherits Resource
Implements IPrivateDnsNamespace, INamespace, IResource
Remarks
ExampleMetadata: infused
Examples
Mesh mesh;
// Cloud Map service discovery is currently required for host ejection by outlier detection
var vpc = new Vpc(this, "vpc");
var namespace = new PrivateDnsNamespace(this, "test-namespace", new PrivateDnsNamespaceProps {
Vpc = vpc,
Name = "domain.local"
});
var service = namespace.CreateService("Svc");
var node = mesh.AddVirtualNode("virtual-node", new VirtualNodeBaseProps {
ServiceDiscovery = ServiceDiscovery.CloudMap(service),
Listeners = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
OutlierDetection = new OutlierDetection {
BaseEjectionDuration = Duration.Seconds(10),
Interval = Duration.Seconds(30),
MaxEjectionPercent = 50,
MaxServerErrors = 5
}
}) }
});
Synopsis
Constructors
PrivateDnsNamespace(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
PrivateDnsNamespace(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
PrivateDnsNamespace(Construct, String, IPrivateDnsNamespaceProps) |
Properties
NamespaceArn | Namespace Arn of the namespace. |
NamespaceHostedZoneId | ID of hosted zone created by namespace. |
NamespaceId | Namespace Id of the PrivateDnsNamespace. |
NamespaceName | The name of the PrivateDnsNamespace. |
PrivateDnsNamespaceArn | |
PrivateDnsNamespaceId | |
PrivateDnsNamespaceName | |
Type | Type of the namespace. |
Methods
CreateService(String, IDnsServiceProps) | Creates a service within the namespace. |
FromPrivateDnsNamespaceAttributes(Construct, String, IPrivateDnsNamespaceAttributes) |
Constructors
PrivateDnsNamespace(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected PrivateDnsNamespace(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
PrivateDnsNamespace(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected PrivateDnsNamespace(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
PrivateDnsNamespace(Construct, String, IPrivateDnsNamespaceProps)
public PrivateDnsNamespace(Construct scope, string id, IPrivateDnsNamespaceProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IPrivateDnsNamespaceProps
Properties
NamespaceArn
Namespace Arn of the namespace.
public virtual string NamespaceArn { get; }
Property Value
System.String
NamespaceHostedZoneId
ID of hosted zone created by namespace.
public virtual string NamespaceHostedZoneId { get; }
Property Value
System.String
NamespaceId
Namespace Id of the PrivateDnsNamespace.
public virtual string NamespaceId { get; }
Property Value
System.String
NamespaceName
The name of the PrivateDnsNamespace.
public virtual string NamespaceName { get; }
Property Value
System.String
PrivateDnsNamespaceArn
public virtual string PrivateDnsNamespaceArn { get; }
Property Value
System.String
Remarks
Attribute: true
PrivateDnsNamespaceId
public virtual string PrivateDnsNamespaceId { get; }
Property Value
System.String
Remarks
Attribute: true
PrivateDnsNamespaceName
public virtual string PrivateDnsNamespaceName { get; }
Property Value
System.String
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 IDnsServiceProps
Returns
FromPrivateDnsNamespaceAttributes(Construct, String, IPrivateDnsNamespaceAttributes)
public static IPrivateDnsNamespace FromPrivateDnsNamespaceAttributes(Construct scope, string id, IPrivateDnsNamespaceAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IPrivateDnsNamespaceAttributes
Returns