Mesh

class aws_cdk.aws_appmesh.Mesh(scope, id, *, egress_filter=None, mesh_name=None)

Bases: aws_cdk.core.Resource

Define a new AppMesh mesh.

see :see: https://docs.aws.amazon.com/app-mesh/latest/userguide/meshes.html stability :stability: experimental

__init__(scope, id, *, egress_filter=None, mesh_name=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • egress_filter (Optional[MeshFilterType]) – Egress filter to be applied to the Mesh. Default: DROP_ALL

  • mesh_name (Optional[str]) – The name of the Mesh being defined. Default: - A name is autmoatically generated

stability :stability: experimental

Return type

None

Methods

add_virtual_node(id, *, backends=None, cloud_map_service=None, cloud_map_service_instance_attributes=None, dns_host_name=None, listener=None, virtual_node_name=None)

Adds a VirtualNode to the Mesh.

Parameters
  • id (str) –

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

  • cloud_map_service (Optional[IService]) – CloudMap service where Virtual Node members register themselves. Instances registering themselves into this CloudMap will be considered part of the Virtual Node. Default: - Don’t use CloudMap-based service discovery

  • cloud_map_service_instance_attributes (Optional[Mapping[str, str]]) – Filter down the list of CloudMap service instance. Default: - No CloudMap instance filter

  • dns_host_name (Optional[str]) – Host name of DNS record used to discover Virtual Node members. The IP addresses returned by querying this DNS record will be considered part of the Virtual Node. Default: - Don’t use DNS-based service discovery

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

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

stability :stability: experimental

Return type

VirtualNode

add_virtual_router(id, *, listener=None, virtual_router_name=None)

Adds a VirtualRouter to the Mesh with the given id and props.

Parameters
  • id (str) –

  • listener (Optional[Listener]) – Listener specification for the virtual router. Default: - A listener on HTTP port 8080

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

stability :stability: experimental

Return type

VirtualRouter

add_virtual_service(id, *, virtual_node=None, virtual_router=None, virtual_service_name=None)

Adds a VirtualService with the given id.

Parameters
  • id (str) –

  • virtual_node (Optional[IVirtualNode]) – The VirtualNode attached to the virtual service. Default: - At most one of virtualRouter and virtualNode is allowed.

  • virtual_router (Optional[IVirtualRouter]) – The VirtualRouter which the VirtualService uses as provider. Default: - At most one of virtualRouter and virtualNode is allowed.

  • virtual_service_name (Optional[str]) – The name of the VirtualService. It is recommended this follows the fully-qualified domain name format, such as “my-service.default.svc.cluster.local”. Default: - A name is automatically generated

stability :stability: experimental

Return type

VirtualService

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

mesh_arn

The Amazon Resource Name (ARN) of the AppMesh mesh.

stability :stability: experimental

Return type

str

mesh_name

The name of the AppMesh mesh.

stability :stability: experimental

Return type

str

node

The construct tree node associated with this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

Static Methods

classmethod from_mesh_arn(scope, id, mesh_arn)

Import an existing mesh by arn.

Parameters
  • scope (Construct) –

  • id (str) –

  • mesh_arn (str) –

stability :stability: experimental

Return type

IMesh

classmethod from_mesh_name(scope, id, mesh_name)

Import an existing mesh by name.

Parameters
  • scope (Construct) –

  • id (str) –

  • mesh_name (str) –

stability :stability: experimental

Return type

IMesh

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool