Backend

class aws_cdk.aws_appmesh.Backend

Bases: object

Contains static factory methods to create backends.

ExampleMetadata:

infused

Example:

# mesh: appmesh.Mesh
# router: appmesh.VirtualRouter
# 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=cdk.Duration.seconds(5),
            path="/ping",
            timeout=cdk.Duration.seconds(2),
            unhealthy_threshold=2
        ),
        timeout=appmesh.HttpTimeout(
            idle=cdk.Duration.seconds(5)
        )
    )],
    access_log=appmesh.AccessLog.from_file_path("/dev/stdout")
)

virtual_service = appmesh.VirtualService(self, "service-1",
    virtual_service_provider=appmesh.VirtualServiceProvider.virtual_router(router),
    virtual_service_name="service1.domain.local"
)

node.add_backend(appmesh.Backend.virtual_service(virtual_service))

Methods

abstract bind(_scope)

Return backend config.

Parameters:

_scope (Construct) –

Return type:

BackendConfig

Static Methods

classmethod virtual_service(virtual_service, *, tls_client_policy=None)

Construct a Virtual Service backend.

Parameters:
  • virtual_service (IVirtualService) –

  • tls_client_policy (Union[TlsClientPolicy, Dict[str, Any], None]) – TLS properties for Client policy for the backend. Default: - none

Return type:

Backend