AppMesh / Client / create_gateway_route

create_gateway_route#

AppMesh.Client.create_gateway_route(**kwargs)#

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

Request Syntax

response = client.create_gateway_route(
    clientToken='string',
    gatewayRouteName='string',
    meshName='string',
    meshOwner='string',
    spec={
        'grpcRoute': {
            'action': {
                'rewrite': {
                    'hostname': {
                        'defaultTargetHostname': 'ENABLED'|'DISABLED'
                    }
                },
                'target': {
                    'port': 123,
                    'virtualService': {
                        'virtualServiceName': 'string'
                    }
                }
            },
            'match': {
                'hostname': {
                    'exact': 'string',
                    'suffix': 'string'
                },
                'metadata': [
                    {
                        'invert': True|False,
                        'match': {
                            'exact': 'string',
                            'prefix': 'string',
                            'range': {
                                'end': 123,
                                'start': 123
                            },
                            'regex': 'string',
                            'suffix': 'string'
                        },
                        'name': 'string'
                    },
                ],
                'port': 123,
                'serviceName': 'string'
            }
        },
        'http2Route': {
            'action': {
                'rewrite': {
                    'hostname': {
                        'defaultTargetHostname': 'ENABLED'|'DISABLED'
                    },
                    'path': {
                        'exact': 'string'
                    },
                    'prefix': {
                        'defaultPrefix': 'ENABLED'|'DISABLED',
                        'value': 'string'
                    }
                },
                'target': {
                    'port': 123,
                    'virtualService': {
                        'virtualServiceName': 'string'
                    }
                }
            },
            'match': {
                'headers': [
                    {
                        'invert': True|False,
                        'match': {
                            'exact': 'string',
                            'prefix': 'string',
                            'range': {
                                'end': 123,
                                'start': 123
                            },
                            'regex': 'string',
                            'suffix': 'string'
                        },
                        'name': 'string'
                    },
                ],
                'hostname': {
                    'exact': 'string',
                    'suffix': 'string'
                },
                'method': 'GET'|'HEAD'|'POST'|'PUT'|'DELETE'|'CONNECT'|'OPTIONS'|'TRACE'|'PATCH',
                'path': {
                    'exact': 'string',
                    'regex': 'string'
                },
                'port': 123,
                'prefix': 'string',
                'queryParameters': [
                    {
                        'match': {
                            'exact': 'string'
                        },
                        'name': 'string'
                    },
                ]
            }
        },
        'httpRoute': {
            'action': {
                'rewrite': {
                    'hostname': {
                        'defaultTargetHostname': 'ENABLED'|'DISABLED'
                    },
                    'path': {
                        'exact': 'string'
                    },
                    'prefix': {
                        'defaultPrefix': 'ENABLED'|'DISABLED',
                        'value': 'string'
                    }
                },
                'target': {
                    'port': 123,
                    'virtualService': {
                        'virtualServiceName': 'string'
                    }
                }
            },
            'match': {
                'headers': [
                    {
                        'invert': True|False,
                        'match': {
                            'exact': 'string',
                            'prefix': 'string',
                            'range': {
                                'end': 123,
                                'start': 123
                            },
                            'regex': 'string',
                            'suffix': 'string'
                        },
                        'name': 'string'
                    },
                ],
                'hostname': {
                    'exact': 'string',
                    'suffix': 'string'
                },
                'method': 'GET'|'HEAD'|'POST'|'PUT'|'DELETE'|'CONNECT'|'OPTIONS'|'TRACE'|'PATCH',
                'path': {
                    'exact': 'string',
                    'regex': 'string'
                },
                'port': 123,
                'prefix': 'string',
                'queryParameters': [
                    {
                        'match': {
                            'exact': 'string'
                        },
                        'name': 'string'
                    },
                ]
            }
        },
        'priority': 123
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    virtualGatewayName='string'
)
Parameters:
  • clientToken (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.

    This field is autopopulated if not provided.

  • gatewayRouteName (string) –

    [REQUIRED]

    The name to use for the gateway route.

  • meshName (string) –

    [REQUIRED]

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

  • meshOwner (string) – 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 (dict) –

    [REQUIRED]

    The gateway route specification to apply.

    • grpcRoute (dict) –

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

      • action (dict) – [REQUIRED]

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

        • rewrite (dict) –

          The gateway route action to rewrite.

          • hostname (dict) –

            The host name of the gateway route to rewrite.

            • defaultTargetHostname (string) –

              The default target host name to write to.

        • target (dict) – [REQUIRED]

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

          • port (integer) –

            The port number of the gateway route target.

          • virtualService (dict) – [REQUIRED]

            An object that represents a virtual service gateway route target.

            • virtualServiceName (string) – [REQUIRED]

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

      • match (dict) – [REQUIRED]

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

        • hostname (dict) –

          The gateway route host name to be matched on.

          • exact (string) –

            The exact host name to match on.

          • suffix (string) –

            The specified ending characters of the host name to match on.

        • metadata (list) –

          The gateway route metadata to be matched on.

          • (dict) –

            An object representing the metadata of the gateway route.

            • invert (boolean) –

              Specify True to match anything except the match criteria. The default value is False.

            • match (dict) –

              The criteria for determining a metadata match.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: exact, prefix, range, regex, suffix.

              • exact (string) –

                The exact method header to be matched on.

              • prefix (string) –

                The specified beginning characters of the method header to be matched on.

              • range (dict) –

                An object that represents the range of values to match on. The first character of the range is included in the range, though the last character is not. For example, if the range specified were 1-100, only values 1-99 would be matched.

                • end (integer) – [REQUIRED]

                  The end of the range.

                • start (integer) – [REQUIRED]

                  The start of the range.

              • regex (string) –

                The regex used to match the method header.

              • suffix (string) –

                The specified ending characters of the method header to match on.

            • name (string) – [REQUIRED]

              A name for the gateway route metadata.

        • port (integer) –

          The port number to match from the request.

        • serviceName (string) –

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

    • http2Route (dict) –

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

      • action (dict) – [REQUIRED]

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

        • rewrite (dict) –

          The gateway route action to rewrite.

          • hostname (dict) –

            The host name to rewrite.

            • defaultTargetHostname (string) –

              The default target host name to write to.

          • path (dict) –

            The path to rewrite.

            • exact (string) –

              The exact path to rewrite.

          • prefix (dict) –

            The specified beginning characters to rewrite.

            • defaultPrefix (string) –

              The default prefix used to replace the incoming route prefix when rewritten.

            • value (string) –

              The value used to replace the incoming route prefix when rewritten.

        • target (dict) – [REQUIRED]

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

          • port (integer) –

            The port number of the gateway route target.

          • virtualService (dict) – [REQUIRED]

            An object that represents a virtual service gateway route target.

            • virtualServiceName (string) – [REQUIRED]

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

      • match (dict) – [REQUIRED]

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

        • headers (list) –

          The client request headers to match on.

          • (dict) –

            An object that represents the HTTP header in the gateway route.

            • invert (boolean) –

              Specify True to match anything except the match criteria. The default value is False.

            • match (dict) –

              An object that represents the method and value to match with the header value sent in a request. Specify one match method.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: exact, prefix, range, regex, suffix.

              • exact (string) –

                The value sent by the client must match the specified value exactly.

              • prefix (string) –

                The value sent by the client must begin with the specified characters.

              • range (dict) –

                An object that represents the range of values to match on.

                • end (integer) – [REQUIRED]

                  The end of the range.

                • start (integer) – [REQUIRED]

                  The start of the range.

              • regex (string) –

                The value sent by the client must include the specified characters.

              • suffix (string) –

                The value sent by the client must end with the specified characters.

            • name (string) – [REQUIRED]

              A name for the HTTP header in the gateway route that will be matched on.

        • hostname (dict) –

          The host name to match on.

          • exact (string) –

            The exact host name to match on.

          • suffix (string) –

            The specified ending characters of the host name to match on.

        • method (string) –

          The method to match on.

        • path (dict) –

          The path to match on.

          • exact (string) –

            The exact path to match on.

          • regex (string) –

            The regex used to match the path.

        • port (integer) –

          The port number to match on.

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

        • queryParameters (list) –

          The query parameter to match on.

          • (dict) –

            An object that represents the query parameter in the request.

            • match (dict) –

              The query parameter to match on.

              • exact (string) –

                The exact query parameter to match on.

            • name (string) – [REQUIRED]

              A name for the query parameter that will be matched on.

    • httpRoute (dict) –

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

      • action (dict) – [REQUIRED]

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

        • rewrite (dict) –

          The gateway route action to rewrite.

          • hostname (dict) –

            The host name to rewrite.

            • defaultTargetHostname (string) –

              The default target host name to write to.

          • path (dict) –

            The path to rewrite.

            • exact (string) –

              The exact path to rewrite.

          • prefix (dict) –

            The specified beginning characters to rewrite.

            • defaultPrefix (string) –

              The default prefix used to replace the incoming route prefix when rewritten.

            • value (string) –

              The value used to replace the incoming route prefix when rewritten.

        • target (dict) – [REQUIRED]

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

          • port (integer) –

            The port number of the gateway route target.

          • virtualService (dict) – [REQUIRED]

            An object that represents a virtual service gateway route target.

            • virtualServiceName (string) – [REQUIRED]

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

      • match (dict) – [REQUIRED]

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

        • headers (list) –

          The client request headers to match on.

          • (dict) –

            An object that represents the HTTP header in the gateway route.

            • invert (boolean) –

              Specify True to match anything except the match criteria. The default value is False.

            • match (dict) –

              An object that represents the method and value to match with the header value sent in a request. Specify one match method.

              Note

              This is a Tagged Union structure. Only one of the following top level keys can be set: exact, prefix, range, regex, suffix.

              • exact (string) –

                The value sent by the client must match the specified value exactly.

              • prefix (string) –

                The value sent by the client must begin with the specified characters.

              • range (dict) –

                An object that represents the range of values to match on.

                • end (integer) – [REQUIRED]

                  The end of the range.

                • start (integer) – [REQUIRED]

                  The start of the range.

              • regex (string) –

                The value sent by the client must include the specified characters.

              • suffix (string) –

                The value sent by the client must end with the specified characters.

            • name (string) – [REQUIRED]

              A name for the HTTP header in the gateway route that will be matched on.

        • hostname (dict) –

          The host name to match on.

          • exact (string) –

            The exact host name to match on.

          • suffix (string) –

            The specified ending characters of the host name to match on.

        • method (string) –

          The method to match on.

        • path (dict) –

          The path to match on.

          • exact (string) –

            The exact path to match on.

          • regex (string) –

            The regex used to match the path.

        • port (integer) –

          The port number to match on.

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

        • queryParameters (list) –

          The query parameter to match on.

          • (dict) –

            An object that represents the query parameter in the request.

            • match (dict) –

              The query parameter to match on.

              • exact (string) –

                The exact query parameter to match on.

            • name (string) – [REQUIRED]

              A name for the query parameter that will be matched on.

    • priority (integer) –

      The ordering of the gateway routes spec.

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

    • (dict) –

      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) – [REQUIRED]

        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) – [REQUIRED]

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

  • virtualGatewayName (string) –

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

