AWS.AppMesh (2018-10-01) — AWS SDK for JavaScript (original) (raw)
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
AWS App Mesh is a service mesh based on the Envoy proxy that makes it easy to monitor and control containerized microservices. App Mesh standardizes how your microservices communicate, giving you end-to-end visibility and helping to ensure high-availability for your applications.
App Mesh gives you consistent visibility and network traffic controls for every microservice in an application. You can use App Mesh with Amazon ECS (using the Amazon EC2 launch type), Amazon EKS, and Kubernetes on AWS.
Note: App Mesh supports containerized microservice applications that use service discovery naming for their components. To use App Mesh, you must have a containerized application running on Amazon EC2 instances, hosted in either Amazon ECS, Amazon EKS, or Kubernetes on AWS. For more information about service discovery on Amazon ECS, see Service Discovery in the Amazon Elastic Container Service Developer Guide. Kubernetes kube-dns
is supported. For more information, see DNS for Services and Pods in the Kubernetes documentation.
Sending a Request Using AppMesh
var appmesh = new AWS.AppMesh();
appmesh.createMesh(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the AppMesh object uses this specific API, you can construct the object by passing the apiVersion
option to the constructor:
var appmesh = new AWS.AppMesh({apiVersion: '2018-10-01'});
You can also set the API version globally in AWS.config.apiVersions
using the appmesh service identifier:
AWS.config.apiVersions = {
appmesh: '2018-10-01',
// other service API versions
};
var appmesh = new AWS.AppMesh();
Constructor Summarycollapse
- new AWS.AppMesh(options = {}) ⇒ Object constructor
Constructs a service object.
Property Summarycollapse
- endpoint ⇒ AWS.Endpoint readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summarycollapse
- createMesh(params = {}, callback) ⇒ AWS.Request
Creates a new service mesh. - createRoute(params = {}, callback) ⇒ AWS.Request
Creates a new route that is associated with a virtual router.
You can use theprefix
parameter in your route specification for path-based routing of requests. - createVirtualNode(params = {}, callback) ⇒ AWS.Request
Creates a new virtual node within a service mesh.
A virtual node acts as logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. - createVirtualRouter(params = {}, callback) ⇒ AWS.Request
Creates a new virtual router within a service mesh.
Virtual routers handle traffic for one or more service names within your mesh. - deleteMesh(params = {}, callback) ⇒ AWS.Request
Deletes an existing service mesh.
You must delete all resources (routes, virtual routers, virtual nodes) in the service mesh before you can delete the mesh itself.
. - deleteRoute(params = {}, callback) ⇒ AWS.Request
Deletes an existing route.
. - deleteVirtualNode(params = {}, callback) ⇒ AWS.Request
Deletes an existing virtual node.
. - deleteVirtualRouter(params = {}, callback) ⇒ AWS.Request
Deletes an existing virtual router.
You must delete any routes associated with the virtual router before you can delete the router itself.
. - describeMesh(params = {}, callback) ⇒ AWS.Request
Describes an existing service mesh.
. - describeRoute(params = {}, callback) ⇒ AWS.Request
Describes an existing route.
. - describeVirtualNode(params = {}, callback) ⇒ AWS.Request
Describes an existing virtual node.
. - describeVirtualRouter(params = {}, callback) ⇒ AWS.Request
Describes an existing virtual router.
. - listMeshes(params = {}, callback) ⇒ AWS.Request
Returns a list of existing service meshes.
. - listRoutes(params = {}, callback) ⇒ AWS.Request
Returns a list of existing routes in a service mesh.
. - listVirtualNodes(params = {}, callback) ⇒ AWS.Request
Returns a list of existing virtual nodes.
. - listVirtualRouters(params = {}, callback) ⇒ AWS.Request
Returns a list of existing virtual routers in a service mesh.
. - updateRoute(params = {}, callback) ⇒ AWS.Request
Updates an existing route for a specified service mesh and virtual router.
. - updateVirtualNode(params = {}, callback) ⇒ AWS.Request
Updates an existing virtual node in a specified service mesh.
. - updateVirtualRouter(params = {}, callback) ⇒ AWS.Request
Updates an existing virtual router in a specified service mesh.
.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.AppMesh(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
endpoint ⇒ AWS.Endpoint
Returns an Endpoint object representing the endpoint URL for service requests.
Method Details
createMesh(params = {}, callback) ⇒ AWS.Request
Creates a new service mesh. A service mesh is a logical boundary for network traffic between the services that reside within it.
After you create your service mesh, you can create virtual nodes, virtual routers, and routes to distribute traffic between the applications in your mesh.
createRoute(params = {}, callback) ⇒ AWS.Request
Creates a new route that is associated with a virtual router.
You can use the prefix
parameter in your route specification for path-based routing of requests. For example, if your virtual router service name is my-service.local
, and you want the route to match requests to my-service.local/metrics
, then your prefix should be /metrics
.
If your route matches a request, you can distribute traffic to one or more target virtual nodes with relative weighting.
createVirtualNode(params = {}, callback) ⇒ AWS.Request
Creates a new virtual node within a service mesh.
A virtual node acts as logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. When you create a virtual node, you must specify the DNS service discovery name for your task group.
Any inbound traffic that your virtual node expects should be specified as a listener
. Any outbound traffic that your virtual node expects to reach should be specified as a backend
.
The response metadata for your new virtual node contains the arn
that is associated with the virtual node. Set this value (either the full ARN or the truncated resource name, for example, mesh/default/virtualNode/simpleapp
, as the APPMESH_VIRTUAL_NODE_NAME
environment variable for your task group's Envoy proxy container in your task definition or pod spec. This is then mapped to the node.id
and node.cluster
Envoy parameters.
Note: If you require your Envoy stats or tracing to use a different name, you can override the node.cluster
value that is set by APPMESH_VIRTUAL_NODE_NAME
with the APPMESH_VIRTUAL_NODE_CLUSTER
environment variable.
createVirtualRouter(params = {}, callback) ⇒ AWS.Request
Creates a new virtual router within a service mesh.
Virtual routers handle traffic for one or more service names within your mesh. After you create your virtual router, create and associate routes for your virtual router that direct incoming requests to different virtual nodes.
deleteMesh(params = {}, callback) ⇒ AWS.Request
Deletes an existing service mesh.
You must delete all resources (routes, virtual routers, virtual nodes) in the service mesh before you can delete the mesh itself.
deleteRoute(params = {}, callback) ⇒ AWS.Request
Deletes an existing route.
deleteVirtualNode(params = {}, callback) ⇒ AWS.Request
Deletes an existing virtual node.
deleteVirtualRouter(params = {}, callback) ⇒ AWS.Request
Deletes an existing virtual router.
You must delete any routes associated with the virtual router before you can delete the router itself.
describeMesh(params = {}, callback) ⇒ AWS.Request
Describes an existing service mesh.
describeRoute(params = {}, callback) ⇒ AWS.Request
Describes an existing route.
describeVirtualNode(params = {}, callback) ⇒ AWS.Request
Describes an existing virtual node.
describeVirtualRouter(params = {}, callback) ⇒ AWS.Request
Describes an existing virtual router.
listMeshes(params = {}, callback) ⇒ AWS.Request
Returns a list of existing service meshes.
listRoutes(params = {}, callback) ⇒ AWS.Request
Returns a list of existing routes in a service mesh.
listVirtualNodes(params = {}, callback) ⇒ AWS.Request
Returns a list of existing virtual nodes.
listVirtualRouters(params = {}, callback) ⇒ AWS.Request
Returns a list of existing virtual routers in a service mesh.
updateRoute(params = {}, callback) ⇒ AWS.Request
Updates an existing route for a specified service mesh and virtual router.
updateVirtualNode(params = {}, callback) ⇒ AWS.Request
Updates an existing virtual node in a specified service mesh.
updateVirtualRouter(params = {}, callback) ⇒ AWS.Request
Updates an existing virtual router in a specified service mesh.