GetLoadBalancers

class Lightsail.Paginator.GetLoadBalancers
paginator = client.get_paginator('get_load_balancers')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Lightsail.Client.get_load_balancers().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
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.

  • StartingToken (string) --

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

Return type
dict
Returns
Response Syntax
{
    'loadBalancers': [
        {
            'name': 'string',
            'arn': 'string',
            'supportCode': 'string',
            'createdAt': datetime(2015, 1, 1),
            'location': {
                'availabilityZone': 'string',
                'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
            },
            'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
            'tags': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'dnsName': 'string',
            'state': 'active'|'provisioning'|'active_impaired'|'failed'|'unknown',
            'protocol': 'HTTP_HTTPS'|'HTTP',
            'publicPorts': [
                123,
            ],
            'healthCheckPath': 'string',
            'instancePort': 123,
            'instanceHealthSummary': [
                {
                    'instanceName': 'string',
                    'instanceHealth': 'initial'|'healthy'|'unhealthy'|'unused'|'draining'|'unavailable',
                    'instanceHealthReason': 'Lb.RegistrationInProgress'|'Lb.InitialHealthChecking'|'Lb.InternalError'|'Instance.ResponseCodeMismatch'|'Instance.Timeout'|'Instance.FailedHealthChecks'|'Instance.NotRegistered'|'Instance.NotInUse'|'Instance.DeregistrationInProgress'|'Instance.InvalidState'|'Instance.IpUnusable'
                },
            ],
            'tlsCertificateSummaries': [
                {
                    'name': 'string',
                    'isAttached': True|False
                },
            ],
            'configurationOptions': {
                'string': 'string'
            },
            'ipAddressType': 'dualstack'|'ipv4',
            'httpsRedirectionEnabled': True|False,
            'tlsPolicyName': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • loadBalancers (list) --

      An array of LoadBalancer objects describing your load balancers.

      • (dict) --

        Describes a load balancer.

        • name (string) --

          The name of the load balancer (e.g., my-load-balancer ).

        • arn (string) --

          The Amazon Resource Name (ARN) of the load balancer.

        • supportCode (string) --

          The support code. Include this code in your email to support when you have questions about your Lightsail load balancer. This code enables our support team to look up your Lightsail information more easily.

        • createdAt (datetime) --

          The date when your load balancer was created.

        • location (dict) --

          The AWS Region where your load balancer was created (e.g., us-east-2a ). Lightsail automatically creates your load balancer across Availability Zones.

          • availabilityZone (string) --

            The Availability Zone. Follows the format us-east-2a (case-sensitive).

          • regionName (string) --

            The Amazon Web Services Region name.

        • resourceType (string) --

          The resource type (e.g., LoadBalancer .

        • tags (list) --

          The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

          • (dict) --

            Describes a tag key and optional value assigned to an Amazon Lightsail resource.

            For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

            • key (string) --

              The key of the tag.

              Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @

            • value (string) --

              The value of the tag.

              Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @

        • dnsName (string) --

          The DNS name of your Lightsail load balancer.

        • state (string) --

          The status of your load balancer. Valid values are below.

        • protocol (string) --

          The protocol you have enabled for your load balancer. Valid values are below.

          You can't just have HTTP_HTTPS , but you can have just HTTP .

        • publicPorts (list) --

          An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443.

          • (integer) --
        • healthCheckPath (string) --

          The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a request to the default (root) page.

        • instancePort (integer) --

          The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443.

        • instanceHealthSummary (list) --

          An array of InstanceHealthSummary objects describing the health of the load balancer.

          • (dict) --

            Describes information about the health of the instance.

            • instanceName (string) --

              The name of the Lightsail instance for which you are requesting health check data.

            • instanceHealth (string) --

              Describes the overall instance health. Valid values are below.

            • instanceHealthReason (string) --

              More information about the instance health. If the instanceHealth is healthy , then an instanceHealthReason value is not provided.

              If instanceHealth is initial , the instanceHealthReason value can be one of the following:

              • Lb.RegistrationInProgress - The target instance is in the process of being registered with the load balancer.
              • Lb.InitialHealthChecking - The Lightsail load balancer is still sending the target instance the minimum number of health checks required to determine its health status.

              If instanceHealth is unhealthy , the instanceHealthReason value can be one of the following:

              • Instance.ResponseCodeMismatch - The health checks did not return an expected HTTP code.
              • Instance.Timeout - The health check requests timed out.
              • Instance.FailedHealthChecks - The health checks failed because the connection to the target instance timed out, the target instance response was malformed, or the target instance failed the health check for an unknown reason.
              • Lb.InternalError - The health checks failed due to an internal error.

              If instanceHealth is unused , the instanceHealthReason value can be one of the following:

              • Instance.NotRegistered - The target instance is not registered with the target group.
              • Instance.NotInUse - The target group is not used by any load balancer, or the target instance is in an Availability Zone that is not enabled for its load balancer.
              • Instance.IpUnusable - The target IP address is reserved for use by a Lightsail load balancer.
              • Instance.InvalidState - The target is in the stopped or terminated state.

              If instanceHealth is draining , the instanceHealthReason value can be one of the following:

              • Instance.DeregistrationInProgress - The target instance is in the process of being deregistered and the deregistration delay period has not expired.
        • tlsCertificateSummaries (list) --

          An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS certificates. For example, if true , the certificate is attached to the load balancer.

          • (dict) --

            Provides a summary of SSL/TLS certificate metadata.

            • name (string) --

              The name of the SSL/TLS certificate.

            • isAttached (boolean) --

              When true , the SSL/TLS certificate is attached to the Lightsail load balancer.

        • configurationOptions (dict) --

          A string to string map of the configuration options for your load balancer. Valid values are listed below.

          • (string) --
            • (string) --
        • ipAddressType (string) --

          The IP address type of the load balancer.

          The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.

        • httpsRedirectionEnabled (boolean) --

          A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer.

        • tlsPolicyName (string) --

          The name of the TLS security policy for the load balancer.

    • NextToken (string) --

      A token to resume pagination.