Elastic Load Balancing

2017/01/25 - Elastic Load Balancing - 1 new 2 updated api methods

SetIpAddressType (new) Link ¶

Sets the type of IP addresses used by the subnets of the specified Application Load Balancer.

See also: AWS API Documentation

Request Syntax

client.set_ip_address_type(
    LoadBalancerArn='string',
    IpAddressType='ipv4'|'dualstack'
)
type LoadBalancerArn

string

param LoadBalancerArn

[REQUIRED]

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

type IpAddressType

string

param IpAddressType

[REQUIRED]

The IP address type. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use ipv4 .

rtype

dict

returns

Response Syntax

{
    'IpAddressType': 'ipv4'|'dualstack'
}

Response Structure

  • (dict) --

    • IpAddressType (string) --

      The IP address type.

CreateLoadBalancer (updated) Link ¶
Changes (request, response)
Request
{'IpAddressType': 'ipv4 | dualstack'}
Response
{'LoadBalancers': {'IpAddressType': 'ipv4 | dualstack'}}

Creates an Application Load Balancer.

When you create a load balancer, you can specify security groups, subnets, IP address type, and tags. Otherwise, you could do so later using SetSecurityGroups , SetSubnets , SetIpAddressType , and AddTags .

To create listeners for your load balancer, use CreateListener . To describe your current load balancers, see DescribeLoadBalancers . When you are finished with a load balancer, you can delete it using DeleteLoadBalancer .

You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see Limits for Your Application Load Balancer in the Application Load Balancers Guide .

For more information, see Application Load Balancers in the Application Load Balancers Guide .

See also: AWS API Documentation

Request Syntax

client.create_load_balancer(
    Name='string',
    Subnets=[
        'string',
    ],
    SecurityGroups=[
        'string',
    ],
    Scheme='internet-facing'|'internal',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    IpAddressType='ipv4'|'dualstack'
)
type Name

string

param Name

[REQUIRED]

The name of the load balancer.

This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.

type Subnets

list

param Subnets

[REQUIRED]

The IDs of the subnets to attach to the load balancer. You can specify only one subnet per Availability Zone. You must specify subnets from at least two Availability Zones.

  • (string) --

type SecurityGroups

list

param SecurityGroups

The IDs of the security groups to assign to the load balancer.

  • (string) --

type Scheme

string

param Scheme

The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the Internet.

The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.

The default is an Internet-facing load balancer.

type Tags

list

param Tags

One or more tags to assign to the load balancer.

  • (dict) --

    Information about a tag.

    • Key (string) -- [REQUIRED]

      The key of the tag.

    • Value (string) --

      The value of the tag.

type IpAddressType

string

param IpAddressType

The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use ipv4 .

rtype

dict

returns

Response Syntax

{
    'LoadBalancers': [
        {
            'LoadBalancerArn': 'string',
            'DNSName': 'string',
            'CanonicalHostedZoneId': 'string',
            'CreatedTime': datetime(2015, 1, 1),
            'LoadBalancerName': 'string',
            'Scheme': 'internet-facing'|'internal',
            'VpcId': 'string',
            'State': {
                'Code': 'active'|'provisioning'|'failed',
                'Reason': 'string'
            },
            'Type': 'application',
            'AvailabilityZones': [
                {
                    'ZoneName': 'string',
                    'SubnetId': 'string'
                },
            ],
            'SecurityGroups': [
                'string',
            ],
            'IpAddressType': 'ipv4'|'dualstack'
        },
    ]
}

