[ aws . appmesh ]

create-gateway-route

Description

Creates a gateway route.

A gateway route is attached to a virtual gateway and routes traffic to an existing virtual service. If a route matches a request, it can distribute traffic to a target virtual service.

For more information about gateway routes, see Gateway routes .

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  create-gateway-route
[--client-token <value>]
--gateway-route-name <value>
--mesh-name <value>
[--mesh-owner <value>]
--spec <value>
[--tags <value>]
--virtual-gateway-name <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <value>]

Options

--client-token (string)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.

--gateway-route-name (string)

The name to use for the gateway route.

--mesh-name (string)

The name of the service mesh to create the gateway route in.

--mesh-owner (string)

The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .

--spec (structure)

The gateway route specification to apply.

grpcRoute -> (structure)

An object that represents the specification of a gRPC gateway route.

action -> (structure)

An object that represents the action to take if a match is determined.

target -> (structure)

An object that represents the target that traffic is routed to when a request matches the gateway route.

virtualService -> (structure)

An object that represents a virtual service gateway route target.

virtualServiceName -> (string)

The name of the virtual service that traffic is routed to.

match -> (structure)

An object that represents the criteria for determining a request match.

serviceName -> (string)

The fully qualified domain name for the service to match from the request.

http2Route -> (structure)

An object that represents the specification of an HTTP/2 gateway route.

action -> (structure)

An object that represents the action to take if a match is determined.

target -> (structure)

An object that represents the target that traffic is routed to when a request matches the gateway route.

virtualService -> (structure)

An object that represents a virtual service gateway route target.

virtualServiceName -> (string)

The name of the virtual service that traffic is routed to.

match -> (structure)

An object that represents the criteria for determining a request match.

prefix -> (string)

Specifies the path to match requests with. This parameter must always start with / , which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the route to match requests to my-service.local/metrics , your prefix should be /metrics .

httpRoute -> (structure)

An object that represents the specification of an HTTP gateway route.

action -> (structure)

An object that represents the action to take if a match is determined.

target -> (structure)

An object that represents the target that traffic is routed to when a request matches the gateway route.

virtualService -> (structure)

An object that represents a virtual service gateway route target.

virtualServiceName -> (string)

The name of the virtual service that traffic is routed to.

match -> (structure)

An object that represents the criteria for determining a request match.

prefix -> (string)

Specifies the path to match requests with. This parameter must always start with / , which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the route to match requests to my-service.local/metrics , your prefix should be /metrics .

JSON Syntax:

{
  "grpcRoute": {
    "action": {
      "target": {
        "virtualService": {
          "virtualServiceName": "string"
        }
      }
    },
    "match": {
      "serviceName": "string"
    }
  },
  "http2Route": {
    "action": {
      "target": {
        "virtualService": {
          "virtualServiceName": "string"
        }
      }
    },
    "match": {
      "prefix": "string"
    }
  },
  "httpRoute": {
    "action": {
      "target": {
        "virtualService": {
          "virtualServiceName": "string"
        }
      }
    },
    "match": {
      "prefix": "string"
    }
  }
}

--tags (list)

Optional metadata that you can apply to the gateway route to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

(structure)

Optional metadata that you apply to a resource to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

key -> (string)

One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

value -> (string)

The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

Shorthand Syntax:

key=string,value=string ...

JSON Syntax:

[
  {
    "key": "string",
    "value": "string"
  }
  ...
]

--virtual-gateway-name (string)

The name of the virtual gateway to associate the gateway route with. If the virtual gateway is in a shared mesh, then you must be the owner of the virtual gateway resource.

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

--cli-auto-prompt (boolean) Automatically prompt for CLI input parameters.

See ‘aws help’ for descriptions of global parameters.

Output

gatewayRoute -> (structure)

The full description of your gateway route following the create call.

gatewayRouteName -> (string)

The name of the gateway route.

meshName -> (string)

The name of the service mesh that the resource resides in.

metadata -> (structure)

An object that represents metadata for a resource.

arn -> (string)

The full Amazon Resource Name (ARN) for the resource.

createdAt -> (timestamp)

The Unix epoch timestamp in seconds for when the resource was created.

lastUpdatedAt -> (timestamp)

The Unix epoch timestamp in seconds for when the resource was last updated.

meshOwner -> (string)

The AWS 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 .

resourceOwner -> (string)

The AWS IAM account ID of the resource owner. If the account ID is not your own, then it’s the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes .

uid -> (string)

The unique identifier for the resource.

version -> (long)

The version of the resource. Resources are created at version 1, and this version is incremented each time that they’re updated.

spec -> (structure)

The specifications of the gateway route.

grpcRoute -> (structure)

An object that represents the specification of a gRPC gateway route.

action -> (structure)

An object that represents the action to take if a match is determined.

target -> (structure)

An object that represents the target that traffic is routed to when a request matches the gateway route.

virtualService -> (structure)

An object that represents a virtual service gateway route target.

virtualServiceName -> (string)

The name of the virtual service that traffic is routed to.

match -> (structure)

An object that represents the criteria for determining a request match.

serviceName -> (string)

The fully qualified domain name for the service to match from the request.

http2Route -> (structure)

An object that represents the specification of an HTTP/2 gateway route.

action -> (structure)

An object that represents the action to take if a match is determined.

target -> (structure)

An object that represents the target that traffic is routed to when a request matches the gateway route.

virtualService -> (structure)

An object that represents a virtual service gateway route target.

virtualServiceName -> (string)

The name of the virtual service that traffic is routed to.

match -> (structure)

An object that represents the criteria for determining a request match.

prefix -> (string)

Specifies the path to match requests with. This parameter must always start with / , which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the route to match requests to my-service.local/metrics , your prefix should be /metrics .

httpRoute -> (structure)

An object that represents the specification of an HTTP gateway route.

action -> (structure)

An object that represents the action to take if a match is determined.

target -> (structure)

An object that represents the target that traffic is routed to when a request matches the gateway route.

virtualService -> (structure)

An object that represents a virtual service gateway route target.

virtualServiceName -> (string)

The name of the virtual service that traffic is routed to.

match -> (structure)

An object that represents the criteria for determining a request match.

prefix -> (string)

Specifies the path to match requests with. This parameter must always start with / , which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the route to match requests to my-service.local/metrics , your prefix should be /metrics .

status -> (structure)

The status of the gateway route.

status -> (string)

The current status for the gateway route.

virtualGatewayName -> (string)

The virtual gateway that the gateway route is associated with.