PrivateDnsNamespaceProps

class aws_cdk.aws_servicediscovery.PrivateDnsNamespaceProps(*, name, description=None, vpc)

Bases: BaseNamespaceProps

Parameters:
  • name (str) – A name for the Namespace.

  • description (Optional[str]) – A description of the Namespace. Default: none

  • vpc (IVpc) – The Amazon VPC that you want to associate the namespace with.

ExampleMetadata:

infused

Example:

# mesh: appmesh.Mesh
# Cloud Map service discovery is currently required for host ejection by outlier detection
vpc = ec2.Vpc(self, "vpc")
namespace = cloudmap.PrivateDnsNamespace(self, "test-namespace",
    vpc=vpc,
    name="domain.local"
)
service = namespace.create_service("Svc")
node = mesh.add_virtual_node("virtual-node",
    service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
    listeners=[appmesh.VirtualNodeListener.http(
        outlier_detection=appmesh.OutlierDetection(
            base_ejection_duration=Duration.seconds(10),
            interval=Duration.seconds(30),
            max_ejection_percent=50,
            max_server_errors=5
        )
    )]
)

Attributes

description

A description of the Namespace.

Default:

none

name

A name for the Namespace.

vpc

The Amazon VPC that you want to associate the namespace with.