delete_rule

delete_rule(**kwargs)

Deletes the specified rule.

You can't delete the default rule.

See also: AWS API Documentation

Request Syntax

response = client.delete_rule(
    RuleArn='string'
)
Parameters
RuleArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the rule.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException
  • ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedException

Examples

This example deletes the specified rule.

response = client.delete_rule(
    RuleArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3',
)

print(response)

Expected Output:

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