AWS App Mesh

2019/08/19 - AWS App Mesh - 4 updated api methods

Changes  Update appmesh client to latest version

CreateRoute (updated) Link ¶
Changes (request, response)
Request
{'spec': {'httpRoute': {'match': {'method': {'CONNECT',
                                             'DELETE',
                                             'GET',
                                             'HEAD',
                                             'OPTIONS',
                                             'PATCH',
                                             'POST',
                                             'PUT',
                                             'TRACE'}}}}}
Response
{'route': {'spec': {'httpRoute': {'match': {'method': {'CONNECT',
                                                       'DELETE',
                                                       'GET',
                                                       'HEAD',
                                                       'OPTIONS',
                                                       'PATCH',
                                                       'POST',
                                                       'PUT',
                                                       'TRACE'}}}}}}

Creates a route that is associated with a virtual router.

You can use the prefix parameter in your route specification 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.

If your route matches a request, you can distribute traffic to one or more target virtual nodes with relative weighting.

See also: AWS API Documentation

Request Syntax

client.create_route(
    clientToken='string',
    meshName='string',
    routeName='string',
    spec={
        'httpRoute': {
            'action': {
                'weightedTargets': [
                    {
                        'virtualNode': 'string',
                        'weight': 123
                    },
                ]
            },
            'match': {
                'headers': [
                    {
                        'invert': True|False,
                        'match': {
                            'exact': 'string',
                            'prefix': 'string',
                            'range': {
                                'end': 123,
                                'start': 123
                            },
                            'regex': 'string',
                            'suffix': 'string'
                        },
                        'name': 'string'
                    },
                ],
                'method': 'CONNECT'|'DELETE'|'GET'|'HEAD'|'OPTIONS'|'PATCH'|'POST'|'PUT'|'TRACE',
                'prefix': 'string',
                'scheme': 'http'|'https'
            }
        },
        'priority': 123,
        'tcpRoute': {
            'action': {
                'weightedTargets': [
                    {
                        'virtualNode': 'string',
                        'weight': 123
                    },
                ]
            }
        }
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    virtualRouterName='string'
)
type clientToken:

string

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

This field is autopopulated if not provided.

type meshName:

string

param meshName:

[REQUIRED]

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

type routeName:

string

param routeName:

[REQUIRED]

The name to use for the route.

type spec:

dict

param spec:

[REQUIRED]

The route specification to apply.

  • httpRoute (dict) --

    The HTTP routing information for the route.

    • action (dict) -- [REQUIRED]

      The action to take if a match is determined.

      • weightedTargets (list) -- [REQUIRED]

        The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

        • (dict) --

          An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

          • virtualNode (string) -- [REQUIRED]

            The virtual node to associate with the weighted target.

          • weight (integer) -- [REQUIRED]

            The relative weight of the weighted target.

    • match (dict) -- [REQUIRED]

      The criteria for determining an HTTP request match.

      • headers (list) --

        The client request headers to match on.

        • (dict) --

          An object representing the HTTP header in the request.

          • invert (boolean) --

            Specify True to match the opposite of the HeaderMatchMethod method and value. The default value is False.

          • match (dict) --

            The HeaderMatchMethod object.

            • exact (string) --

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

            • prefix (string) --

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

            • range (dict) --

              The object that specifies the range of numbers that the header value sent by the client must be included in.

              • end (integer) -- [REQUIRED]

                The end of the range.

              • start (integer) -- [REQUIRED]

                The start of the range.

            • regex (string) --

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

            • suffix (string) --

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

          • name (string) -- [REQUIRED]

            A name for the HTTP header in the client request that will be matched on.

      • method (string) --

        The client request header method to match on.

      • prefix (string) -- [REQUIRED]

        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.

      • scheme (string) --

        The client request header scheme to match on.

  • priority (integer) --

    The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.

  • tcpRoute (dict) --

    The TCP routing information for the route.

    • action (dict) -- [REQUIRED]

      The action to take if a match is determined.

      • weightedTargets (list) -- [REQUIRED]

        The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

        • (dict) --

          An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

          • virtualNode (string) -- [REQUIRED]

            The virtual node to associate with the weighted target.

          • weight (integer) -- [REQUIRED]

            The relative weight of the weighted target.

type tags:

list

param tags:

Optional metadata that you can apply to the 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) --

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

