Class CfnVirtualNodePropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
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 aboutApp 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.cfnpropertymixins.services.appmesh.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnVirtualNodePropsMixin cfnVirtualNodePropsMixin = CfnVirtualNodePropsMixin.Builder.create(CfnVirtualNodeMixinProps.builder()
.meshName("meshName")
.meshOwner("meshOwner")
.spec(VirtualNodeSpecProperty.builder()
.backendDefaults(BackendDefaultsProperty.builder()
.clientPolicy(ClientPolicyProperty.builder()
.tls(ClientPolicyTlsProperty.builder()
.certificate(ClientTlsCertificateProperty.builder()
.file(ListenerTlsFileCertificateProperty.builder()
.certificateChain("certificateChain")
.privateKey("privateKey")
.build())
.sds(ListenerTlsSdsCertificateProperty.builder()
.secretName("secretName")
.build())
.build())
.enforce(false)
.ports(List.of(123))
.validation(TlsValidationContextProperty.builder()
.subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
.match(SubjectAlternativeNameMatchersProperty.builder()
.exact(List.of("exact"))
.build())
.build())
.trust(TlsValidationContextTrustProperty.builder()
.acm(TlsValidationContextAcmTrustProperty.builder()
.certificateAuthorityArns(List.of("certificateAuthorityArns"))
.build())
.file(TlsValidationContextFileTrustProperty.builder()
.certificateChain("certificateChain")
.build())
.sds(TlsValidationContextSdsTrustProperty.builder()
.secretName("secretName")
.build())
.build())
.build())
.build())
.build())
.build())
.backends(List.of(BackendProperty.builder()
.virtualService(VirtualServiceBackendProperty.builder()
.clientPolicy(ClientPolicyProperty.builder()
.tls(ClientPolicyTlsProperty.builder()
.certificate(ClientTlsCertificateProperty.builder()
.file(ListenerTlsFileCertificateProperty.builder()
.certificateChain("certificateChain")
.privateKey("privateKey")
.build())
.sds(ListenerTlsSdsCertificateProperty.builder()
.secretName("secretName")
.build())
.build())
.enforce(false)
.ports(List.of(123))
.validation(TlsValidationContextProperty.builder()
.subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
.match(SubjectAlternativeNameMatchersProperty.builder()
.exact(List.of("exact"))
.build())
.build())
.trust(TlsValidationContextTrustProperty.builder()
.acm(TlsValidationContextAcmTrustProperty.builder()
.certificateAuthorityArns(List.of("certificateAuthorityArns"))
.build())
.file(TlsValidationContextFileTrustProperty.builder()
.certificateChain("certificateChain")
.build())
.sds(TlsValidationContextSdsTrustProperty.builder()
.secretName("secretName")
.build())
.build())
.build())
.build())
.build())
.virtualServiceName("virtualServiceName")
.build())
.build()))
.listeners(List.of(ListenerProperty.builder()
.connectionPool(VirtualNodeConnectionPoolProperty.builder()
.grpc(VirtualNodeGrpcConnectionPoolProperty.builder()
.maxRequests(123)
.build())
.http(VirtualNodeHttpConnectionPoolProperty.builder()
.maxConnections(123)
.maxPendingRequests(123)
.build())
.http2(VirtualNodeHttp2ConnectionPoolProperty.builder()
.maxRequests(123)
.build())
.tcp(VirtualNodeTcpConnectionPoolProperty.builder()
.maxConnections(123)
.build())
.build())
.healthCheck(HealthCheckProperty.builder()
.healthyThreshold(123)
.intervalMillis(123)
.path("path")
.port(123)
.protocol("protocol")
.timeoutMillis(123)
.unhealthyThreshold(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())
.portMapping(PortMappingProperty.builder()
.port(123)
.protocol("protocol")
.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")
.validation(ListenerTlsValidationContextProperty.builder()
.subjectAlternativeNames(SubjectAlternativeNamesProperty.builder()
.match(SubjectAlternativeNameMatchersProperty.builder()
.exact(List.of("exact"))
.build())
.build())
.trust(ListenerTlsValidationContextTrustProperty.builder()
.file(TlsValidationContextFileTrustProperty.builder()
.certificateChain("certificateChain")
.build())
.sds(TlsValidationContextSdsTrustProperty.builder()
.secretName("secretName")
.build())
.build())
.build())
.build())
.build()))
.logging(LoggingProperty.builder()
.accessLog(AccessLogProperty.builder()
.file(FileAccessLogProperty.builder()
.format(LoggingFormatProperty.builder()
.json(List.of(JsonFormatRefProperty.builder()
.key("key")
.value("value")
.build()))
.text("text")
.build())
.path("path")
.build())
.build())
.build())
.serviceDiscovery(ServiceDiscoveryProperty.builder()
.awsCloudMap(AwsCloudMapServiceDiscoveryProperty.builder()
.attributes(List.of(AwsCloudMapInstanceAttributeProperty.builder()
.key("key")
.value("value")
.build()))
.ipPreference("ipPreference")
.namespaceName("namespaceName")
.serviceName("serviceName")
.build())
.dns(DnsServiceDiscoveryProperty.builder()
.hostname("hostname")
.ipPreference("ipPreference")
.responseType("responseType")
.build())
.build())
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.virtualNodeName("virtualNodeName")
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn object that represents the access logging information for a virtual node.static interfaceAn object that represents the AWS Cloud Map attribute information for your virtual node.static interfaceAn object that represents the AWS Cloud Map service discovery information for your virtual node.static interfaceAn object that represents the default properties for a backend.static interfaceAn object that represents the backends that a virtual node is expected to send outbound traffic to.static final classA fluent builder forCfnVirtualNodePropsMixin.static interfaceAn object that represents a client policy.static interfaceA reference to an object that represents a Transport Layer Security (TLS) client policy.static interfaceAn object that represents the client's certificate.static interfaceAn object that represents the DNS service discovery information for your virtual node.static interfaceAn object that represents a duration of time.static interfaceAn object that represents an access log file.static interfaceAn object that represents types of timeouts.static interfaceAn object that represents the health check policy for a virtual node's listener.static interfaceAn object that represents types of timeouts.static interfaceAn object that represents the key value pairs for the JSON.static interfaceAn object that represents a listener for a virtual node.static interfaceAn object that represents timeouts for different protocols.static interfaceAn object that represents an Certificate Manager certificate.static interfaceAn object that represents a listener's Transport Layer Security (TLS) certificate.static interfaceAn object that represents a local file certificate.static interfaceAn object that represents the Transport Layer Security (TLS) properties for a listener.static interfaceAn object that represents the listener's Secret Discovery Service certificate.static interfaceAn object that represents a listener's Transport Layer Security (TLS) validation context.static interfaceAn object that represents a listener's Transport Layer Security (TLS) validation context trust.static interfaceAn object that represents the format for the logs.static interfaceAn object that represents the logging information for a virtual node.static interfaceAn object that represents the outlier detection for a virtual node's listener.static interfaceAn object representing a virtual node or virtual router listener port mapping.static interfaceAn object that represents the service discovery information for a virtual node.static interfaceAn object that represents the methods by which a subject alternative name on a peer Transport Layer Security (TLS) certificate can be matched.static interfaceAn object that represents the subject alternative names secured by the certificate.static interfaceAn object that represents types of timeouts.static interfaceAn object that represents a Transport Layer Security (TLS) validation context trust for an Certificate Manager certificate.static interfaceAn object that represents a Transport Layer Security (TLS) validation context trust for a local file.static interfaceAn object that represents how the proxy will validate its peer during Transport Layer Security (TLS) negotiation.static interfaceAn object that represents a Transport Layer Security (TLS) Secret Discovery Service validation context trust.static interfaceAn object that represents a Transport Layer Security (TLS) validation context trust.static interfaceAn object that represents the type of virtual node connection pool.static interfaceAn object that represents a type of connection pool.static interfaceAn object that represents a type of connection pool.static interfaceAn object that represents a type of connection pool.static interfaceAn object that represents the specification of a virtual node.static interfaceAn object that represents a type of connection pool.static interfaceAn object that represents a virtual service backend for a virtual node.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::AppMesh::VirtualNode.CfnVirtualNodePropsMixin(CfnVirtualNodeMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::AppMesh::VirtualNode.protectedCfnVirtualNodePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnVirtualNodePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnVirtualNodeMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnVirtualNodePropsMixin
protected CfnVirtualNodePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnVirtualNodePropsMixin
protected CfnVirtualNodePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnVirtualNodePropsMixin
@Stability(Stable) public CfnVirtualNodePropsMixin(@NotNull CfnVirtualNodeMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::AppMesh::VirtualNode.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnVirtualNodePropsMixin
Create a mixin to apply properties toAWS::AppMesh::VirtualNode.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-