Skip to content
v2.277.0

CnameInstanceProps Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_servicediscovery as servicediscovery } from 'aws-cdk-lib';

declare const service: servicediscovery.Service;
const cnameInstanceProps: servicediscovery.CnameInstanceProps = {
  instanceCname: 'instanceCname',
  service: service,

  // the properties below are optional
  customAttributes: {
    customAttributesKey: 'customAttributes',
  },
  instanceId: 'instanceId',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_servicediscovery as servicediscovery

# service: servicediscovery.Service

cname_instance_props = servicediscovery.CnameInstanceProps(
    instance_cname="instanceCname",
    service=service,

    # the properties below are optional
    custom_attributes={
        "custom_attributes_key": "customAttributes"
    },
    instance_id="instanceId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.servicediscovery.*;

Service service;

CnameInstanceProps cnameInstanceProps = CnameInstanceProps.builder()
        .instanceCname("instanceCname")
        .service(service)

        // the properties below are optional
        .customAttributes(Map.of(
                "customAttributesKey", "customAttributes"))
        .instanceId("instanceId")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ServiceDiscovery;

Service service;

var cnameInstanceProps = new CnameInstanceProps {
    InstanceCname = "instanceCname",
    Service = service,

    // the properties below are optional
    CustomAttributes = new Dictionary<string, string> {
        { "customAttributesKey", "customAttributes" }
    },
    InstanceId = "instanceId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var service Service

cnameInstanceProps := &CnameInstanceProps{
	InstanceCname: jsii.String("instanceCname"),
	Service: service,

	// the properties below are optional
	CustomAttributes: map[string]*string{
		"customAttributesKey": jsii.String("customAttributes"),
	},
	InstanceId: jsii.String("instanceId"),
}

Properties ​

customAttributesoptional{ [key: string]: string }custom_attributesoptionaltyping.Mapping[str, str]customAttributesoptionalMap<String, String>CustomAttributesoptionalIDictionary<string, string>CustomAttributesoptional*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.
instanceIdoptionalstringinstance_idoptionalstrinstanceIdoptionalStringInstanceIdoptionalstringInstanceIdoptional*string#
The id of the instance resource.

Default: Automatically generated name

serviceIServiceserviceIServiceserviceIServiceServiceIServiceServiceIServicerequired#
The Cloudmap service this resource is registered to.