class VirtualService (construct)
Language | Type name |
---|---|
![]() | aws_cdk.aws_appmesh.VirtualService |
![]() | software.amazon.awscdk.services.appmesh.VirtualService |
![]() | Amazon.CDK.AWS.AppMesh.VirtualService |
![]() | @aws-cdk/aws-appmesh.VirtualService |
Implements
IConstruct
, IResource
, IVirtual
VirtualService represents a service inside an AppMesh.
It routes traffic either to a Virtual Node or to a Virtual Router.
Initializer
new VirtualService(scope: Construct, id: string, props: VirtualServiceProps)
Parameters
- scope
Construct
- id
string
- props
Virtual
Service Props
Construct Props
Name | Type | Description |
---|---|---|
mesh | IMesh | The AppMesh mesh name for which the VirtualService belongs to. |
virtual | IVirtual | The VirtualNode attached to the virtual service. |
virtual | IVirtual | The VirtualRouter which the VirtualService uses as provider. |
virtual | string | The name of the VirtualService. |
mesh
Type:
IMesh
The AppMesh mesh name for which the VirtualService belongs to.
virtualNode?
Type:
IVirtual
(optional, default: At most one of virtualRouter and virtualNode is allowed.)
The VirtualNode attached to the virtual service.
virtualRouter?
Type:
IVirtual
(optional, default: At most one of virtualRouter and virtualNode is allowed.)
The VirtualRouter which the VirtualService uses as provider.
virtualServiceName?
Type:
string
(optional, default: A name is automatically generated)
The name of the VirtualService.
It is recommended this follows the fully-qualified domain name format, such as "my-service.default.svc.cluster.local".
Properties
Name | Type | Description |
---|---|---|
node | Construct | Construct tree node which offers APIs for interacting with the construct tree. |
stack | Stack | The stack in which this resource is defined. |
virtual | string | The Amazon Resource Name (ARN) for the virtual service. |
virtual | string | The name of the VirtualService, it is recommended this follows the fully-qualified domain name format. |
node
Type:
Construct
Construct tree node which offers APIs for interacting with the construct tree.
stack
Type:
Stack
The stack in which this resource is defined.
virtualServiceArn
Type:
string
The Amazon Resource Name (ARN) for the virtual service.
virtualServiceName
Type:
string
The name of the VirtualService, it is recommended this follows the fully-qualified domain name format.
Methods
Name | Description |
---|---|
to | Returns a string representation of this construct. |
static from | Import an existing VirtualService given an ARN. |
static from | Import an existing VirtualService given mesh and service names. |
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
VirtualServiceArn(scope, id, virtualServiceArn)
static frompublic static fromVirtualServiceArn(scope: Construct, id: string, virtualServiceArn: string): IVirtualService
Parameters
- scope
Construct
- id
string
- virtualServiceArn
string
Returns
Import an existing VirtualService given an ARN.
VirtualServiceName(scope, id, meshName, virtualServiceName)
static frompublic static fromVirtualServiceName(scope: Construct, id: string, meshName: string, virtualServiceName: string): IVirtualService
Parameters
- scope
Construct
- id
string
- meshName
string
- virtualServiceName
string
Returns
Import an existing VirtualService given mesh and service names.