VirtualServiceProps

class aws_cdk.aws_appmesh.VirtualServiceProps(*, virtual_service_provider, virtual_service_name=None)

Bases: object

The properties applied to the VirtualService being defined.

Parameters:
  • virtual_service_provider (VirtualServiceProvider) – The VirtualNode or VirtualRouter which the VirtualService uses as its provider.

  • 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”. Example value: service.domain.local Default: - A name is automatically generated

ExampleMetadata:

infused

Example:

# mesh: appmesh.Mesh


node = appmesh.VirtualNode(self, "node",
    mesh=mesh,
    service_discovery=appmesh.ServiceDiscovery.dns("node")
)

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

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

Attributes

virtual_service_name

The name of the VirtualService.

It is recommended this follows the fully-qualified domain name format, such as “my-service.default.svc.cluster.local”.

Example value: service.domain.local

Default:
  • A name is automatically generated

virtual_service_provider

The VirtualNode or VirtualRouter which the VirtualService uses as its provider.