[ aws . migration-hub-refactor-spaces ]

create-route

Description

Creates an Amazon Web Services Migration Hub Refactor Spaces route. The account owner of the service resource is always the environment owner, regardless of which account creates the route. Routes target a service in the application. If an application does not have any routes, then the first route must be created as a DEFAULT RouteType .

When you create a route, Refactor Spaces configures the Amazon API Gateway to send traffic to the target service as follows:

  • If the service has a URL endpoint, and the endpoint resolves to a private IP address, Refactor Spaces routes traffic using the API Gateway VPC link.

  • If the service has a URL endpoint, and the endpoint resolves to a public IP address, Refactor Spaces routes traffic over the public internet.

  • If the service has an Lambda function endpoint, then Refactor Spaces uses the API Gateway Lambda integration.

A health check is performed on the service when the route is created. If the health check fails, the route transitions to FAILED , and no traffic is sent to the service.

For Lambda functions, the Lambda function state is checked. If the function is not active, the function configuration is updated so that Lambda resources are provisioned. If the Lambda state is Failed , then the route creation fails. For more information, see the GetFunctionConfiguration’s State response parameter in the Lambda Developer Guide .

For public URLs, a connection is opened to the public endpoint. If the URL is not reachable, the health check fails. For private URLs, a target group is created and the target group health check is run.

The HealthCheckProtocol , HealthCheckPort , and HealthCheckPath are the same protocol, port, and path specified in the URL or health URL, if used. All other settings use the default values, as described in Health checks for your target groups . The health check is considered successful if at least one target within the target group transitions to a healthy state.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  create-route
--application-identifier <value>
[--client-token <value>]
--environment-identifier <value>
--route-type <value>
--service-identifier <value>
[--tags <value>]
[--uri-path-route <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--application-identifier (string)

The ID of the application within which the route is being created.

--client-token (string)

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

--environment-identifier (string)

The ID of the environment in which the route is created.

--route-type (string)

The route type of the route. DEFAULT indicates that all traffic that does not match another route is forwarded to the default route. Applications must have a default route before any other routes can be created. URI_PATH indicates a route that is based on a URI path.

Possible values:

  • DEFAULT

  • URI_PATH

--service-identifier (string)

The ID of the service in which the route is created. Traffic that matches this route is forwarded to this service.

--tags (map)

The tags to assign to the route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..

key -> (string)

value -> (string)

Shorthand Syntax:

KeyName1=string,KeyName2=string

JSON Syntax:

{"string": "string"
  ...}

--uri-path-route (structure)

The configuration for the URI path route type.

ActivationState -> (string)

Indicates whether traffic is forwarded to this route’s service after the route is created.

IncludeChildPaths -> (boolean)

Indicates whether to match all subpaths of the given source path. If this value is false , requests must match the source path exactly before they are forwarded to this route’s service.

Methods -> (list)

A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.

(string)

SourcePath -> (string)

The path to use to match traffic. Paths must start with / and are relative to the base of the application.

Shorthand Syntax:

ActivationState=string,IncludeChildPaths=boolean,Methods=string,string,SourcePath=string

JSON Syntax:

{
  "ActivationState": "ACTIVE",
  "IncludeChildPaths": true|false,
  "Methods": ["DELETE"|"GET"|"HEAD"|"OPTIONS"|"PATCH"|"POST"|"PUT", ...],
  "SourcePath": "string"
}

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

See ‘aws help’ for descriptions of global parameters.

Output

ApplicationId -> (string)

The ID of the application in which the route is created.

Arn -> (string)

The Amazon Resource Name (ARN) of the route. The format for this ARN is ``arn:aws:refactor-spaces:region :account-id :resource-type/resource-id `` . For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference .

CreatedByAccountId -> (string)

The Amazon Web Services account ID of the route creator.

CreatedTime -> (timestamp)

A timestamp that indicates when the route is created.

LastUpdatedTime -> (timestamp)

A timestamp that indicates when the route was last updated.

OwnerAccountId -> (string)

The Amazon Web Services account ID of the route owner.

RouteId -> (string)

The unique identifier of the route.

RouteType -> (string)

The route type of the route.

ServiceId -> (string)

The ID of service in which the rute iscreated. Traffic that matches this route is forwarded to this service.

State -> (string)

he current state of the route.

Tags -> (map)

The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.

key -> (string)

value -> (string)

UriPathRoute -> (structure)

onfiguration for the URI path route type.

ActivationState -> (string)

Indicates whether traffic is forwarded to this route’s service after the route is created.

IncludeChildPaths -> (boolean)

Indicates whether to match all subpaths of the given source path. If this value is false , requests must match the source path exactly before they are forwarded to this route’s service.

Methods -> (list)

A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.

(string)

SourcePath -> (string)

The path to use to match traffic. Paths must start with / and are relative to the base of the application.