Skip to content
v2.276.0

InstanceReference Struct ​

A reference to a Instance resource.

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 interfaces_servicediscovery } from 'aws-cdk-lib/interfaces';
const instanceReference: interfaces_servicediscovery.InstanceReference = {
  instanceId: 'instanceId',
  serviceId: 'serviceId',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.interfaces import aws_servicediscovery as interfaces_servicediscovery

instance_reference = interfaces_servicediscovery.InstanceReference(
    instance_id="instanceId",
    service_id="serviceId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.interfaces.servicediscovery.*;

InstanceReference instanceReference = InstanceReference.builder()
        .instanceId("instanceId")
        .serviceId("serviceId")
        .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.Interfaces.ServiceDiscovery;

var instanceReference = new InstanceReference {
    InstanceId = "instanceId",
    ServiceId = "serviceId"
};
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"

instanceReference := &InstanceReference{
	InstanceId: jsii.String("instanceId"),
	ServiceId: jsii.String("serviceId"),
}

Properties ​

instanceIdstringinstance_idstrinstanceIdStringInstanceIdstringInstanceId*stringrequired#
The InstanceId of the Instance resource.
serviceIdstringservice_idstrserviceIdStringServiceIdstringServiceId*stringrequired#
The ServiceId of the Instance resource.