Skip to main content

virtual_services

Creates, updates, deletes, gets or lists a virtual_services resource.

Overview

Namevirtual_services
TypeResource
Idaws.appmesh.virtual_services

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
mesh_namestringThe name of the service mesh that the virtual service resides in.
metadataobjectAn object that represents metadata for a resource.
specobjectAn object that represents the specification of a virtual service.
statusobjectThe current status of the virtual service.
virtual_service_namestringThe name of the virtual service.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_virtual_serviceselectmesh_name, virtual_service_name, regionmeshOwnerDescribes an existing virtual service.
list_virtual_servicesselectmesh_name, regionlimit, meshOwner, nextTokenReturns a list of existing virtual services in a service mesh.
create_virtual_serviceinsertmesh_name, region, spec, virtualServiceNamemeshOwnerCreates a virtual service within a service mesh. A virtual service is an abstraction of a real service that is provided by a virtual node directly or indirectly by means of a virtual router. Dependent services call your virtual service by its virtualServiceName, and those requests are routed to the virtual node or virtual router that is specified as the provider for the virtual service. For more information about virtual services, see Virtual services.
update_virtual_serviceupdatemesh_name, virtual_service_name, region, specmeshOwnerUpdates an existing virtual service in a specified service mesh.
delete_virtual_servicedeletemesh_name, virtual_service_name, regionmeshOwnerDeletes an existing virtual service.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
mesh_namestringThe name of the service mesh to delete the virtual service in.
regionstringAWS region (default: us-east-1)
virtual_service_namestringThe name of the virtual service to delete.
limitintegerThe maximum number of results returned by ListVirtualServices in paginated output. When you use this parameter, ListVirtualServices returns only limit results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListVirtualServices request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListVirtualServices returns up to 100 results and a nextToken value if applicable.
meshOwnerstringThe Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.
nextTokenstringThe nextToken value returned from a previous paginated ListVirtualServices request where limit was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.

SELECT examples

Describes an existing virtual service.

SELECT
mesh_name,
metadata,
spec,
status,
virtual_service_name
FROM aws.appmesh.virtual_services
WHERE mesh_name = '{{ mesh_name }}' -- required
AND virtual_service_name = '{{ virtual_service_name }}' -- required
AND region = '{{ region }}' -- required
AND meshOwner = '{{ meshOwner }}'
;

INSERT examples

Creates a virtual service within a service mesh. A virtual service is an abstraction of a real service that is provided by a virtual node directly or indirectly by means of a virtual router. Dependent services call your virtual service by its virtualServiceName, and those requests are routed to the virtual node or virtual router that is specified as the provider for the virtual service. For more information about virtual services, see Virtual services.

INSERT INTO aws.appmesh.virtual_services (
clientToken,
spec,
tags,
virtualServiceName,
mesh_name,
region,
meshOwner
)
SELECT
'{{ clientToken }}',
'{{ spec }}' /* required */,
'{{ tags }}',
'{{ virtualServiceName }}' /* required */,
'{{ mesh_name }}',
'{{ region }}',
'{{ meshOwner }}'
RETURNING
virtual_service
;

UPDATE examples

Updates an existing virtual service in a specified service mesh.

UPDATE aws.appmesh.virtual_services
SET
clientToken = '{{ clientToken }}',
spec = '{{ spec }}'
WHERE
mesh_name = '{{ mesh_name }}' --required
AND virtual_service_name = '{{ virtual_service_name }}' --required
AND region = '{{ region }}' --required
AND spec = '{{ spec }}' --required
AND meshOwner = '{{ meshOwner}}'
RETURNING
virtual_service;

DELETE examples

Deletes an existing virtual service.

DELETE FROM aws.appmesh.virtual_services
WHERE mesh_name = '{{ mesh_name }}' --required
AND virtual_service_name = '{{ virtual_service_name }}' --required
AND region = '{{ region }}' --required
AND meshOwner = '{{ meshOwner }}'
;