Skip to content
v2.273.0

CnameInstanceBaseProps Struct ​

Example ​

ts
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 ​

customAttributes{ [key: string]: string }custom_attributestyping.Mapping[str, str]customAttributesMap<String, String>CustomAttributesIDictionary<string, string>CustomAttributes*map[string]*string= none#
Custom attributes of the instance.
instanceCnamestringinstance_cnamestrinstanceCnameStringInstanceCnamestringInstanceCname*stringrequired#
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.
instanceIdstringinstance_idstrinstanceIdStringInstanceIdstringInstanceId*string= Automatically generated name#
The id of the instance resource.