Skip to content

Create Gateway Route

appmesh_create_gateway_route R Documentation

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

Usage

appmesh_create_gateway_route(clientToken, gatewayRouteName, meshName,
  meshOwner, spec, tags, virtualGatewayName)

Arguments

clientToken

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

gatewayRouteName

[required] The name to use for the gateway route.

meshName

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

meshOwner

The Amazon Web Services 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

[required] The gateway route specification to apply.

tags

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.

virtualGatewayName

[required] 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.

Value

A list with the following syntax:

list(
  gatewayRoute = list(
    gatewayRouteName = "string",
    meshName = "string",
    metadata = list(
      arn = "string",
      createdAt = as.POSIXct(
        "2015-01-01"
      ),
      lastUpdatedAt = as.POSIXct(
        "2015-01-01"
      ),
      meshOwner = "string",
      resourceOwner = "string",
      uid = "string",
      version = 123
    ),
    spec = list(
      grpcRoute = list(
        action = list(
          rewrite = list(
            hostname = list(
              defaultTargetHostname = "ENABLED"|"DISABLED"
            )
          ),
          target = list(
            port = 123,
            virtualService = list(
              virtualServiceName = "string"
            )
          )
        ),
        match = list(
          hostname = list(
            exact = "string",
            suffix = "string"
          ),
          metadata = list(
            list(
              invert = TRUE|FALSE,
              match = list(
                exact = "string",
                prefix = "string",
                range = list(
                  end = 123,
                  start = 123
                ),
                regex = "string",
                suffix = "string"
              ),
              name = "string"
            )
          ),
          port = 123,
          serviceName = "string"
        )
      ),
      http2Route = list(
        action = list(
          rewrite = list(
            hostname = list(
              defaultTargetHostname = "ENABLED"|"DISABLED"
            ),
            path = list(
              exact = "string"
            ),
            prefix = list(
              defaultPrefix = "ENABLED"|"DISABLED",
              value = "string"
            )
          ),
          target = list(
            port = 123,
            virtualService = list(
              virtualServiceName = "string"
            )
          )
        ),
        match = list(
          headers = list(
            list(
              invert = TRUE|FALSE,
              match = list(
                exact = "string",
                prefix = "string",
                range = list(
                  end = 123,
                  start = 123
                ),
                regex = "string",
                suffix = "string"
              ),
              name = "string"
            )
          ),
          hostname = list(
            exact = "string",
            suffix = "string"
          ),
          method = "GET"|"HEAD"|"POST"|"PUT"|"DELETE"|"CONNECT"|"OPTIONS"|"TRACE"|"PATCH",
          path = list(
            exact = "string",
            regex = "string"
          ),
          port = 123,
          prefix = "string",
          queryParameters = list(
            list(
              match = list(
                exact = "string"
              ),
              name = "string"
            )
          )
        )
      ),
      httpRoute = list(
        action = list(
          rewrite = list(
            hostname = list(
              defaultTargetHostname = "ENABLED"|"DISABLED"
            ),
            path = list(
              exact = "string"
            ),
            prefix = list(
              defaultPrefix = "ENABLED"|"DISABLED",
              value = "string"
            )
          ),
          target = list(
            port = 123,
            virtualService = list(
              virtualServiceName = "string"
            )
          )
        ),
        match = list(
          headers = list(
            list(
              invert = TRUE|FALSE,
              match = list(
                exact = "string",
                prefix = "string",
                range = list(
                  end = 123,
                  start = 123
                ),
                regex = "string",
                suffix = "string"
              ),
              name = "string"
            )
          ),
          hostname = list(
            exact = "string",
            suffix = "string"
          ),
          method = "GET"|"HEAD"|"POST"|"PUT"|"DELETE"|"CONNECT"|"OPTIONS"|"TRACE"|"PATCH",
          path = list(
            exact = "string",
            regex = "string"
          ),
          port = 123,
          prefix = "string",
          queryParameters = list(
            list(
              match = list(
                exact = "string"
              ),
              name = "string"
            )
          )
        )
      ),
      priority = 123
    ),
    status = list(
      status = "ACTIVE"|"INACTIVE"|"DELETED"
    ),
    virtualGatewayName = "string"
  )
)

Request syntax

svc$create_gateway_route(
  clientToken = "string",
  gatewayRouteName = "string",
  meshName = "string",
  meshOwner = "string",
  spec = list(
    grpcRoute = list(
      action = list(
        rewrite = list(
          hostname = list(
            defaultTargetHostname = "ENABLED"|"DISABLED"
          )
        ),
        target = list(
          port = 123,
          virtualService = list(
            virtualServiceName = "string"
          )
        )
      ),
      match = list(
        hostname = list(
          exact = "string",
          suffix = "string"
        ),
        metadata = list(
          list(
            invert = TRUE|FALSE,
            match = list(
              exact = "string",
              prefix = "string",
              range = list(
                end = 123,
                start = 123
              ),
              regex = "string",
              suffix = "string"
            ),
            name = "string"
          )
        ),
        port = 123,
        serviceName = "string"
      )
    ),
    http2Route = list(
      action = list(
        rewrite = list(
          hostname = list(
            defaultTargetHostname = "ENABLED"|"DISABLED"
          ),
          path = list(
            exact = "string"
          ),
          prefix = list(
            defaultPrefix = "ENABLED"|"DISABLED",
            value = "string"
          )
        ),
        target = list(
          port = 123,
          virtualService = list(
            virtualServiceName = "string"
          )
        )
      ),
      match = list(
        headers = list(
          list(
            invert = TRUE|FALSE,
            match = list(
              exact = "string",
              prefix = "string",
              range = list(
                end = 123,
                start = 123
              ),
              regex = "string",
              suffix = "string"
            ),
            name = "string"
          )
        ),
        hostname = list(
          exact = "string",
          suffix = "string"
        ),
        method = "GET"|"HEAD"|"POST"|"PUT"|"DELETE"|"CONNECT"|"OPTIONS"|"TRACE"|"PATCH",
        path = list(
          exact = "string",
          regex = "string"
        ),
        port = 123,
        prefix = "string",
        queryParameters = list(
          list(
            match = list(
              exact = "string"
            ),
            name = "string"
          )
        )
      )
    ),
    httpRoute = list(
      action = list(
        rewrite = list(
          hostname = list(
            defaultTargetHostname = "ENABLED"|"DISABLED"
          ),
          path = list(
            exact = "string"
          ),
          prefix = list(
            defaultPrefix = "ENABLED"|"DISABLED",
            value = "string"
          )
        ),
        target = list(
          port = 123,
          virtualService = list(
            virtualServiceName = "string"
          )
        )
      ),
      match = list(
        headers = list(
          list(
            invert = TRUE|FALSE,
            match = list(
              exact = "string",
              prefix = "string",
              range = list(
                end = 123,
                start = 123
              ),
              regex = "string",
              suffix = "string"
            ),
            name = "string"
          )
        ),
        hostname = list(
          exact = "string",
          suffix = "string"
        ),
        method = "GET"|"HEAD"|"POST"|"PUT"|"DELETE"|"CONNECT"|"OPTIONS"|"TRACE"|"PATCH",
        path = list(
          exact = "string",
          regex = "string"
        ),
        port = 123,
        prefix = "string",
        queryParameters = list(
          list(
            match = list(
              exact = "string"
            ),
            name = "string"
          )
        )
      )
    ),
    priority = 123
  ),
  tags = list(
    list(
      key = "string",
      value = "string"
    )
  ),
  virtualGatewayName = "string"
)