aws-cdk-lib.aws_servicediscovery.CnameInstanceBaseProps

interface CnameInstanceBaseProps

LanguageType name
.NETAmazon.CDK.AWS.ServiceDiscovery.CnameInstanceBaseProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#CnameInstanceBaseProps
Javasoftware.amazon.awscdk.services.servicediscovery.CnameInstanceBaseProps
Pythonaws_cdk.aws_servicediscovery.CnameInstanceBaseProps
TypeScript (source)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

NameTypeDescription
instanceCnamestringIf 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?{ [string]: string }Custom attributes of the instance.
instanceId?stringThe 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.