ElasticLoadBalancing / Client / delete_load_balancer_policy

delete_load_balancer_policy#

ElasticLoadBalancing.Client.delete_load_balancer_policy(**kwargs)#

Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.

See also: AWS API Documentation

Request Syntax

response = client.delete_load_balancer_policy(
    LoadBalancerName='string',
    PolicyName='string'
)
Parameters:
  • LoadBalancerName (string) –

    [REQUIRED]

    The name of the load balancer.

  • PolicyName (string) –

    [REQUIRED]

    The name of the policy.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

    Contains the output of DeleteLoadBalancerPolicy.

Exceptions

  • ElasticLoadBalancing.Client.exceptions.AccessPointNotFoundException

  • ElasticLoadBalancing.Client.exceptions.InvalidConfigurationRequestException

Examples

This example deletes the specified policy from the specified load balancer. The policy must not be enabled on any listener.

response = client.delete_load_balancer_policy(
    LoadBalancerName='my-load-balancer',
    PolicyName='my-duration-cookie-policy',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}