Amazon VPC Lattice

2023/09/05 - Amazon VPC Lattice - 4 updated api methods

Changes  This release adds Lambda event structure version config support for LAMBDA target groups. It also adds newline support for auth policies.

CreateTargetGroup (updated) Link ¶
Changes (both)
{'config': {'lambdaEventStructureVersion': 'V1 | V2'}}

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',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS',
        '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. If type is set to LAMBDA , this parameter doesn't apply.

  • healthCheck (dict) --

    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. These are called Success codes in the console.

      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. The possible values are ipv4 and ipv6 . This is an optional parameter. If not specified, the IP address type defaults to ipv4 .

  • lambdaEventStructureVersion (string) --

    Lambda event structure version

  • port (integer) --

    The port on which the targets are listening. For HTTP, the default is 80 . For HTTPS, the default is 443

  • protocol (string) --

    The protocol to use for routing traffic to the targets. Default is the protocol of a target group.

  • protocolVersion (string) --

    The protocol version. Default value is HTTP1 .

  • vpcIdentifier (string) --

    The ID of the VPC.

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',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS',
        '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. If type is set to LAMBDA , this parameter doesn't apply.

      • healthCheck (dict) --

        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. These are called Success codes in the console.

          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. The possible values are ipv4 and ipv6 . This is an optional parameter. If not specified, the IP address type defaults to ipv4 .

      • lambdaEventStructureVersion (string) --

        Lambda event structure version

      • port (integer) --

        The port on which the targets are listening. For HTTP, the default is 80 . For HTTPS, the default is 443

      • protocol (string) --

        The protocol to use for routing traffic to the targets. Default is the protocol of a target group.

      • protocolVersion (string) --

        The protocol version. Default value is HTTP1 .

      • vpcIdentifier (string) --

        The ID of the VPC.

    • id (string) --

      The ID of the target group.

    • name (string) --

      The name of the target group.

    • status (string) --

      The operation's 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.

GetTargetGroup (updated) Link ¶
Changes (response)
{'config': {'lambdaEventStructureVersion': 'V1 | V2'}}

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',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS',
        '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.

        • 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. These are called Success codes in the console.

          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. The possible values are ipv4 and ipv6 . This is an optional parameter. If not specified, the IP address type defaults to ipv4 .

      • lambdaEventStructureVersion (string) --

        Lambda event structure version

      • port (integer) --

        The port on which the targets are listening. For HTTP, the default is 80 . For HTTPS, the default is 443

      • protocol (string) --

        The protocol to use for routing traffic to the targets. Default is the protocol of a target group.

      • protocolVersion (string) --

        The protocol version. Default value is HTTP1 .

      • vpcIdentifier (string) --

        The ID of the VPC.

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

ListTargetGroups (updated) Link ¶
Changes (response)
{'items': {'lambdaEventStructureVersion': 'V1 | V2'}}

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

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',
            '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.

        • 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 IP address type defaults to ipv4 .

        • lambdaEventStructureVersion (string) --

          Lambda event structure version

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

UpdateTargetGroup (updated) Link ¶
Changes (response)
{'config': {'lambdaEventStructureVersion': 'V1 | V2'}}

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',
        '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. These are called Success codes in the console.

    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',
            'protocolVersion': 'HTTP1'|'HTTP2',
            'unhealthyThresholdCount': 123
        },
        'ipAddressType': 'IPV4'|'IPV6',
        'lambdaEventStructureVersion': 'V1'|'V2',
        'port': 123,
        'protocol': 'HTTP'|'HTTPS',
        '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.

        • 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. These are called Success codes in the console.

          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. The possible values are ipv4 and ipv6 . This is an optional parameter. If not specified, the IP address type defaults to ipv4 .

      • lambdaEventStructureVersion (string) --

        Lambda event structure version

      • port (integer) --

        The port on which the targets are listening. For HTTP, the default is 80 . For HTTPS, the default is 443

      • protocol (string) --

        The protocol to use for routing traffic to the targets. Default is the protocol of a target group.

      • protocolVersion (string) --

        The protocol version. Default value is HTTP1 .

      • vpcIdentifier (string) --

        The ID of the VPC.

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