Return type:

dict

Returns:

Response Syntax

{
    'gatewayRoute': {
        'gatewayRouteName': 'string',
        'meshName': 'string',
        'metadata': {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1),
            'meshOwner': 'string',
            'resourceOwner': 'string',
            'uid': 'string',
            'version': 123
        },
        'spec': {
            'grpcRoute': {
                'action': {
                    'rewrite': {
                        'hostname': {
                            'defaultTargetHostname': 'ENABLED'|'DISABLED'
                        }
                    },
                    'target': {
                        'port': 123,
                        'virtualService': {
                            'virtualServiceName': 'string'
                        }
                    }
                },
                'match': {
                    'hostname': {
                        'exact': 'string',
                        'suffix': 'string'
                    },
                    'metadata': [
                        {
                            'invert': True|False,
                            'match': {
                                'exact': 'string',
                                'prefix': 'string',
                                'range': {
                                    'end': 123,
                                    'start': 123
                                },
                                'regex': 'string',
                                'suffix': 'string'
                            },
                            'name': 'string'
                        },
                    ],
                    'port': 123,
                    'serviceName': 'string'
                }
            },
            'http2Route': {
                'action': {
                    'rewrite': {
                        'hostname': {
                            'defaultTargetHostname': 'ENABLED'|'DISABLED'
                        },
                        'path': {
                            'exact': 'string'
                        },
                        'prefix': {
                            'defaultPrefix': 'ENABLED'|'DISABLED',
                            'value': 'string'
                        }
                    },
                    'target': {
                        'port': 123,
                        'virtualService': {
                            'virtualServiceName': 'string'
                        }
                    }
                },
                'match': {
                    'headers': [
                        {
                            'invert': True|False,
                            'match': {
                                'exact': 'string',
                                'prefix': 'string',
                                'range': {
                                    'end': 123,
                                    'start': 123
                                },
                                'regex': 'string',
                                'suffix': 'string'
                            },
                            'name': 'string'
                        },
                    ],
                    'hostname': {
                        'exact': 'string',
                        'suffix': 'string'
                    },
                    'method': 'GET'|'HEAD'|'POST'|'PUT'|'DELETE'|'CONNECT'|'OPTIONS'|'TRACE'|'PATCH',
                    'path': {
                        'exact': 'string',
                        'regex': 'string'
                    },
                    'port': 123,
                    'prefix': 'string',
                    'queryParameters': [
                        {
                            'match': {
                                'exact': 'string'
                            },
                            'name': 'string'
                        },
                    ]
                }
            },
            'httpRoute': {
                'action': {
                    'rewrite': {
                        'hostname': {
                            'defaultTargetHostname': 'ENABLED'|'DISABLED'
                        },
                        'path': {
                            'exact': 'string'
                        },
                        'prefix': {
                            'defaultPrefix': 'ENABLED'|'DISABLED',
                            'value': 'string'
                        }
                    },
                    'target': {
                        'port': 123,
                        'virtualService': {
                            'virtualServiceName': 'string'
                        }
                    }
                },
                'match': {
                    'headers': [
                        {
                            'invert': True|False,
                            'match': {
                                'exact': 'string',
                                'prefix': 'string',
                                'range': {
                                    'end': 123,
                                    'start': 123
                                },
                                'regex': 'string',
                                'suffix': 'string'
                            },
                            'name': 'string'
                        },
                    ],
                    'hostname': {
                        'exact': 'string',
                        'suffix': 'string'
                    },
                    'method': 'GET'|'HEAD'|'POST'|'PUT'|'DELETE'|'CONNECT'|'OPTIONS'|'TRACE'|'PATCH',
                    'path': {
                        'exact': 'string',
                        'regex': 'string'
                    },
                    'port': 123,
                    'prefix': 'string',
                    'queryParameters': [
                        {
                            'match': {
                                'exact': 'string'
                            },
                            'name': 'string'
                        },
                    ]
                }
            },
            'priority': 123
        },
        'status': {
            'status': 'ACTIVE'|'INACTIVE'|'DELETED'
        },
        'virtualGatewayName': 'string'
    }
}