type virtualRouterName:

string

param virtualRouterName:

[REQUIRED]

The name of the virtual router in which to create the route.

rtype:

dict

returns:

Response Syntax

{
    'route': {
        'meshName': 'string',
        'metadata': {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1),
            'uid': 'string',
            'version': 123
        },
        'routeName': 'string',
        'spec': {
            'httpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                },
                'match': {
                    'headers': [
                        {
                            'invert': True|False,
                            'match': {
                                'exact': 'string',
                                'prefix': 'string',
                                'range': {
                                    'end': 123,
                                    'start': 123
                                },
                                'regex': 'string',
                                'suffix': 'string'
                            },
                            'name': 'string'
                        },
                    ],
                    'method': 'CONNECT'|'DELETE'|'GET'|'HEAD'|'OPTIONS'|'PATCH'|'POST'|'PUT'|'TRACE',
                    'prefix': 'string',
                    'scheme': 'http'|'https'
                }
            },
            'priority': 123,
            'tcpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                }
            }
        },
        'status': {
            'status': 'ACTIVE'|'DELETED'|'INACTIVE'
        },
        'virtualRouterName': 'string'
    }
}

Response Structure

  • (dict) --

    • route (dict) --

      The full description of your mesh following the create call.

      • meshName (string) --

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

      • metadata (dict) --

        The associated metadata for the route.

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

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

      • routeName (string) --

        The name of the route.

      • spec (dict) --

        The specifications of the route.

        • httpRoute (dict) --

          The HTTP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

          • match (dict) --

            The criteria for determining an HTTP request match.

            • headers (list) --

              The client request headers to match on.

              • (dict) --

                An object representing the HTTP header in the request.

                • invert (boolean) --

                  Specify True to match the opposite of the HeaderMatchMethod method and value. The default value is False.

                • match (dict) --

                  The HeaderMatchMethod object.

                  • exact (string) --

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

                  • prefix (string) --

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

                  • range (dict) --

                    The object that specifies the range of numbers that the header value sent by the client must be included in.

                    • end (integer) --

                      The end of the range.

                    • start (integer) --

                      The start of the range.

                  • regex (string) --

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

                  • suffix (string) --

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

                • name (string) --

                  A name for the HTTP header in the client request that will be matched on.

            • method (string) --

              The client request header method 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.

        • scheme (string) --

          The client request header scheme to match on.

        • priority (integer) --

          The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.

        • tcpRoute (dict) --

          The TCP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

      • status (dict) --

        The status of the route.

        • status (string) --

          The current status for the route.

      • virtualRouterName (string) --

        The virtual router that the route is associated with.

DeleteRoute (updated) Link ¶
Changes (response)
{'route': {'spec': {'httpRoute': {'match': {'method': {'CONNECT',
                                                       'DELETE',
                                                       'GET',
                                                       'HEAD',
                                                       'OPTIONS',
                                                       'PATCH',
                                                       'POST',
                                                       'PUT',
                                                       'TRACE'}}}}}}

Deletes an existing route.

See also: AWS API Documentation

Request Syntax

client.delete_route(
    meshName='string',
    routeName='string',
    virtualRouterName='string'
)
type meshName:

string

param meshName:

[REQUIRED]

The name of the service mesh to delete the route in.

type routeName:

string

param routeName:

[REQUIRED]

The name of the route to delete.

type virtualRouterName:

string

param virtualRouterName:

[REQUIRED]

The name of the virtual router to delete the route in.

rtype:

dict

returns:

Response Syntax

