interface PublicDnsNamespaceProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ServiceDiscovery.PublicDnsNamespaceProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#PublicDnsNamespaceProps |
Java | software.amazon.awscdk.services.servicediscovery.PublicDnsNamespaceProps |
Python | aws_cdk.aws_servicediscovery.PublicDnsNamespaceProps |
TypeScript (source) | aws-cdk-lib » aws_servicediscovery » PublicDnsNamespaceProps |
Example
import * as cdk from '../../core';
import * as servicediscovery from '../lib';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-servicediscovery-integ');
const namespace = new servicediscovery.PublicDnsNamespace(stack, 'Namespace', {
name: 'foobar.com',
});
const service = namespace.createService('Service', {
name: 'foo',
dnsRecordType: servicediscovery.DnsRecordType.A,
dnsTtl: cdk.Duration.seconds(30),
healthCheck: {
type: servicediscovery.HealthCheckType.HTTPS,
resourcePath: '/healthcheck',
failureThreshold: 2,
},
});
service.registerIpInstance('IpInstance', {
ipv4: '54.239.25.192',
port: 443,
});
app.synth();
Properties
Name | Type | Description |
---|---|---|
name | string | A name for the Namespace. |
description? | string | A description of the Namespace. |
name
Type:
string
A name for the Namespace.
description?
Type:
string
(optional, default: none)
A description of the Namespace.