IMesh

class aws_cdk.aws_appmesh.IMesh(*args, **kwds)

Bases: IResource, Protocol

Interface which all Mesh based classes MUST implement.

Methods

add_virtual_gateway(id, *, access_log=None, backend_defaults=None, listeners=None, virtual_gateway_name=None)

Creates a new VirtualGateway in this Mesh.

Note that the Gateway is created in the same Stack that this Mesh belongs to, which might be different than the current stack.

Parameters:
  • id (str) –

  • access_log (Optional[AccessLog]) – Access Logging Configuration for the VirtualGateway. 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

  • listeners (Optional[Sequence[VirtualGatewayListener]]) – Listeners for the VirtualGateway. Only one is supported. Default: - Single HTTP listener on port 8080

  • virtual_gateway_name (Optional[str]) – Name of the VirtualGateway. Default: - A name is automatically determined

Return type:

VirtualGateway

add_virtual_node(id, *, access_log=None, backend_defaults=None, backends=None, listeners=None, service_discovery=None, virtual_node_name=None)

Creates a new VirtualNode in this Mesh.

Note that the Node is created in the same Stack that this Mesh belongs to, which might be different than the current stack.

Parameters:
  • id (str) –

  • 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

Return type:

VirtualNode

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

Creates a new VirtualRouter in this Mesh.

Note that the Router is created in the same Stack that this Mesh belongs to, which might be different than the current stack.

Parameters:
  • id (str) –

  • listeners (Optional[Sequence[VirtualRouterListener]]) – Listener specification for the VirtualRouter. Default: - A listener on HTTP port 8080

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

Return type:

VirtualRouter

apply_removal_policy(policy)

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:

policy (RemovalPolicy) –

Return type:

None

Attributes

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

mesh_arn

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

Attribute:

true

mesh_name

The name of the AppMesh mesh.

Attribute:

true

node

The construct tree node for this construct.

stack

The stack in which this resource is defined.