interface CnameInstanceBaseProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ServiceDiscovery.CnameInstanceBaseProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#CnameInstanceBaseProps |
![]() | software.amazon.awscdk.services.servicediscovery.CnameInstanceBaseProps |
![]() | aws_cdk.aws_servicediscovery.CnameInstanceBaseProps |
![]() | aws-cdk-lib » aws_servicediscovery » CnameInstanceBaseProps |
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.CNAME,
dnsTtl: cdk.Duration.seconds(30),
});
service.registerCnameInstance('CnameInstance', {
instanceCname: 'service.pizza',
});
app.synth();
Properties
Name | Type | Description |
---|---|---|
instance | string | If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries, for example, example.com. This value is required if the service specified by ServiceId includes settings for an CNAME record. |
custom | { [string]: string } | Custom attributes of the instance. |
instance | string | The id of the instance resource. |
instanceCname
Type:
string
If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries, for example, example.com. This value is required if the service specified by ServiceId includes settings for an CNAME record.
customAttributes?
Type:
{ [string]: string }
(optional, default: none)
Custom attributes of the instance.
instanceId?
Type:
string
(optional, default: Automatically generated name)
The id of the instance resource.