ServiceDiscoveryProperty Struct
An object that represents the service discovery information for a virtual node.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const serviceDiscoveryProperty: appmesh.CfnVirtualNode.ServiceDiscoveryProperty = {
awsCloudMap: {
namespaceName: 'namespaceName',
serviceName: 'serviceName',
// the properties below are optional
attributes: [{
key: 'key',
value: 'value',
}],
ipPreference: 'ipPreference',
},
dns: {
hostname: 'hostname',
// the properties below are optional
ipPreference: 'ipPreference',
responseType: 'responseType',
},
};
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_appmesh as appmesh
service_discovery_property = appmesh.CfnVirtualNode.ServiceDiscoveryProperty(
aws_cloud_map=appmesh.CfnVirtualNode.AwsCloudMapServiceDiscoveryProperty(
namespace_name="namespaceName",
service_name="serviceName",
# the properties below are optional
attributes=[appmesh.CfnVirtualNode.AwsCloudMapInstanceAttributeProperty(
key="key",
value="value"
)],
ip_preference="ipPreference"
),
dns=appmesh.CfnVirtualNode.DnsServiceDiscoveryProperty(
hostname="hostname",
# the properties below are optional
ip_preference="ipPreference",
response_type="responseType"
)
)
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.appmesh.*;
ServiceDiscoveryProperty serviceDiscoveryProperty = ServiceDiscoveryProperty.builder()
.awsCloudMap(AwsCloudMapServiceDiscoveryProperty.builder()
.namespaceName("namespaceName")
.serviceName("serviceName")
// the properties below are optional
.attributes(List.of(AwsCloudMapInstanceAttributeProperty.builder()
.key("key")
.value("value")
.build()))
.ipPreference("ipPreference")
.build())
.dns(DnsServiceDiscoveryProperty.builder()
.hostname("hostname")
// the properties below are optional
.ipPreference("ipPreference")
.responseType("responseType")
.build())
.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.AppMesh;
var serviceDiscoveryProperty = new ServiceDiscoveryProperty {
AwsCloudMap = new AwsCloudMapServiceDiscoveryProperty {
NamespaceName = "namespaceName",
ServiceName = "serviceName",
// the properties below are optional
Attributes = new [] { new AwsCloudMapInstanceAttributeProperty {
Key = "key",
Value = "value"
} },
IpPreference = "ipPreference"
},
Dns = new DnsServiceDiscoveryProperty {
Hostname = "hostname",
// the properties below are optional
IpPreference = "ipPreference",
ResponseType = "responseType"
}
};
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"
serviceDiscoveryProperty := &ServiceDiscoveryProperty{
AwsCloudMap: &AwsCloudMapServiceDiscoveryProperty{
NamespaceName: jsii.String("namespaceName"),
ServiceName: jsii.String("serviceName"),
// the properties below are optional
Attributes: []interface{}{
&AwsCloudMapInstanceAttributeProperty{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
IpPreference: jsii.String("ipPreference"),
},
Dns: &DnsServiceDiscoveryProperty{
Hostname: jsii.String("hostname"),
// the properties below are optional
IpPreference: jsii.String("ipPreference"),
ResponseType: jsii.String("responseType"),
},
}
Properties
awsCloudMapoptionalIResolvable | CfnVirtualNode.aws_cloud_mapoptionaltyping.Union[IResolvable, AwsCloudMapServiceDiscoveryProperty]awsCloudMapoptionalIResolvableAwsCloudMapoptionalIResolvableAwsCloudMapoptionalinterface{} #Specifies any AWS Cloud Map information for the virtual node.
dnsoptionalIResolvable | CfnVirtualNode.dnsoptionaltyping.Union[IResolvable, DnsServiceDiscoveryProperty]dnsoptionalIResolvableDnsoptionalIResolvableDnsoptionalinterface{} #Specifies the DNS information for the virtual node.