AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

VirtualService

VirtualService represents a service inside an AppMesh. It routes traffic either to a Virtual Node or to a Virtual Router.

Import

import { VirtualService } from 'aws-cdk-lib/aws-appmesh';

Or use the module namespace:

import * as appmesh from 'aws-cdk-lib/aws-appmesh';
// appmesh.VirtualService

Properties

Configuration passed to the constructor as VirtualServiceProps.

virtualServiceProviderRequired
VirtualServiceProvider

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

virtualServiceNameOptional
string

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

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter