@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.505Z") @Stability(value=Stable) public class CfnVirtualNode extends CfnResource implements IInspectable
Creates a virtual node within a service mesh.
A virtual node acts as a logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. When you create a virtual node, you can specify the service discovery information for your task group, and whether the proxy running in a task group will communicate with other proxies using Transport Layer Security (TLS).
You define a listener for any inbound traffic that your virtual node expects. Any virtual service that your virtual node expects to communicate to is specified as a backend .
The response metadata for your new virtual node contains the arn that is associated with the virtual node. Set this value to the full ARN; for example, arn:aws:appmesh:us-west-2:123456789012:myMesh/default/virtualNode/myApp ) as the APPMESH_RESOURCE_ARN environment variable for your task group's Envoy proxy container in your task definition or pod spec. This is then mapped to the node.id and node.cluster Envoy parameters.
By default, App Mesh uses the name of the resource you specified in
APPMESH_RESOURCE_ARNwhen Envoy is referring to itself in metrics and traces. You can override this behavior by setting theAPPMESH_RESOURCE_CLUSTERenvironment variable with your own name.
For more information about virtual nodes, see Virtual nodes . You must be using 1.15.0 or later of the Envoy image when setting these variables. For more information about App Mesh Envoy variables, see Envoy image in the AWS App Mesh User Guide.
Example:
// 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.*;
CfnVirtualNode cfnVirtualNode = CfnVirtualNode.Builder.create(this, "MyCfnVirtualNode")
.meshName("meshName")
.spec(VirtualNodeSpecProperty.builder()
.backendDefaults(BackendDefaultsProperty.builder()
.clientPolicy(ClientPolicyProperty.builder()
.tls(ClientPolicyTlsProperty.builder()
.validation(TlsValidationContextProperty.builder()
.trust(TlsValidationContextTrustProperty.builder()
.acm(TlsValidationContextAcmTrustProperty.builder()
.certificateAuthorityArns(List.of("certificateAuthorityArns"))
.build())
.file(TlsValidationContextFileTrustProperty.builder()
.certificateChain("certificateChain")
.build())
.sds(TlsValidationContextSdsTrustProperty.builder()
.secretName("secretName")
.build())
.build())
// the properties below are optional
.subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
.match(SubjectAlternativeNameMatchersProperty.builder()
.exact(List.of("exact"))
.build())
.build())
.build())
// the properties below are optional
.certificate(ClientTlsCertificateProperty.builder()
.file(ListenerTlsFileCertificateProperty.builder()
.certificateChain("certificateChain")
.privateKey("privateKey")
.build())
.sds(ListenerTlsSdsCertificateProperty.builder()
.secretName("secretName")
.build())
.build())
.enforce(false)
.ports(List.of(123))
.build())
.build())
.build())
.backends(List.of(BackendProperty.builder()
.virtualService(VirtualServiceBackendProperty.builder()
.virtualServiceName("virtualServiceName")
// the properties below are optional
.clientPolicy(ClientPolicyProperty.builder()
.tls(ClientPolicyTlsProperty.builder()
.validation(TlsValidationContextProperty.builder()
.trust(TlsValidationContextTrustProperty.builder()
.acm(TlsValidationContextAcmTrustProperty.builder()
.certificateAuthorityArns(List.of("certificateAuthorityArns"))
.build())
.file(TlsValidationContextFileTrustProperty.builder()
.certificateChain("certificateChain")
.build())
.sds(TlsValidationContextSdsTrustProperty.builder()
.secretName("secretName")
.build())
.build())
// the properties below are optional
.subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
.match(SubjectAlternativeNameMatchersProperty.builder()
.exact(List.of("exact"))
.build())
.build())
.build())
// the properties below are optional
.certificate(ClientTlsCertificateProperty.builder()
.file(ListenerTlsFileCertificateProperty.builder()
.certificateChain("certificateChain")
.privateKey("privateKey")
.build())
.sds(ListenerTlsSdsCertificateProperty.builder()
.secretName("secretName")
.build())
.build())
.enforce(false)
.ports(List.of(123))
.build())
.build())
.build())
.build()))
.listeners(List.of(ListenerProperty.builder()
.portMapping(PortMappingProperty.builder()
.port(123)
.protocol("protocol")
.build())
// the properties below are optional
.connectionPool(VirtualNodeConnectionPoolProperty.builder()
.grpc(VirtualNodeGrpcConnectionPoolProperty.builder()
.maxRequests(123)
.build())
.http(VirtualNodeHttpConnectionPoolProperty.builder()
.maxConnections(123)
// the properties below are optional
.maxPendingRequests(123)
.build())
.http2(VirtualNodeHttp2ConnectionPoolProperty.builder()
.maxRequests(123)
.build())
.tcp(VirtualNodeTcpConnectionPoolProperty.builder()
.maxConnections(123)
.build())
.build())
.healthCheck(HealthCheckProperty.builder()
.healthyThreshold(123)
.intervalMillis(123)
.protocol("protocol")
.timeoutMillis(123)
.unhealthyThreshold(123)
// the properties below are optional
.path("path")
.port(123)
.build())
.outlierDetection(OutlierDetectionProperty.builder()
.baseEjectionDuration(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.interval(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.maxEjectionPercent(123)
.maxServerErrors(123)
.build())
.timeout(ListenerTimeoutProperty.builder()
.grpc(GrpcTimeoutProperty.builder()
.idle(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.perRequest(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.build())
.http(HttpTimeoutProperty.builder()
.idle(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.perRequest(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.build())
.http2(HttpTimeoutProperty.builder()
.idle(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.perRequest(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.build())
.tcp(TcpTimeoutProperty.builder()
.idle(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
.build())
.build())
.tls(ListenerTlsProperty.builder()
.certificate(ListenerTlsCertificateProperty.builder()
.acm(ListenerTlsAcmCertificateProperty.builder()
.certificateArn("certificateArn")
.build())
.file(ListenerTlsFileCertificateProperty.builder()
.certificateChain("certificateChain")
.privateKey("privateKey")
.build())
.sds(ListenerTlsSdsCertificateProperty.builder()
.secretName("secretName")
.build())
.build())
.mode("mode")
// the properties below are optional
.validation(ListenerTlsValidationContextProperty.builder()
.trust(ListenerTlsValidationContextTrustProperty.builder()
.file(TlsValidationContextFileTrustProperty.builder()
.certificateChain("certificateChain")
.build())
.sds(TlsValidationContextSdsTrustProperty.builder()
.secretName("secretName")
.build())
.build())
// the properties below are optional
.subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
.match(SubjectAlternativeNameMatchersProperty.builder()
.exact(List.of("exact"))
.build())
.build())
.build())
.build())
.build()))
.logging(LoggingProperty.builder()
.accessLog(AccessLogProperty.builder()
.file(FileAccessLogProperty.builder()
.path("path")
// the properties below are optional
.format(LoggingFormatProperty.builder()
.json(List.of(JsonFormatRefProperty.builder()
.key("key")
.value("value")
.build()))
.text("text")
.build())
.build())
.build())
.build())
.serviceDiscovery(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())
.build())
// the properties below are optional
.meshOwner("meshOwner")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.virtualNodeName("virtualNodeName")
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnVirtualNode.AccessLogProperty
An object that represents the access logging information for a virtual node.
|
static interface |
CfnVirtualNode.AwsCloudMapInstanceAttributeProperty
An object that represents the AWS Cloud Map attribute information for your virtual node.
|
static interface |
CfnVirtualNode.AwsCloudMapServiceDiscoveryProperty
An object that represents the AWS Cloud Map service discovery information for your virtual node.
|
static interface |
CfnVirtualNode.BackendDefaultsProperty
An object that represents the default properties for a backend.
|
static interface |
CfnVirtualNode.BackendProperty
An object that represents the backends that a virtual node is expected to send outbound traffic to.
|
static class |
CfnVirtualNode.Builder
A fluent builder for
CfnVirtualNode. |
static interface |
CfnVirtualNode.ClientPolicyProperty
An object that represents a client policy.
|
static interface |
CfnVirtualNode.ClientPolicyTlsProperty
A reference to an object that represents a Transport Layer Security (TLS) client policy.
|
static interface |
CfnVirtualNode.ClientTlsCertificateProperty
An object that represents the client's certificate.
|
static interface |
CfnVirtualNode.DnsServiceDiscoveryProperty
An object that represents the DNS service discovery information for your virtual node.
|
static interface |
CfnVirtualNode.DurationProperty
An object that represents a duration of time.
|
static interface |
CfnVirtualNode.FileAccessLogProperty
An object that represents an access log file.
|
static interface |
CfnVirtualNode.GrpcTimeoutProperty
An object that represents types of timeouts.
|
static interface |
CfnVirtualNode.HealthCheckProperty
An object that represents the health check policy for a virtual node's listener.
|
static interface |
CfnVirtualNode.HttpTimeoutProperty
An object that represents types of timeouts.
|
static interface |
CfnVirtualNode.JsonFormatRefProperty
Example:
|
static interface |
CfnVirtualNode.ListenerProperty
An object that represents a listener for a virtual node.
|
static interface |
CfnVirtualNode.ListenerTimeoutProperty
An object that represents timeouts for different protocols.
|
static interface |
CfnVirtualNode.ListenerTlsAcmCertificateProperty
An object that represents an AWS Certificate Manager certificate.
|
static interface |
CfnVirtualNode.ListenerTlsCertificateProperty
An object that represents a listener's Transport Layer Security (TLS) certificate.
|
static interface |
CfnVirtualNode.ListenerTlsFileCertificateProperty
An object that represents a local file certificate.
|
static interface |
CfnVirtualNode.ListenerTlsProperty
An object that represents the Transport Layer Security (TLS) properties for a listener.
|
static interface |
CfnVirtualNode.ListenerTlsSdsCertificateProperty
An object that represents the listener's Secret Discovery Service certificate.
|
static interface |
CfnVirtualNode.ListenerTlsValidationContextProperty
An object that represents a listener's Transport Layer Security (TLS) validation context.
|
static interface |
CfnVirtualNode.ListenerTlsValidationContextTrustProperty
An object that represents a listener's Transport Layer Security (TLS) validation context trust.
|
static interface |
CfnVirtualNode.LoggingFormatProperty
Example:
|
static interface |
CfnVirtualNode.LoggingProperty
An object that represents the logging information for a virtual node.
|
static interface |
CfnVirtualNode.OutlierDetectionProperty
An object that represents the outlier detection for a virtual node's listener.
|
static interface |
CfnVirtualNode.PortMappingProperty
An object representing a virtual node or virtual router listener port mapping.
|
static interface |
CfnVirtualNode.ServiceDiscoveryProperty
An object that represents the service discovery information for a virtual node.
|
static interface |
CfnVirtualNode.SubjectAlternativeNameMatchersProperty
An object that represents the methods by which a subject alternative name on a peer Transport Layer Security (TLS) certificate can be matched.
|
static interface |
CfnVirtualNode.SubjectAlternativeNamesProperty
An object that represents the subject alternative names secured by the certificate.
|
static interface |
CfnVirtualNode.TcpTimeoutProperty
An object that represents types of timeouts.
|
static interface |
CfnVirtualNode.TlsValidationContextAcmTrustProperty
An object that represents a Transport Layer Security (TLS) validation context trust for an AWS Certificate Manager certificate.
|
static interface |
CfnVirtualNode.TlsValidationContextFileTrustProperty
An object that represents a Transport Layer Security (TLS) validation context trust for a local file.
|
static interface |
CfnVirtualNode.TlsValidationContextProperty
An object that represents how the proxy will validate its peer during Transport Layer Security (TLS) negotiation.
|
static interface |
CfnVirtualNode.TlsValidationContextSdsTrustProperty
An object that represents a Transport Layer Security (TLS) Secret Discovery Service validation context trust.
|
static interface |
CfnVirtualNode.TlsValidationContextTrustProperty
An object that represents a Transport Layer Security (TLS) validation context trust.
|
static interface |
CfnVirtualNode.VirtualNodeConnectionPoolProperty
An object that represents the type of virtual node connection pool.
|
static interface |
CfnVirtualNode.VirtualNodeGrpcConnectionPoolProperty
An object that represents a type of connection pool.
|
static interface |
CfnVirtualNode.VirtualNodeHttp2ConnectionPoolProperty
An object that represents a type of connection pool.
|
static interface |
CfnVirtualNode.VirtualNodeHttpConnectionPoolProperty
An object that represents a type of connection pool.
|
static interface |
CfnVirtualNode.VirtualNodeSpecProperty
An object that represents the specification of a virtual node.
|
static interface |
CfnVirtualNode.VirtualNodeTcpConnectionPoolProperty
An object that represents a type of connection pool.
|
static interface |
CfnVirtualNode.VirtualServiceBackendProperty
An object that represents a virtual service backend for a virtual node.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnVirtualNode(software.constructs.Construct scope,
String id,
CfnVirtualNodeProps props)
Create a new `AWS::AppMesh::VirtualNode`.
|
protected |
CfnVirtualNode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnVirtualNode(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The full Amazon Resource Name (ARN) for the virtual node.
|
String |
getAttrMeshName()
The name of the service mesh that the virtual node resides in.
|
String |
getAttrMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
String |
getAttrResourceOwner()
The AWS IAM account ID of the resource owner.
|
String |
getAttrUid()
The unique identifier for the virtual node.
|
String |
getAttrVirtualNodeName()
The name of the virtual node.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getMeshName()
The name of the service mesh to create the virtual node in.
|
String |
getMeshOwner()
The AWS IAM account ID of the service mesh owner.
|
Object |
getSpec()
The virtual node specification to apply.
|
TagManager |
getTags()
Optional metadata that you can apply to the virtual node to assist with categorization and organization.
|
String |
getVirtualNodeName()
The name to use for the virtual node.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setMeshName(String value)
The name of the service mesh to create the virtual node in.
|
void |
setMeshOwner(String value)
The AWS IAM account ID of the service mesh owner.
|
void |
setSpec(CfnVirtualNode.VirtualNodeSpecProperty value)
The virtual node specification to apply.
|
void |
setSpec(IResolvable value)
The virtual node specification to apply.
|
void |
setVirtualNodeName(String value)
The name to use for the virtual node.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnVirtualNode(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnVirtualNode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnVirtualNode(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnVirtualNodeProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrMeshName()
@Stability(value=Stable) @NotNull public String getAttrMeshOwner()
If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with Shared Meshes .
@Stability(value=Stable) @NotNull public String getAttrResourceOwner()
If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with Shared Meshes .
@Stability(value=Stable) @NotNull public String getAttrUid()
@Stability(value=Stable) @NotNull public String getAttrVirtualNodeName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
@Stability(value=Stable) @NotNull public String getMeshName()
@Stability(value=Stable)
public void setMeshName(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getSpec()
@Stability(value=Stable)
public void setSpec(@NotNull
CfnVirtualNode.VirtualNodeSpecProperty value)
@Stability(value=Stable)
public void setSpec(@NotNull
IResolvable value)
@Stability(value=Stable) @Nullable public String getMeshOwner()
If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .
@Stability(value=Stable)
public void setMeshOwner(@Nullable
String value)
If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .
@Stability(value=Stable) @Nullable public String getVirtualNodeName()
@Stability(value=Stable)
public void setVirtualNodeName(@Nullable
String value)
Copyright © 2022. All rights reserved.