Elastic Load Balancing

2024/11/20 - Elastic Load Balancing - 2 new api methods

Changes  This release adds support for configuring Load balancer Capacity Unit reservations

ModifyCapacityReservation (new) Link ¶

Modifies the capacity reservation of the specified load balancer.

When modifying capacity reservation, you must include at least one MinimumLoadBalancerCapacity or ResetCapacityReservation.

See also: AWS API Documentation

Request Syntax

client.modify_capacity_reservation(
    LoadBalancerArn='string',
    MinimumLoadBalancerCapacity={
        'CapacityUnits': 123
    },
    ResetCapacityReservation=True|False
)
type LoadBalancerArn:

string

param LoadBalancerArn:

[REQUIRED]

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

type MinimumLoadBalancerCapacity:

dict

param MinimumLoadBalancerCapacity:

The minimum load balancer capacity reserved.

  • CapacityUnits (integer) --

    The number of capacity units.

type ResetCapacityReservation:

boolean

param ResetCapacityReservation:

Resets the capacity reservation.

rtype:

dict

returns:

Response Syntax

{
    'LastModifiedTime': datetime(2015, 1, 1),
    'DecreaseRequestsRemaining': 123,
    'MinimumLoadBalancerCapacity': {
        'CapacityUnits': 123
    },
    'CapacityReservationState': [
        {
            'State': {
                'Code': 'provisioned'|'pending'|'rebalancing'|'failed',
                'Reason': 'string'
            },
            'AvailabilityZone': 'string',
            'EffectiveCapacityUnits': 123.0
        },
    ]
}

Response Structure

  • (dict) --

    • LastModifiedTime (datetime) --

      The last time the capacity reservation was modified.

    • DecreaseRequestsRemaining (integer) --

      The amount of daily capacity decreases remaining.

    • MinimumLoadBalancerCapacity (dict) --

      The requested minimum capacity reservation for the load balancer

      • CapacityUnits (integer) --

        The number of capacity units.

    • CapacityReservationState (list) --

      The state of the capacity reservation.

      • (dict) --

        The capacity reservation status for each availability zone.

        • State (dict) --

          The state of the capacity reservation.

          • Code (string) --

            The status code.

          • Reason (string) --

            The reason code for the status.

        • AvailabilityZone (string) --

          Information about the availability zone.

        • EffectiveCapacityUnits (float) --

          The number of effective capacity units.

DescribeCapacityReservation (new) Link ¶

Describes the capacity reservation status for the specified load balancer.

See also: AWS API Documentation

Request Syntax

client.describe_capacity_reservation(
    LoadBalancerArn='string'
)
type LoadBalancerArn:

string

param LoadBalancerArn:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{
    'LastModifiedTime': datetime(2015, 1, 1),
    'DecreaseRequestsRemaining': 123,
    'MinimumLoadBalancerCapacity': {
        'CapacityUnits': 123
    },
    'CapacityReservationState': [
        {
            'State': {
                'Code': 'provisioned'|'pending'|'rebalancing'|'failed',
                'Reason': 'string'
            },
            'AvailabilityZone': 'string',
            'EffectiveCapacityUnits': 123.0
        },
    ]
}

Response Structure

  • (dict) --

    • LastModifiedTime (datetime) --

      The last time the capacity reservation was modified.

    • DecreaseRequestsRemaining (integer) --

      The amount of daily capacity decreases remaining.

    • MinimumLoadBalancerCapacity (dict) --

      The requested minimum capacity reservation for the load balancer

      • CapacityUnits (integer) --

        The number of capacity units.

    • CapacityReservationState (list) --

      The state of the capacity reservation.

      • (dict) --

        The capacity reservation status for each availability zone.

        • State (dict) --

          The state of the capacity reservation.

          • Code (string) --

            The status code.

          • Reason (string) --

            The reason code for the status.

        • AvailabilityZone (string) --

          Information about the availability zone.

        • EffectiveCapacityUnits (float) --

          The number of effective capacity units.