Amazon VPC Lattice

2024/05/13 - Amazon VPC Lattice - 8 updated api methods

Changes  This release adds TLS Passthrough support. It also increases max number of target group per rule to 10.

CreateListener (updated) Link ¶
Changes (both)
{'protocol': {'TLS_PASSTHROUGH'}}

Creates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services. For more information, see Listeners in the Amazon VPC Lattice User Guide .

See also: AWS API Documentation

Request Syntax

client.create_listener(
    clientToken='string',
    defaultAction={
        'fixedResponse': {
            'statusCode': 123
        },
        'forward': {
            'targetGroups': [
                {
                    'targetGroupIdentifier': 'string',
                    'weight': 123
                },
            ]
        }
    },
    name='string',
    port=123,
    protocol='HTTP'|'HTTPS'|'TLS_PASSTHROUGH',
    serviceIdentifier='string',
    tags={
        'string': 'string'
    }
)
type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails.

This field is autopopulated if not provided.

type defaultAction

dict

param defaultAction

[REQUIRED]

The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: fixedResponse, forward.

  • fixedResponse (dict) --

    The fixed response action. The rule returns a custom HTTP response.

    • statusCode (integer) -- [REQUIRED]

      The HTTP response code.

  • forward (dict) --

    The forward action. Traffic that matches the rule is forwarded to the specified target groups.

    • targetGroups (list) -- [REQUIRED]

      The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

      The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

      • (dict) --

        Describes the weight of a target group.

        • targetGroupIdentifier (string) -- [REQUIRED]

          The ID or Amazon Resource Name (ARN) of the target group.

        • weight (integer) --

          Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.

type name

string

param name

[REQUIRED]

The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.

type port

integer

param port

The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.

type protocol

string

param protocol

[REQUIRED]

The listener protocol.

type serviceIdentifier

string

param serviceIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the service.

type tags

dict

param tags

The tags for the listener.

  • (string) --

    The key of the tag.

    Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

    • (string) --

      The value of the tag.

      Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'defaultAction': {
        'fixedResponse': {
            'statusCode': 123
        },
        'forward': {
            'targetGroups': [
                {
                    'targetGroupIdentifier': 'string',
                    'weight': 123
                },
            ]
        }
    },
    'id': 'string',
    'name': 'string',
    'port': 123,
    'protocol': 'HTTP'|'HTTPS'|'TLS_PASSTHROUGH',
    'serviceArn': 'string',
    'serviceId': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the listener.

    • defaultAction (dict) --

      The action for the default rule.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: fixedResponse, forward. 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'}
      • fixedResponse (dict) --

        The fixed response action. The rule returns a custom HTTP response.

        • statusCode (integer) --

          The HTTP response code.

      • forward (dict) --

        The forward action. Traffic that matches the rule is forwarded to the specified target groups.

        • targetGroups (list) --

          The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

          The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

          • (dict) --

            Describes the weight of a target group.

            • targetGroupIdentifier (string) --

              The ID or Amazon Resource Name (ARN) of the target group.

            • weight (integer) --

              Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.

    • id (string) --

      The ID of the listener.

    • name (string) --

      The name of the listener.

    • port (integer) --

      The port number of the listener.

    • protocol (string) --

      The protocol of the listener.

    • serviceArn (string) --

      The Amazon Resource Name (ARN) of the service.

    • serviceId (string) --

      The ID of the service.

CreateTargetGroup (updated) Link ¶
Changes (both)
{'config': {'healthCheck': {'protocol': {'TCP'}}, 'protocol': {'TCP'}}}

Creates a target group. A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service.

For more information, see Target groups in the Amazon VPC Lattice User Guide .

See also: AWS API Documentation

Request Syntax

client.create_target_group(
    clientToken='string',
    config={
        'healthCheck': {
            'enabled': True|False,
            'healthCheckIntervalSeconds': 123,
            'healthCheckTimeoutSeconds': 123,
            'healthyThresholdCount': 123,
            'matcher': {
                'httpCode': 'string'
            },
            'path': 'string',
            'port': 123,
            'protocol': 'HTTP'|'HTTPS'|'TCP',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS'|'TCP',
        'protocolVersion': 'HTTP1'|'HTTP2'|'GRPC',
        'vpcIdentifier': 'string'
    },
    name='string',
    tags={
        'string': 'string'
    },
    type='IP'|'LAMBDA'|'INSTANCE'|'ALB'
)
type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails.

This field is autopopulated if not provided.

type config

dict

param config

The target group configuration.

  • healthCheck (dict) --

    The health check configuration. Not supported if the target group type is LAMBDA or ALB .

    • enabled (boolean) --

      Indicates whether health checking is enabled.

    • healthCheckIntervalSeconds (integer) --

      The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.

    • healthCheckTimeoutSeconds (integer) --

      The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

    • healthyThresholdCount (integer) --

      The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.

    • matcher (dict) --

      The codes to use when checking for a successful response from a target.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: httpCode.

      • httpCode (string) --

        The HTTP code to use when checking for a successful response from a target.

    • path (string) --

      The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is gRPC , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.

    • port (integer) --

      The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.

    • protocol (string) --

      The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS . The default is HTTP .

    • protocolVersion (string) --

      The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2 .

    • unhealthyThresholdCount (integer) --

      The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.

  • ipAddressType (string) --

    The type of IP address used for the target group. Supported only if the target group type is IP . The default is IPV4 .

  • lambdaEventStructureVersion (string) --

    The version of the event structure that your Lambda function receives. Supported only if the target group type is LAMBDA . The default is V1 .

  • port (integer) --

    The port on which the targets are listening. For HTTP, the default is 80. For HTTPS, the default is 443. Not supported if the target group type is LAMBDA .

  • protocol (string) --

    The protocol to use for routing traffic to the targets. The default is the protocol of the target group. Not supported if the target group type is LAMBDA .

  • protocolVersion (string) --

    The protocol version. The default is HTTP1 . Not supported if the target group type is LAMBDA .

  • vpcIdentifier (string) --

    The ID of the VPC. Not supported if the target group type is LAMBDA .

type name

string

param name

[REQUIRED]

The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.

type tags

dict

param tags

The tags for the target group.

  • (string) --

    The key of the tag.

    Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

    • (string) --

      The value of the tag.

      Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

type type

string

param type

[REQUIRED]

The type of target group.

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'config': {
        'healthCheck': {
            'enabled': True|False,
            'healthCheckIntervalSeconds': 123,
            'healthCheckTimeoutSeconds': 123,
            'healthyThresholdCount': 123,
            'matcher': {
                'httpCode': 'string'
            },
            'path': 'string',
            'port': 123,
            'protocol': 'HTTP'|'HTTPS'|'TCP',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS'|'TCP',
        'protocolVersion': 'HTTP1'|'HTTP2'|'GRPC',
        'vpcIdentifier': 'string'
    },
    'id': 'string',
    'name': 'string',
    'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED',
    'type': 'IP'|'LAMBDA'|'INSTANCE'|'ALB'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the target group.

    • config (dict) --

      The target group configuration.

      • healthCheck (dict) --

        The health check configuration. Not supported if the target group type is LAMBDA or ALB .

        • enabled (boolean) --

          Indicates whether health checking is enabled.

        • healthCheckIntervalSeconds (integer) --

          The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.

        • healthCheckTimeoutSeconds (integer) --

          The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

        • healthyThresholdCount (integer) --

          The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.

        • matcher (dict) --

          The codes to use when checking for a successful response from a target.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: httpCode. 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'}
          • httpCode (string) --

            The HTTP code to use when checking for a successful response from a target.

        • path (string) --

          The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is gRPC , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.

        • port (integer) --

          The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.

        • protocol (string) --

          The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS . The default is HTTP .

        • protocolVersion (string) --

          The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2 .

        • unhealthyThresholdCount (integer) --

          The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.

      • ipAddressType (string) --

        The type of IP address used for the target group. Supported only if the target group type is IP . The default is IPV4 .

      • lambdaEventStructureVersion (string) --

        The version of the event structure that your Lambda function receives. Supported only if the target group type is LAMBDA . The default is V1 .

      • port (integer) --

        The port on which the targets are listening. For HTTP, the default is 80. For HTTPS, the default is 443. Not supported if the target group type is LAMBDA .

      • protocol (string) --

        The protocol to use for routing traffic to the targets. The default is the protocol of the target group. Not supported if the target group type is LAMBDA .

      • protocolVersion (string) --

        The protocol version. The default is HTTP1 . Not supported if the target group type is LAMBDA .

      • vpcIdentifier (string) --

        The ID of the VPC. Not supported if the target group type is LAMBDA .

    • id (string) --

      The ID of the target group.

    • name (string) --

      The name of the target group.

    • status (string) --

      The status. You can retry the operation if the status is CREATE_FAILED . However, if you retry it while the status is CREATE_IN_PROGRESS , there is no change in the status.

    • type (string) --

      The type of target group.

GetListener (updated) Link ¶
Changes (response)
{'protocol': {'TLS_PASSTHROUGH'}}

Retrieves information about the specified listener for the specified service.

See also: AWS API Documentation

Request Syntax

client.get_listener(
    listenerIdentifier='string',
    serviceIdentifier='string'
)
type listenerIdentifier

string

param listenerIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the listener.

type serviceIdentifier

string

param serviceIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the service.

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'createdAt': datetime(2015, 1, 1),
    'defaultAction': {
        'fixedResponse': {
            'statusCode': 123
        },
        'forward': {
            'targetGroups': [
                {
                    'targetGroupIdentifier': 'string',
                    'weight': 123
                },
            ]
        }
    },
    'id': 'string',
    'lastUpdatedAt': datetime(2015, 1, 1),
    'name': 'string',
    'port': 123,
    'protocol': 'HTTP'|'HTTPS'|'TLS_PASSTHROUGH',
    'serviceArn': 'string',
    'serviceId': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the listener.

    • createdAt (datetime) --

      The date and time that the listener was created, specified in ISO-8601 format.

    • defaultAction (dict) --

      The actions for the default listener rule.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: fixedResponse, forward. 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'}
      • fixedResponse (dict) --

        The fixed response action. The rule returns a custom HTTP response.

        • statusCode (integer) --

          The HTTP response code.

      • forward (dict) --

        The forward action. Traffic that matches the rule is forwarded to the specified target groups.

        • targetGroups (list) --

          The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

          The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

          • (dict) --

            Describes the weight of a target group.

            • targetGroupIdentifier (string) --

              The ID or Amazon Resource Name (ARN) of the target group.

            • weight (integer) --

              Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.

    • id (string) --

      The ID of the listener.

    • lastUpdatedAt (datetime) --

      The date and time that the listener was last updated, specified in ISO-8601 format.

    • name (string) --

      The name of the listener.

    • port (integer) --

      The listener port.

    • protocol (string) --

      The listener protocol.

    • serviceArn (string) --

      The Amazon Resource Name (ARN) of the service.

    • serviceId (string) --

      The ID of the service.

GetTargetGroup (updated) Link ¶
Changes (response)
{'config': {'healthCheck': {'protocol': {'TCP'}}, 'protocol': {'TCP'}}}

Retrieves information about the specified target group.

See also: AWS API Documentation

Request Syntax

client.get_target_group(
    targetGroupIdentifier='string'
)
type targetGroupIdentifier

string

param targetGroupIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the target group.

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'config': {
        'healthCheck': {
            'enabled': True|False,
            'healthCheckIntervalSeconds': 123,
            'healthCheckTimeoutSeconds': 123,
            'healthyThresholdCount': 123,
            'matcher': {
                'httpCode': 'string'
            },
            'path': 'string',
            'port': 123,
            'protocol': 'HTTP'|'HTTPS'|'TCP',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS'|'TCP',
        'protocolVersion': 'HTTP1'|'HTTP2'|'GRPC',
        'vpcIdentifier': 'string'
    },
    'createdAt': datetime(2015, 1, 1),
    'failureCode': 'string',
    'failureMessage': 'string',
    'id': 'string',
    'lastUpdatedAt': datetime(2015, 1, 1),
    'name': 'string',
    'serviceArns': [
        'string',
    ],
    'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED',
    'type': 'IP'|'LAMBDA'|'INSTANCE'|'ALB'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the target group.

    • config (dict) --

      The target group configuration.

      • healthCheck (dict) --

        The health check configuration. Not supported if the target group type is LAMBDA or ALB .

        • enabled (boolean) --

          Indicates whether health checking is enabled.

        • healthCheckIntervalSeconds (integer) --

          The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.

        • healthCheckTimeoutSeconds (integer) --

          The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

        • healthyThresholdCount (integer) --

          The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.

        • matcher (dict) --

          The codes to use when checking for a successful response from a target.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: httpCode. 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'}
          • httpCode (string) --

            The HTTP code to use when checking for a successful response from a target.

        • path (string) --

          The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is gRPC , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.

        • port (integer) --

          The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.

        • protocol (string) --

          The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS . The default is HTTP .

        • protocolVersion (string) --

          The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2 .

        • unhealthyThresholdCount (integer) --

          The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.

      • ipAddressType (string) --

        The type of IP address used for the target group. Supported only if the target group type is IP . The default is IPV4 .

      • lambdaEventStructureVersion (string) --

        The version of the event structure that your Lambda function receives. Supported only if the target group type is LAMBDA . The default is V1 .

      • port (integer) --

        The port on which the targets are listening. For HTTP, the default is 80. For HTTPS, the default is 443. Not supported if the target group type is LAMBDA .

      • protocol (string) --

        The protocol to use for routing traffic to the targets. The default is the protocol of the target group. Not supported if the target group type is LAMBDA .

      • protocolVersion (string) --

        The protocol version. The default is HTTP1 . Not supported if the target group type is LAMBDA .

      • vpcIdentifier (string) --

        The ID of the VPC. Not supported if the target group type is LAMBDA .

    • createdAt (datetime) --

      The date and time that the target group was created, specified in ISO-8601 format.

    • failureCode (string) --

      The failure code.

    • failureMessage (string) --

      The failure message.

    • id (string) --

      The ID of the target group.

    • lastUpdatedAt (datetime) --

      The date and time that the target group was last updated, specified in ISO-8601 format.

    • name (string) --

      The name of the target group.

    • serviceArns (list) --

      The Amazon Resource Names (ARNs) of the service.

      • (string) --

    • status (string) --

      The status.

    • type (string) --

      The target group type.

ListListeners (updated) Link ¶
Changes (response)
{'items': {'protocol': {'TLS_PASSTHROUGH'}}}

Lists the listeners for the specified service.

See also: AWS API Documentation

Request Syntax

client.list_listeners(
    maxResults=123,
    nextToken='string',
    serviceIdentifier='string'
)
type maxResults

integer

param maxResults

The maximum number of results to return.

type nextToken

string

param nextToken

A pagination token for the next page of results.

type serviceIdentifier

string

param serviceIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the service.

rtype

dict

returns

Response Syntax

{
    'items': [
        {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'id': 'string',
            'lastUpdatedAt': datetime(2015, 1, 1),
            'name': 'string',
            'port': 123,
            'protocol': 'HTTP'|'HTTPS'|'TLS_PASSTHROUGH'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      Information about the listeners.

      • (dict) --

        Summary information about a listener.

        • arn (string) --

          The Amazon Resource Name (ARN) of the listener.

        • createdAt (datetime) --

          The date and time that the listener was created, specified in ISO-8601 format.

        • id (string) --

          The ID of the listener.

        • lastUpdatedAt (datetime) --

          The date and time that the listener was last updated, specified in ISO-8601 format.

        • name (string) --

          The name of the listener.

        • port (integer) --

          The listener port.

        • protocol (string) --

          The listener protocol.

    • nextToken (string) --

      If there are additional results, a pagination token for the next page of results.

ListTargetGroups (updated) Link ¶
Changes (response)
{'items': {'protocol': {'TCP'}}}

Lists your target groups. You can narrow your search by using the filters below in your request.

See also: AWS API Documentation

Request Syntax

client.list_target_groups(
    maxResults=123,
    nextToken='string',
    targetGroupType='IP'|'LAMBDA'|'INSTANCE'|'ALB',
    vpcIdentifier='string'
)
type maxResults

integer

param maxResults

The maximum number of results to return.

type nextToken

string

param nextToken

A pagination token for the next page of results.

type targetGroupType

string

param targetGroupType

The target group type.

type vpcIdentifier

string

param vpcIdentifier

The ID or Amazon Resource Name (ARN) of the VPC.

rtype

dict

returns

Response Syntax

{
    'items': [
        {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'id': 'string',
            'ipAddressType': 'IPV4'|'IPV6',
            'lambdaEventStructureVersion': 'V1'|'V2',
            'lastUpdatedAt': datetime(2015, 1, 1),
            'name': 'string',
            'port': 123,
            'protocol': 'HTTP'|'HTTPS'|'TCP',
            'serviceArns': [
                'string',
            ],
            'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED',
            'type': 'IP'|'LAMBDA'|'INSTANCE'|'ALB',
            'vpcIdentifier': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      Information about the target groups.

      • (dict) --

        Summary information about a target group.

        For more information, see Target groups in the Amazon VPC Lattice User Guide .

        • arn (string) --

          The ARN (Amazon Resource Name) of the target group.

        • createdAt (datetime) --

          The date and time that the target group was created, specified in ISO-8601 format.

        • id (string) --

          The ID of the target group.

        • ipAddressType (string) --

          The type of IP address used for the target group. The possible values are IPV4 and IPV6 . This is an optional parameter. If not specified, the default is IPV4 .

        • lambdaEventStructureVersion (string) --

          The version of the event structure that your Lambda function receives. Supported only if the target group type is LAMBDA .

        • lastUpdatedAt (datetime) --

          The date and time that the target group was last updated, specified in ISO-8601 format.

        • name (string) --

          The name of the target group.

        • port (integer) --

          The port of the target group.

        • protocol (string) --

          The protocol of the target group.

        • serviceArns (list) --

          The Amazon Resource Names (ARNs) of the service.

          • (string) --

        • status (string) --

          The status.

        • type (string) --

          The target group type.

        • vpcIdentifier (string) --

          The ID of the VPC of the target group.

    • nextToken (string) --

      If there are additional results, a pagination token for the next page of results.

UpdateListener (updated) Link ¶
Changes (response)
{'protocol': {'TLS_PASSTHROUGH'}}

Updates the specified listener for the specified service.

See also: AWS API Documentation

Request Syntax

client.update_listener(
    defaultAction={
        'fixedResponse': {
            'statusCode': 123
        },
        'forward': {
            'targetGroups': [
                {
                    'targetGroupIdentifier': 'string',
                    'weight': 123
                },
            ]
        }
    },
    listenerIdentifier='string',
    serviceIdentifier='string'
)
type defaultAction

dict

param defaultAction

[REQUIRED]

The action for the default rule.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: fixedResponse, forward.

  • fixedResponse (dict) --

    The fixed response action. The rule returns a custom HTTP response.

    • statusCode (integer) -- [REQUIRED]

      The HTTP response code.

  • forward (dict) --

    The forward action. Traffic that matches the rule is forwarded to the specified target groups.

    • targetGroups (list) -- [REQUIRED]

      The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

      The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

      • (dict) --

        Describes the weight of a target group.

        • targetGroupIdentifier (string) -- [REQUIRED]

          The ID or Amazon Resource Name (ARN) of the target group.

        • weight (integer) --

          Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.

type listenerIdentifier

string

param listenerIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the listener.

type serviceIdentifier

string

param serviceIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the service.

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'defaultAction': {
        'fixedResponse': {
            'statusCode': 123
        },
        'forward': {
            'targetGroups': [
                {
                    'targetGroupIdentifier': 'string',
                    'weight': 123
                },
            ]
        }
    },
    'id': 'string',
    'name': 'string',
    'port': 123,
    'protocol': 'HTTP'|'HTTPS'|'TLS_PASSTHROUGH',
    'serviceArn': 'string',
    'serviceId': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the listener.

    • defaultAction (dict) --

      The action for the default rule.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: fixedResponse, forward. 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'}
      • fixedResponse (dict) --

        The fixed response action. The rule returns a custom HTTP response.

        • statusCode (integer) --

          The HTTP response code.

      • forward (dict) --

        The forward action. Traffic that matches the rule is forwarded to the specified target groups.

        • targetGroups (list) --

          The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

          The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

          • (dict) --

            Describes the weight of a target group.

            • targetGroupIdentifier (string) --

              The ID or Amazon Resource Name (ARN) of the target group.

            • weight (integer) --

              Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.

    • id (string) --

      The ID of the listener.

    • name (string) --

      The name of the listener.

    • port (integer) --

      The listener port.

    • protocol (string) --

      The protocol of the listener.

    • serviceArn (string) --

      The Amazon Resource Name (ARN) of the service.

    • serviceId (string) --

      The ID of the service.

UpdateTargetGroup (updated) Link ¶
Changes (request, response)
Request
{'healthCheck': {'protocol': {'TCP'}}}
Response
{'config': {'healthCheck': {'protocol': {'TCP'}}, 'protocol': {'TCP'}}}

Updates the specified target group.

See also: AWS API Documentation

Request Syntax

client.update_target_group(
    healthCheck={
        'enabled': True|False,
        'healthCheckIntervalSeconds': 123,
        'healthCheckTimeoutSeconds': 123,
        'healthyThresholdCount': 123,
        'matcher': {
            'httpCode': 'string'
        },
        'path': 'string',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS'|'TCP',
        'protocolVersion': 'HTTP1'|'HTTP2',
        'unhealthyThresholdCount': 123
    },
    targetGroupIdentifier='string'
)
type healthCheck

dict

param healthCheck

[REQUIRED]

The health check configuration.

  • enabled (boolean) --

    Indicates whether health checking is enabled.

  • healthCheckIntervalSeconds (integer) --

    The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.

  • healthCheckTimeoutSeconds (integer) --

    The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

  • healthyThresholdCount (integer) --

    The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.

  • matcher (dict) --

    The codes to use when checking for a successful response from a target.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: httpCode.

    • httpCode (string) --

      The HTTP code to use when checking for a successful response from a target.

  • path (string) --

    The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is gRPC , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.

  • port (integer) --

    The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.

  • protocol (string) --

    The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS . The default is HTTP .

  • protocolVersion (string) --

    The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2 .

  • unhealthyThresholdCount (integer) --

    The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.

type targetGroupIdentifier

string

param targetGroupIdentifier

[REQUIRED]

The ID or Amazon Resource Name (ARN) of the target group.

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'config': {
        'healthCheck': {
            'enabled': True|False,
            'healthCheckIntervalSeconds': 123,
            'healthCheckTimeoutSeconds': 123,
            'healthyThresholdCount': 123,
            'matcher': {
                'httpCode': 'string'
            },
            'path': 'string',
            'port': 123,
            'protocol': 'HTTP'|'HTTPS'|'TCP',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS'|'TCP',
        'protocolVersion': 'HTTP1'|'HTTP2'|'GRPC',
        'vpcIdentifier': 'string'
    },
    'id': 'string',
    'name': 'string',
    'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED',
    'type': 'IP'|'LAMBDA'|'INSTANCE'|'ALB'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the target group.

    • config (dict) --

      The target group configuration.

      • healthCheck (dict) --

        The health check configuration. Not supported if the target group type is LAMBDA or ALB .

        • enabled (boolean) --

          Indicates whether health checking is enabled.

        • healthCheckIntervalSeconds (integer) --

          The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.

        • healthCheckTimeoutSeconds (integer) --

          The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

        • healthyThresholdCount (integer) --

          The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.

        • matcher (dict) --

          The codes to use when checking for a successful response from a target.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: httpCode. 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'}
          • httpCode (string) --

            The HTTP code to use when checking for a successful response from a target.

        • path (string) --

          The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is gRPC , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.

        • port (integer) --

          The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.

        • protocol (string) --

          The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS . The default is HTTP .

        • protocolVersion (string) --

          The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2 .

        • unhealthyThresholdCount (integer) --

          The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.

      • ipAddressType (string) --

        The type of IP address used for the target group. Supported only if the target group type is IP . The default is IPV4 .

      • lambdaEventStructureVersion (string) --

        The version of the event structure that your Lambda function receives. Supported only if the target group type is LAMBDA . The default is V1 .

      • port (integer) --

        The port on which the targets are listening. For HTTP, the default is 80. For HTTPS, the default is 443. Not supported if the target group type is LAMBDA .

      • protocol (string) --

        The protocol to use for routing traffic to the targets. The default is the protocol of the target group. Not supported if the target group type is LAMBDA .

      • protocolVersion (string) --

        The protocol version. The default is HTTP1 . Not supported if the target group type is LAMBDA .

      • vpcIdentifier (string) --

        The ID of the VPC. Not supported if the target group type is LAMBDA .

    • id (string) --

      The ID of the target group.

    • name (string) --

      The name of the target group.

    • status (string) --

      The status.

    • type (string) --

      The target group type.