Response Structure

  • (dict) --

    • LoadBalancers (list) --

      Information about the load balancer.

      • (dict) --

        Information about a load balancer.

        • LoadBalancerArn (string) --

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

        • DNSName (string) --

          The public DNS name of the load balancer.

        • CanonicalHostedZoneId (string) --

          The ID of the Amazon Route 53 hosted zone associated with the load balancer.

        • CreatedTime (datetime) --

          The date and time the load balancer was created.

        • LoadBalancerName (string) --

          The name of the load balancer.

        • Scheme (string) --

          The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the Internet.

          The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.

        • VpcId (string) --

          The ID of the VPC for the load balancer.

        • State (dict) --

          The state of the load balancer.

          • Code (string) --

            The state code. The initial state of the load balancer is provisioning . After the load balancer is fully set up and ready to route traffic, its state is active . If the load balancer could not be set up, its state is failed .

          • Reason (string) --

            A description of the state.

        • Type (string) --

          The type of load balancer.

        • AvailabilityZones (list) --

          The Availability Zones for the load balancer.

          • (dict) --

            Information about an Availability Zone.

            • ZoneName (string) --

              The name of the Availability Zone.

            • SubnetId (string) --

              The ID of the subnet.

        • SecurityGroups (list) --

          The IDs of the security groups for the load balancer.

          • (string) --

        • IpAddressType (string) --

          The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

DescribeLoadBalancers (updated) Link ¶
Changes (response)
{'LoadBalancers': {'IpAddressType': 'ipv4 | dualstack'}}

Describes the specified Application Load Balancers or all of your Application Load Balancers.

To describe the listeners for a load balancer, use DescribeListeners . To describe the attributes for a load balancer, use DescribeLoadBalancerAttributes .

See also: AWS API Documentation

Request Syntax

client.describe_load_balancers(
    LoadBalancerArns=[
        'string',
    ],
    Names=[
        'string',
    ],
    Marker='string',
    PageSize=123
)
type LoadBalancerArns

list

param LoadBalancerArns

The Amazon Resource Names (ARN) of the load balancers.

  • (string) --

type Names

list

param Names

The names of the load balancers.

  • (string) --

type Marker

string

param Marker

The marker for the next set of results. (You received this marker from a previous call.)

type PageSize

integer

param PageSize

The maximum number of results to return with this call.

rtype

dict

returns

Response Syntax

{
    'LoadBalancers': [
        {
            'LoadBalancerArn': 'string',
            'DNSName': 'string',
            'CanonicalHostedZoneId': 'string',
            'CreatedTime': datetime(2015, 1, 1),
            'LoadBalancerName': 'string',
            'Scheme': 'internet-facing'|'internal',
            'VpcId': 'string',
            'State': {
                'Code': 'active'|'provisioning'|'failed',
                'Reason': 'string'
            },
            'Type': 'application',
            'AvailabilityZones': [
                {
                    'ZoneName': 'string',
                    'SubnetId': 'string'
                },
            ],
            'SecurityGroups': [
                'string',
            ],
            'IpAddressType': 'ipv4'|'dualstack'
        },
    ],
    'NextMarker': 'string'
}

Response Structure

  • (dict) --

    • LoadBalancers (list) --

      Information about the load balancers.

      • (dict) --

        Information about a load balancer.

        • LoadBalancerArn (string) --

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

        • DNSName (string) --

          The public DNS name of the load balancer.

        • CanonicalHostedZoneId (string) --

          The ID of the Amazon Route 53 hosted zone associated with the load balancer.

        • CreatedTime (datetime) --

          The date and time the load balancer was created.

        • LoadBalancerName (string) --

          The name of the load balancer.

        • Scheme (string) --

          The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the Internet.

          The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.

        • VpcId (string) --

          The ID of the VPC for the load balancer.

        • State (dict) --

          The state of the load balancer.

          • Code (string) --

            The state code. The initial state of the load balancer is provisioning . After the load balancer is fully set up and ready to route traffic, its state is active . If the load balancer could not be set up, its state is failed .

          • Reason (string) --

            A description of the state.

        • Type (string) --

          The type of load balancer.

        • AvailabilityZones (list) --

          The Availability Zones for the load balancer.

          • (dict) --

            Information about an Availability Zone.

            • ZoneName (string) --

              The name of the Availability Zone.

            • SubnetId (string) --

              The ID of the subnet.

        • SecurityGroups (list) --

          The IDs of the security groups for the load balancer.

          • (string) --

        • IpAddressType (string) --

          The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

    • NextMarker (string) --

      The marker to use when requesting the next set of results. If there are no additional results, the string is empty.