AWS Global Accelerator

2022/10/20 - AWS Global Accelerator - 2 new api methods

Changes  Global Accelerator now supports AddEndpoints and RemoveEndpoints operations for standard endpoint groups.

RemoveEndpoints (new) Link ¶

Remove endpoints from an endpoint group.

The RemoveEndpoints API operation is the recommended option for removing endpoints. The alternative is to remove endpoints by updating an endpoint group by using the UpdateEndpointGroup API operation. There are two advantages to using AddEndpoints to remove endpoints instead:

  • It's more convenient, because you only need to specify the endpoints that you want to remove. With the UpdateEndpointGroup API operation, you must specify all of the endpoints in the endpoint group except the ones that you want to remove from the group.

  • It's faster, because Global Accelerator doesn't need to resolve any endpoints. With the UpdateEndpointGroup API operation, Global Accelerator must resolve all of the endpoints that remain in the group.

See also: AWS API Documentation

Request Syntax

client.remove_endpoints(
    EndpointIdentifiers=[
        {
            'EndpointId': 'string',
            'ClientIPPreservationEnabled': True|False
        },
    ],
    EndpointGroupArn='string'
)
type EndpointIdentifiers

list

param EndpointIdentifiers

[REQUIRED]

The identifiers of the endpoints that you want to remove.

  • (dict) --

    A complex type for an endpoint. Specifies information about the endpoint to remove from the endpoint group.

    • EndpointId (string) -- [REQUIRED]

      An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID.

      An Application Load Balancer can be either internal or internet-facing.

    • ClientIPPreservationEnabled (boolean) --

      Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false.

      If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as traffic travels to applications on the endpoint fronted by the accelerator.

type EndpointGroupArn

string

param EndpointGroupArn

[REQUIRED]

The Amazon Resource Name (ARN) of the endpoint group.

returns

None

AddEndpoints (new) Link ¶

Add endpoints to an endpoint group. The AddEndpoints API operation is the recommended option for adding endpoints. The alternative options are to add endpoints when you create an endpoint group (with the CreateEndpointGroup API) or when you update an endpoint group (with the UpdateEndpointGroup API).

There are two advantages to using AddEndpoints to add endpoints:

  • It's faster, because Global Accelerator only has to resolve the new endpoints that you're adding.

  • It's more convenient, because you don't need to specify all of the current endpoints that are already in the endpoint group in addition to the new endpoints that you want to add.

See also: AWS API Documentation

Request Syntax

client.add_endpoints(
    EndpointConfigurations=[
        {
            'EndpointId': 'string',
            'Weight': 123,
            'ClientIPPreservationEnabled': True|False
        },
    ],
    EndpointGroupArn='string'
)
type EndpointConfigurations

list

param EndpointConfigurations

[REQUIRED]

The list of endpoint objects.

  • (dict) --

    A complex type for endpoints. A resource must be valid and active when you add it as an endpoint.

    • EndpointId (string) --

      An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A resource must be valid and active when you add it as an endpoint.

      An Application Load Balancer can be either internal or internet-facing.

    • Weight (integer) --

      The weight associated with the endpoint. When you add weights to endpoints, you configure Global Accelerator to route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see Endpoint weights in the Global Accelerator Developer Guide .

    • ClientIPPreservationEnabled (boolean) --

      Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. The default value is true for new accelerators.

      If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as traffic travels to applications on the endpoint fronted by the accelerator.

      Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load Balancers and Amazon EC2 instances.

      For more information, see Preserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide .

type EndpointGroupArn

string

param EndpointGroupArn

[REQUIRED]

The Amazon Resource Name (ARN) of the endpoint group.

rtype

dict

returns

Response Syntax

{
    'EndpointDescriptions': [
        {
            'EndpointId': 'string',
            'Weight': 123,
            'HealthState': 'INITIAL'|'HEALTHY'|'UNHEALTHY',
            'HealthReason': 'string',
            'ClientIPPreservationEnabled': True|False
        },
    ],
    'EndpointGroupArn': 'string'
}

Response Structure

  • (dict) --

    • EndpointDescriptions (list) --

      The list of endpoint objects.

      • (dict) --

        A complex type for an endpoint. Each endpoint group can include one or more endpoints, such as load balancers.

        • EndpointId (string) --

          An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID.

          An Application Load Balancer can be either internal or internet-facing.

        • Weight (integer) --

          The weight associated with the endpoint. When you add weights to endpoints, you configure Global Accelerator to route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see Endpoint weights in the Global Accelerator Developer Guide .

        • HealthState (string) --

          The health status of the endpoint.

        • HealthReason (string) --

          Returns a null result.

        • ClientIPPreservationEnabled (boolean) --

          Indicates whether client IP address preservation is enabled for an endpoint. The value is true or false. The default value is true for new accelerators.

          If the value is set to true, the client's IP address is preserved in the X-Forwarded-For request header as traffic travels to applications on the endpoint fronted by the accelerator.

          Client IP address preservation is supported, in specific Amazon Web Services Regions, for endpoints that are Application Load Balancers and Amazon EC2 instances.

          For more information, see Preserve client IP addresses in Global Accelerator in the Global Accelerator Developer Guide .

    • EndpointGroupArn (string) --

      The Amazon Resource Name (ARN) of the endpoint group.