Skip to content
v2.278.0

IpInstanceProps 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 ipInstanceProps: servicediscovery.IpInstanceProps = {
  service: service,

  // the properties below are optional
  customAttributes: {
    customAttributesKey: 'customAttributes',
  },
  instanceId: 'instanceId',
  ipv4: 'ipv4',
  ipv6: 'ipv6',
  port: 123,
};
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

ip_instance_props = servicediscovery.IpInstanceProps(
    service=service,

    # the properties below are optional
    custom_attributes={
        "custom_attributes_key": "customAttributes"
    },
    instance_id="instanceId",
    ipv4="ipv4",
    ipv6="ipv6",
    port=123
)
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;

IpInstanceProps ipInstanceProps = IpInstanceProps.builder()
        .service(service)

        // the properties below are optional
        .customAttributes(Map.of(
                "customAttributesKey", "customAttributes"))
        .instanceId("instanceId")
        .ipv4("ipv4")
        .ipv6("ipv6")
        .port(123)
        .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 ipInstanceProps = new IpInstanceProps {
    Service = service,

    // the properties below are optional
    CustomAttributes = new Dictionary<string, string> {
        { "customAttributesKey", "customAttributes" }
    },
    InstanceId = "instanceId",
    Ipv4 = "ipv4",
    Ipv6 = "ipv6",
    Port = 123
};
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

ipInstanceProps := &IpInstanceProps{
	Service: service,

	// the properties below are optional
	CustomAttributes: map[string]*string{
		"customAttributesKey": jsii.String("customAttributes"),
	},
	InstanceId: jsii.String("instanceId"),
	Ipv4: jsii.String("ipv4"),
	Ipv6: jsii.String("ipv6"),
	Port: jsii.Number(123),
}

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.
instanceIdoptionalstringinstance_idoptionalstrinstanceIdoptionalStringInstanceIdoptionalstringInstanceIdoptional*string #
The id of the instance resource.

Default: Automatically generated name

ipv4optionalstringipv4optionalstripv4optionalStringIpv4optionalstringIpv4optional*string = none #
If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record.
ipv6optionalstringipv6optionalstripv6optionalStringIpv6optionalstringIpv6optional*string = none #
If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record.
portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64 = 80 #
The port on the endpoint that you want AWS Cloud Map to perform health checks on.

This value is also used for the port value in an SRV record if the service that you specify includes an SRV record. You can also specify a default port that is applied to all instances in the Service configuration.

serviceIServiceserviceIServiceserviceIServiceServiceIServiceServiceIService required #
The Cloudmap service this resource is registered to.