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 logging

  • backend_defaults (Union[BackendDefaults, Dict[str, Any], None]) – Default Configuration Virtual Node uses to communicate with Virtual Service. Default: - No Config

  • backends (Optional[Sequence[Backend]]) – Virtual Services that this is node expected to send outbound traffic to. Default: - No backends

  • listeners (Optional[Sequence[VirtualNodeListener]]) – Initial listener for the virtual node. Default: - No listeners

  • service_discovery (Optional[ServiceDiscovery]) – Defines how upstream clients will discover this VirtualNode. Default: - No Service Discovery

  • virtual_node_name (Optional[str]) – The name of the VirtualNode. Default: - A name is automatically determined

  • mesh (IMesh) – The Mesh which the VirtualNode belongs to.

ExampleMetadata:

infused

Example:

# A Virtual Node with a gRPC listener with a connection pool set
# mesh: appmesh.Mesh

node = appmesh.VirtualNode(self, "node",
    mesh=mesh,
    # DNS service discovery can optionally specify the DNS response type as either LOAD_BALANCER or ENDPOINTS.
    # LOAD_BALANCER means that the DNS resolver returns a loadbalanced set of endpoints,
    # whereas ENDPOINTS means that the DNS resolver is returning all the endpoints.
    # By default, the response type is assumed to be LOAD_BALANCER
    service_discovery=appmesh.ServiceDiscovery.dns("node", appmesh.DnsResponseType.ENDPOINTS),
    listeners=[appmesh.VirtualNodeListener.http(
        port=80,
        connection_pool=appmesh.HttpConnectionPool(
            max_connections=100,
            max_pending_requests=10
        )
    )]
)

# A Virtual Gateway with a gRPC listener with a connection pool set
gateway = appmesh.VirtualGateway(self, "gateway",
    mesh=mesh,
    listeners=[appmesh.VirtualGatewayListener.grpc(
        port=8080,
        connection_pool=appmesh.GrpcConnectionPool(
            max_requests=10
        )
    )],
    virtual_gateway_name="gateway"
)

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