Class VirtualService
VirtualService represents a service inside an AppMesh.
Inherited Members
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VirtualService : Resource, IVirtualService, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class VirtualService Inherits Resource Implements IVirtualService, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused
Examples
Mesh mesh;
var node = new VirtualNode(this, "node", new VirtualNodeProps {
Mesh = mesh,
ServiceDiscovery = ServiceDiscovery.Dns("node")
});
var virtualService = new VirtualService(this, "service-1", new VirtualServiceProps {
VirtualServiceProvider = VirtualServiceProvider.VirtualNode(node),
VirtualServiceName = "service1.domain.local"
});
node.AddBackend(Backend.VirtualService(virtualService));
Synopsis
Constructors
| VirtualService(Construct, string, IVirtualServiceProps) | VirtualService represents a service inside an AppMesh. |
Properties
| Mesh | The Mesh which the VirtualService belongs to. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
| VirtualServiceArn | The Amazon Resource Name (ARN) for the virtual service. |
| VirtualServiceName | The name of the VirtualService, it is recommended this follows the fully-qualified domain name format. |
Methods
| FromVirtualServiceArn(Construct, string, string) | Import an existing VirtualService given an ARN. |
| FromVirtualServiceAttributes(Construct, string, IVirtualServiceAttributes) | Import an existing VirtualService given its attributes. |
Constructors
VirtualService(Construct, string, IVirtualServiceProps)
VirtualService represents a service inside an AppMesh.
public VirtualService(Construct scope, string id, IVirtualServiceProps props)
Parameters
- scope Construct
- id string
- props IVirtualServiceProps
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused
Examples
Mesh mesh;
var node = new VirtualNode(this, "node", new VirtualNodeProps {
Mesh = mesh,
ServiceDiscovery = ServiceDiscovery.Dns("node")
});
var virtualService = new VirtualService(this, "service-1", new VirtualServiceProps {
VirtualServiceProvider = VirtualServiceProvider.VirtualNode(node),
VirtualServiceName = "service1.domain.local"
});
node.AddBackend(Backend.VirtualService(virtualService));
Properties
Mesh
The Mesh which the VirtualService belongs to.
public virtual IMesh Mesh { get; }
Property Value
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused
VirtualServiceArn
The Amazon Resource Name (ARN) for the virtual service.
public virtual string VirtualServiceArn { get; }
Property Value
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused
VirtualServiceName
The name of the VirtualService, it is recommended this follows the fully-qualified domain name format.
public virtual string VirtualServiceName { get; }
Property Value
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused
Methods
FromVirtualServiceArn(Construct, string, string)
Import an existing VirtualService given an ARN.
public static IVirtualService FromVirtualServiceArn(Construct scope, string id, string virtualServiceArn)
Parameters
Returns
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused
FromVirtualServiceAttributes(Construct, string, IVirtualServiceAttributes)
Import an existing VirtualService given its attributes.
public static IVirtualService FromVirtualServiceAttributes(Construct scope, string id, IVirtualServiceAttributes attrs)
Parameters
- scope Construct
- id string
- attrs IVirtualServiceAttributes
Returns
Remarks
It routes traffic either to a Virtual Node or to a Virtual Router.
See: https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html
ExampleMetadata: infused