{
    'route': {
        'meshName': 'string',
        'metadata': {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1),
            'uid': 'string',
            'version': 123
        },
        'routeName': 'string',
        'spec': {
            'httpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                },
                'match': {
                    'headers': [
                        {
                            'invert': True|False,
                            'match': {
                                'exact': 'string',
                                'prefix': 'string',
                                'range': {
                                    'end': 123,
                                    'start': 123
                                },
                                'regex': 'string',
                                'suffix': 'string'
                            },
                            'name': 'string'
                        },
                    ],
                    'method': 'CONNECT'|'DELETE'|'GET'|'HEAD'|'OPTIONS'|'PATCH'|'POST'|'PUT'|'TRACE',
                    'prefix': 'string',
                    'scheme': 'http'|'https'
                }
            },
            'priority': 123,
            'tcpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                }
            }
        },
        'status': {
            'status': 'ACTIVE'|'DELETED'|'INACTIVE'
        },
        'virtualRouterName': 'string'
    }
}

Response Structure

  • (dict) --

    • route (dict) --

      The route that was deleted.

      • meshName (string) --

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

      • metadata (dict) --

        The associated metadata for the route.

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

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

      • routeName (string) --

        The name of the route.

      • spec (dict) --

        The specifications of the route.

        • httpRoute (dict) --

          The HTTP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

          • match (dict) --

            The criteria for determining an HTTP request match.

            • headers (list) --

              The client request headers to match on.

              • (dict) --

                An object representing the HTTP header in the request.

                • invert (boolean) --

                  Specify True to match the opposite of the HeaderMatchMethod method and value. The default value is False.

                • match (dict) --

                  The HeaderMatchMethod object.

                  • exact (string) --

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

                  • prefix (string) --

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

                  • range (dict) --

                    The object that specifies the range of numbers that the header value sent by the client must be included in.

                    • end (integer) --

                      The end of the range.

                    • start (integer) --

                      The start of the range.

                  • regex (string) --

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

                  • suffix (string) --

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

                • name (string) --

                  A name for the HTTP header in the client request that will be matched on.

            • method (string) --

              The client request header method 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.

        • scheme (string) --

          The client request header scheme to match on.

        • priority (integer) --

          The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.

        • tcpRoute (dict) --

          The TCP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

      • status (dict) --

        The status of the route.

        • status (string) --

          The current status for the route.

      • virtualRouterName (string) --

        The virtual router that the route is associated with.

DescribeRoute (updated) Link ¶
Changes (response)
{'route': {'spec': {'httpRoute': {'match': {'method': {'CONNECT',
                                                       'DELETE',
                                                       'GET',
                                                       'HEAD',
                                                       'OPTIONS',
                                                       'PATCH',
                                                       'POST',
                                                       'PUT',
                                                       'TRACE'}}}}}}

Describes an existing route.

See also: AWS API Documentation

Request Syntax

client.describe_route(
    meshName='string',
    routeName='string',
    virtualRouterName='string'
)
type meshName:

string

param meshName:

[REQUIRED]

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

type routeName:

string

param routeName:

[REQUIRED]

The name of the route to describe.

type virtualRouterName:

string

param virtualRouterName:

[REQUIRED]

The name of the virtual router that the route is associated with.

rtype:

dict

returns:

Response Syntax

{
    'route': {
        'meshName': 'string',
        'metadata': {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1),
            'uid': 'string',
            'version': 123
        },
        'routeName': 'string',
        'spec': {
            'httpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                },
                'match': {
                    'headers': [
                        {
                            'invert': True|False,
                            'match': {
                                'exact': 'string',
                                'prefix': 'string',
                                'range': {
                                    'end': 123,
                                    'start': 123
                                },
                                'regex': 'string',
                                'suffix': 'string'
                            },
                            'name': 'string'
                        },
                    ],
                    'method': 'CONNECT'|'DELETE'|'GET'|'HEAD'|'OPTIONS'|'PATCH'|'POST'|'PUT'|'TRACE',
                    'prefix': 'string',
                    'scheme': 'http'|'https'
                }
            },
            'priority': 123,
            'tcpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                }
            }
        },
        'status': {
            'status': 'ACTIVE'|'DELETED'|'INACTIVE'
        },
        'virtualRouterName': 'string'
    }
}