Response Structure

  • (dict) –

    • gatewayRoute (dict) –

      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 (dict) –

        An object that represents metadata for a resource.

        • arn (string) –

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

        • createdAt (datetime) –

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

        • lastUpdatedAt (datetime) –

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

        • meshOwner (string) –

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

        • resourceOwner (string) –

          The Amazon Web Services 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 (integer) –

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

      • spec (dict) –

        The specifications of the gateway route.

        • grpcRoute (dict) –

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

          • action (dict) –

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

            • rewrite (dict) –

              The gateway route action to rewrite.

              • hostname (dict) –

                The host name of the gateway route to rewrite.

                • defaultTargetHostname (string) –

                  The default target host name to write to.

            • target (dict) –

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

              • port (integer) –

                The port number of the gateway route target.

              • virtualService (dict) –

                An object that represents a virtual service gateway route target.

                • virtualServiceName (string) –

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

          • match (dict) –

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

            • hostname (dict) –

              The gateway route host name to be matched on.

              • exact (string) –

                The exact host name to match on.

              • suffix (string) –

                The specified ending characters of the host name to match on.

            • metadata (list) –

              The gateway route metadata to be matched on.

              • (dict) –

                An object representing the metadata of the gateway route.

                • invert (boolean) –

                  Specify True to match anything except the match criteria. The default value is False.

                • match (dict) –

                  The criteria for determining a metadata match.

                  Note

                  This is a Tagged Union structure. Only one of the following top level keys will be set: exact, prefix, range, regex, suffix. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                  'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                  
                  • exact (string) –

                    The exact method header to be matched on.

                  • prefix (string) –

                    The specified beginning characters of the method header to be matched on.

                  • range (dict) –

                    An object that represents the range of values to match on. The first character of the range is included in the range, though the last character is not. For example, if the range specified were 1-100, only values 1-99 would be matched.

                    • end (integer) –

                      The end of the range.

                    • start (integer) –

                      The start of the range.

                  • regex (string) –

                    The regex used to match the method header.

                  • suffix (string) –

                    The specified ending characters of the method header to match on.

                • name (string) –

                  A name for the gateway route metadata.

            • port (integer) –

              The port number to match from the request.

            • serviceName (string) –

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

        • http2Route (dict) –

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

          • action (dict) –

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

            • rewrite (dict) –

              The gateway route action to rewrite.

              • hostname (dict) –

                The host name to rewrite.

                • defaultTargetHostname (string) –

                  The default target host name to write to.

              • path (dict) –

                The path to rewrite.

                • exact (string) –

                  The exact path to rewrite.

              • prefix (dict) –

                The specified beginning characters to rewrite.

                • defaultPrefix (string) –

                  The default prefix used to replace the incoming route prefix when rewritten.

                • value (string) –

                  The value used to replace the incoming route prefix when rewritten.

            • target (dict) –

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

              • port (integer) –

                The port number of the gateway route target.

              • virtualService (dict) –

                An object that represents a virtual service gateway route target.

                • virtualServiceName (string) –

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

          • match (dict) –

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

            • headers (list) –

              The client request headers to match on.

              • (dict) –

                An object that represents the HTTP header in the gateway route.

                • invert (boolean) –

                  Specify True to match anything except the match criteria. The default value is False.

                • match (dict) –

                  An object that represents the method and value to match with the header value sent in a request. Specify one match method.

                  Note

                  This is a Tagged Union structure. Only one of the following top level keys will be set: exact, prefix, range, regex, suffix. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                  'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                  
                  • exact (string) –

                    The value sent by the client must match the specified value exactly.

                  • prefix (string) –

                    The value sent by the client must begin with the specified characters.

                  • range (dict) –

                    An object that represents the range of values to match on.

                    • end (integer) –

                      The end of the range.

                    • start (integer) –

                      The start of the range.

                  • regex (string) –

                    The value sent by the client must include the specified characters.

                  • suffix (string) –

                    The value sent by the client must end with the specified characters.

                • name (string) –

                  A name for the HTTP header in the gateway route that will be matched on.

            • hostname (dict) –

              The host name to match on.

              • exact (string) –

                The exact host name to match on.

              • suffix (string) –

                The specified ending characters of the host name to match on.

            • method (string) –

              The method to match on.

            • path (dict) –

              The path to match on.

              • exact (string) –

                The exact path to match on.

              • regex (string) –

                The regex used to match the path.

            • port (integer) –

              The port number to match on.

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

            • queryParameters (list) –

              The query parameter to match on.

              • (dict) –

                An object that represents the query parameter in the request.

                • match (dict) –

                  The query parameter to match on.

                  • exact (string) –

                    The exact query parameter to match on.

                • name (string) –

                  A name for the query parameter that will be matched on.

        • httpRoute (dict) –

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

          • action (dict) –

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

            • rewrite (dict) –

              The gateway route action to rewrite.

              • hostname (dict) –

                The host name to rewrite.

                • defaultTargetHostname (string) –

                  The default target host name to write to.

              • path (dict) –

                The path to rewrite.

                • exact (string) –

                  The exact path to rewrite.

              • prefix (dict) –

                The specified beginning characters to rewrite.

                • defaultPrefix (string) –

                  The default prefix used to replace the incoming route prefix when rewritten.

                • value (string) –

                  The value used to replace the incoming route prefix when rewritten.

            • target (dict) –

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

              • port (integer) –

                The port number of the gateway route target.

              • virtualService (dict) –

                An object that represents a virtual service gateway route target.

                • virtualServiceName (string) –

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

          • match (dict) –

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

            • headers (list) –

              The client request headers to match on.

              • (dict) –

                An object that represents the HTTP header in the gateway route.

                • invert (boolean) –

                  Specify True to match anything except the match criteria. The default value is False.

                • match (dict) –

                  An object that represents the method and value to match with the header value sent in a request. Specify one match method.

                  Note

                  This is a Tagged Union structure. Only one of the following top level keys will be set: exact, prefix, range, regex, suffix. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                  'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                  
                  • exact (string) –

                    The value sent by the client must match the specified value exactly.

                  • prefix (string) –

                    The value sent by the client must begin with the specified characters.

                  • range (dict) –

                    An object that represents the range of values to match on.

                    • end (integer) –

                      The end of the range.

                    • start (integer) –

                      The start of the range.

                  • regex (string) –

                    The value sent by the client must include the specified characters.

                  • suffix (string) –

                    The value sent by the client must end with the specified characters.

                • name (string) –

                  A name for the HTTP header in the gateway route that will be matched on.

            • hostname (dict) –

              The host name to match on.

              • exact (string) –

                The exact host name to match on.

              • suffix (string) –

                The specified ending characters of the host name to match on.

            • method (string) –

              The method to match on.

            • path (dict) –

              The path to match on.

              • exact (string) –

                The exact path to match on.

              • regex (string) –

                The regex used to match the path.

            • port (integer) –

              The port number to match on.

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

            • queryParameters (list) –

              The query parameter to match on.

              • (dict) –

                An object that represents the query parameter in the request.

                • match (dict) –

                  The query parameter to match on.

                  • exact (string) –

                    The exact query parameter to match on.

                • name (string) –

                  A name for the query parameter that will be matched on.

        • priority (integer) –

          The ordering of the gateway routes spec.

      • status (dict) –

        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.

Exceptions

  • AppMesh.Client.exceptions.NotFoundException

  • AppMesh.Client.exceptions.BadRequestException

  • AppMesh.Client.exceptions.ConflictException

  • AppMesh.Client.exceptions.TooManyRequestsException

  • AppMesh.Client.exceptions.ForbiddenException

  • AppMesh.Client.exceptions.ServiceUnavailableException

  • AppMesh.Client.exceptions.InternalServerErrorException

  • AppMesh.Client.exceptions.LimitExceededException