AppMesh / Client / delete_gateway_route

delete_gateway_route#

AppMesh.Client.delete_gateway_route(**kwargs)#

Deletes an existing gateway route.

See also: AWS API Documentation

Request Syntax

response = client.delete_gateway_route(
    gatewayRouteName='string',
    meshName='string',
    meshOwner='string',
    virtualGatewayName='string'
)
Parameters:
  • gatewayRouteName (string) –

    [REQUIRED]

    The name of the gateway route to delete.

  • meshName (string) –

    [REQUIRED]

    The name of the service mesh to delete the gateway route from.

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

  • virtualGatewayName (string) –

    [REQUIRED]

    The name of the virtual gateway to delete the route from.

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 gateway route that was deleted.

      • 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 gateway route port to be matched on.

            • 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