Response Structure

  • (dict) --

    • route (dict) --

      The full description of your route.

      • meshName (string) --

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

      • metadata (dict) --

        The associated metadata for the route.

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

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

      • routeName (string) --

        The name of the route.

      • spec (dict) --

        The specifications of the route.

        • httpRoute (dict) --

          The HTTP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

          • match (dict) --

            The criteria for determining an HTTP request match.

            • headers (list) --

              The client request headers to match on.

              • (dict) --

                An object representing the HTTP header in the request.

                • invert (boolean) --

                  Specify True to match the opposite of the HeaderMatchMethod method and value. The default value is False.

                • match (dict) --

                  The HeaderMatchMethod object.

                  • exact (string) --

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

                  • prefix (string) --

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

                  • range (dict) --

                    The object that specifies the range of numbers that the header value sent by the client must be included in.

                    • end (integer) --

                      The end of the range.

                    • start (integer) --

                      The start of the range.

                  • regex (string) --

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

                  • suffix (string) --

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

                • name (string) --

                  A name for the HTTP header in the client request that will be matched on.

            • method (string) --

              The client request header method 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.

        • scheme (string) --

          The client request header scheme to match on.

        • priority (integer) --

          The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.

        • tcpRoute (dict) --

          The TCP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

      • status (dict) --

        The status of the route.

        • status (string) --

          The current status for the route.

      • virtualRouterName (string) --

        The virtual router that the route is associated with.

UpdateRoute (updated) Link ¶
Changes (request, response)
Request
{'spec': {'httpRoute': {'match': {'method': {'CONNECT',
                                             'DELETE',
                                             'GET',
                                             'HEAD',
                                             'OPTIONS',
                                             'PATCH',
                                             'POST',
                                             'PUT',
                                             'TRACE'}}}}}
Response
{'route': {'spec': {'httpRoute': {'match': {'method': {'CONNECT',
                                                       'DELETE',
                                                       'GET',
                                                       'HEAD',
                                                       'OPTIONS',
                                                       'PATCH',
                                                       'POST',
                                                       'PUT',
                                                       'TRACE'}}}}}}

Updates an existing route for a specified service mesh and virtual router.

See also: AWS API Documentation

Request Syntax

client.update_route(
    clientToken='string',
    meshName='string',
    routeName='string',
    spec={
        'httpRoute': {
            'action': {
                'weightedTargets': [
                    {
                        'virtualNode': 'string',
                        'weight': 123
                    },
                ]
            },
            'match': {
                'headers': [
                    {
                        'invert': True|False,
                        'match': {
                            'exact': 'string',
                            'prefix': 'string',
                            'range': {
                                'end': 123,
                                'start': 123
                            },
                            'regex': 'string',
                            'suffix': 'string'
                        },
                        'name': 'string'
                    },
                ],
                'method': 'CONNECT'|'DELETE'|'GET'|'HEAD'|'OPTIONS'|'PATCH'|'POST'|'PUT'|'TRACE',
                'prefix': 'string',
                'scheme': 'http'|'https'
            }
        },
        'priority': 123,
        'tcpRoute': {
            'action': {
                'weightedTargets': [
                    {
                        'virtualNode': 'string',
                        'weight': 123
                    },
                ]
            }
        }
    },
    virtualRouterName='string'
)
type clientToken:

string

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

This field is autopopulated if not provided.

type meshName:

string

param meshName:

[REQUIRED]

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

type routeName:

string

param routeName:

[REQUIRED]

The name of the route to update.

type spec:

dict

param spec:

[REQUIRED]

