VirtualNodeProps
- class aws_cdk.aws_appmesh.VirtualNodeProps(*, access_log=None, backend_defaults=None, backends=None, listeners=None, service_discovery=None, virtual_node_name=None, mesh)
Bases:
VirtualNodeBaseProps
The properties used when creating a new VirtualNode.
- Parameters:
access_log (
Optional
[AccessLog
]) – Access Logging Configuration for the virtual node. Default: - No access loggingbackend_defaults (
Union
[BackendDefaults
,Dict
[str
,Any
],None
]) – Default Configuration Virtual Node uses to communicate with Virtual Service. Default: - No Configbackends (
Optional
[Sequence
[Backend
]]) – Virtual Services that this is node expected to send outbound traffic to. Default: - No backendslisteners (
Optional
[Sequence
[VirtualNodeListener
]]) – Initial listener for the virtual node. Default: - No listenersservice_discovery (
Optional
[ServiceDiscovery
]) – Defines how upstream clients will discover this VirtualNode. Default: - No Service Discoveryvirtual_node_name (
Optional
[str
]) – The name of the VirtualNode. Default: - A name is automatically determinedmesh (
IMesh
) – The Mesh which the VirtualNode belongs to.
- ExampleMetadata:
infused
Example:
# mesh: appmesh.Mesh # service: cloudmap.Service node = appmesh.VirtualNode(self, "node", mesh=mesh, service_discovery=appmesh.ServiceDiscovery.cloud_map(service), listeners=[appmesh.VirtualNodeListener.http( port=8080, health_check=appmesh.HealthCheck.http( healthy_threshold=3, interval=Duration.seconds(5), path="/ping", timeout=Duration.seconds(2), unhealthy_threshold=2 ), timeout=appmesh.HttpTimeout( idle=Duration.seconds(5) ) )], backend_defaults=appmesh.BackendDefaults( tls_client_policy=appmesh.TlsClientPolicy( validation=appmesh.TlsValidation( trust=appmesh.TlsValidationTrust.file("/keys/local_cert_chain.pem") ) ) ), access_log=appmesh.AccessLog.from_file_path("/dev/stdout") ) cdk.Tags.of(node).add("Environment", "Dev")
Attributes
- access_log
Access Logging Configuration for the virtual node.
- Default:
No access logging
- backend_defaults
Default Configuration Virtual Node uses to communicate with Virtual Service.
- Default:
No Config
- backends
Virtual Services that this is node expected to send outbound traffic to.
- Default:
No backends
- listeners
Initial listener for the virtual node.
- Default:
No listeners
- mesh
The Mesh which the VirtualNode belongs to.
- service_discovery
Defines how upstream clients will discover this VirtualNode.
- Default:
No Service Discovery
- virtual_node_name
The name of the VirtualNode.
- Default:
A name is automatically determined