VPCLattice / Paginator / ListTargets

ListTargets#

class VPCLattice.Paginator.ListTargets#
paginator = client.get_paginator('list_targets')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from VPCLattice.Client.list_targets().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    targetGroupIdentifier='string',
    targets=[
        {
            'id': 'string',
            'port': 123
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • targetGroupIdentifier (string) –

    [REQUIRED]

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

  • targets (list) –

    The targets.

    • (dict) –

      Describes a target.

      • id (string) – [REQUIRED]

        The ID of the target. If the target group type is INSTANCE, this is an instance ID. If the target group type is IP, this is an IP address. If the target group type is LAMBDA, this is the ARN of a Lambda function. If the target group type is ALB, this is the ARN of an Application Load Balancer.

      • port (integer) –

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

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'port': 123,
            'reasonCode': 'string',
            'status': 'DRAINING'|'UNAVAILABLE'|'HEALTHY'|'UNHEALTHY'|'INITIAL'|'UNUSED'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • items (list) –

      Information about the targets.

      • (dict) –

        Summary information about a target.

        • id (string) –

          The ID of the target. If the target group type is INSTANCE, this is an instance ID. If the target group type is IP, this is an IP address. If the target group type is LAMBDA, this is the ARN of a Lambda function. If the target type is ALB, this is the ARN of an Application Load Balancer.

        • port (integer) –

          The port on which the target is listening.

        • reasonCode (string) –

          The code for why the target status is what it is.

        • status (string) –

          The status of the target.

          • DRAINING: The target is being deregistered. No new connections are sent to this target while current connections are being drained. The default draining time is 5 minutes.

          • UNAVAILABLE: Health checks are unavailable for the target group.

          • HEALTHY: The target is healthy.

          • UNHEALTHY: The target is unhealthy.

          • INITIAL: Initial health checks on the target are being performed.

          • UNUSED: Target group is not used in a service.

    • NextToken (string) –

      A token to resume pagination.