The new route specification to apply. This overwrites the existing data.

  • httpRoute (dict) --

    The HTTP routing information for the route.

    • action (dict) -- [REQUIRED]

      The action to take if a match is determined.

      • weightedTargets (list) -- [REQUIRED]

        The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

        • (dict) --

          An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

          • virtualNode (string) -- [REQUIRED]

            The virtual node to associate with the weighted target.

          • weight (integer) -- [REQUIRED]

            The relative weight of the weighted target.

    • match (dict) -- [REQUIRED]

      The criteria for determining an HTTP request match.

      • headers (list) --

        The client request headers to match on.

        • (dict) --

          An object representing the HTTP header in the request.

          • invert (boolean) --

            Specify True to match the opposite of the HeaderMatchMethod method and value. The default value is False.

          • match (dict) --

            The HeaderMatchMethod object.

            • exact (string) --

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

            • prefix (string) --

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

            • range (dict) --

              The object that specifies the range of numbers that the header value sent by the client must be included in.

              • end (integer) -- [REQUIRED]

                The end of the range.

              • start (integer) -- [REQUIRED]

                The start of the range.

            • regex (string) --

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

            • suffix (string) --

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

          • name (string) -- [REQUIRED]

            A name for the HTTP header in the client request that will be matched on.

      • method (string) --

        The client request header method to match on.

      • prefix (string) -- [REQUIRED]

        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.

      • scheme (string) --

        The client request header scheme to match on.

  • priority (integer) --

    The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.

  • tcpRoute (dict) --

    The TCP routing information for the route.

    • action (dict) -- [REQUIRED]

      The action to take if a match is determined.

      • weightedTargets (list) -- [REQUIRED]

        The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

        • (dict) --

          An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

          • virtualNode (string) -- [REQUIRED]

            The virtual node to associate with the weighted target.

          • weight (integer) -- [REQUIRED]

            The relative weight of the weighted target.

type virtualRouterName:

string

param virtualRouterName:

[REQUIRED]

The name of the virtual router that the route is associated with.

rtype:

dict

returns:

Response Syntax

{
    'route': {
        'meshName': 'string',
        'metadata': {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1),
            'uid': 'string',
            'version': 123
        },
        'routeName': 'string',
        'spec': {
            'httpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                },
                'match': {
                    'headers': [
                        {
                            'invert': True|False,
                            'match': {
                                'exact': 'string',
                                'prefix': 'string',
                                'range': {
                                    'end': 123,
                                    'start': 123
                                },
                                'regex': 'string',
                                'suffix': 'string'
                            },
                            'name': 'string'
                        },
                    ],
                    'method': 'CONNECT'|'DELETE'|'GET'|'HEAD'|'OPTIONS'|'PATCH'|'POST'|'PUT'|'TRACE',
                    'prefix': 'string',
                    'scheme': 'http'|'https'
                }
            },
            'priority': 123,
            'tcpRoute': {
                'action': {
                    'weightedTargets': [
                        {
                            'virtualNode': 'string',
                            'weight': 123
                        },
                    ]
                }
            }
        },
        'status': {
            'status': 'ACTIVE'|'DELETED'|'INACTIVE'
        },
        'virtualRouterName': 'string'
    }
}

Response Structure

  • (dict) --

    • route (dict) --

      A full description of the route that was updated.

      • meshName (string) --

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

      • metadata (dict) --

        The associated metadata for the route.

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

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

      • routeName (string) --

        The name of the route.

      • spec (dict) --

        The specifications of the route.

        • httpRoute (dict) --

          The HTTP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

          • match (dict) --

            The criteria for determining an HTTP request match.

            • headers (list) --

              The client request headers to match on.

              • (dict) --

                An object representing the HTTP header in the request.

                • invert (boolean) --

                  Specify True to match the opposite of the HeaderMatchMethod method and value. The default value is False.

                • match (dict) --

                  The HeaderMatchMethod object.

                  • exact (string) --

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

                  • prefix (string) --

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

                  • range (dict) --

                    The object that specifies the range of numbers that the header value sent by the client must be included in.

                    • end (integer) --

                      The end of the range.

                    • start (integer) --

                      The start of the range.

                  • regex (string) --

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

                  • suffix (string) --

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

                • name (string) --

                  A name for the HTTP header in the client request that will be matched on.

            • method (string) --

              The client request header method 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.

        • scheme (string) --

          The client request header scheme to match on.

        • priority (integer) --

          The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority.

        • tcpRoute (dict) --

          The TCP routing information for the route.

          • action (dict) --

            The action to take if a match is determined.

            • weightedTargets (list) --

              The targets that traffic is routed to when a request matches the route. You can specify one or more targets and their relative weights to distribute traffic with.

              • (dict) --

                An object representing a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10.

                • virtualNode (string) --

                  The virtual node to associate with the weighted target.

                • weight (integer) --

                  The relative weight of the weighted target.

      • status (dict) --

        The status of the route.

        • status (string) --

          The current status for the route.

      • virtualRouterName (string) --

        The virtual router that the route is associated with.