DescribeRules - Elastic Load Balancing

DescribeRules

Describes the specified rules or the rules for the specified listener. You must specify either a listener or one or more rules.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ListenerArn

The Amazon Resource Name (ARN) of the listener.

Type: String

Required: No

Marker

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

Type: String

Required: No

PageSize

The maximum number of results to return with this call.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 400.

Required: No

RuleArns.member.N

The Amazon Resource Names (ARN) of the rules.

Type: Array of strings

Required: No

Response Elements

The following elements are returned by the service.

NextMarker

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

Type: String

Rules.member.N

Information about the rules.

Type: Array of Rule objects

Errors

For information about the errors that are common to all actions, see Common Errors.

ListenerNotFound

The specified listener does not exist.

HTTP Status Code: 400

RuleNotFound

The specified rule does not exist.

HTTP Status Code: 400

UnsupportedProtocol

The specified protocol is not supported.

HTTP Status Code: 400

Examples

Describe a rule

This example describes the specified rule.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=DescribeRules &RuleArns.member.1=arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee &Version=2015-12-01 &AUTHPARAMS

Sample Response

<DescribeRulesResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/"> <DescribeRulesResult> <Rules> <member> <IsDefault>false</IsDefault> <Conditions> <member> <Field>path-pattern</Field> <Values> <member>/img/*</member> </Values> </member> </Conditions> <Priority>10</Priority> <Actions> <member> <Type>forward</Type> <TargetGroupArn>arn:aws:elasticloadbalancing:ua-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067</TargetGroupArn> </member> </Actions> <RuleArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee</RuleArn> </member> </Rules> </DescribeRulesResult> <ResponseMetadata> <RequestId>74926cf3-f3a3-11e5-b543-9f2c3fbb9bee</RequestId> </ResponseMetadata> </DescribeRulesResponse>

Describe the rules for a listener

This example describes the rules for the specified listener. The output includes the default rule and any other rules that you've defined.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=DescribeRules &ListenerArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2 &Version=2015-12-01 &AUTHPARAMS

Sample Response

<DescribeRulesResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/"> <DescribeRulesResult> <Rules> <member> <IsDefault>false</IsDefault> <Conditions> <member> <Field>path-pattern</Field> <Values> <member>/img/*</member> </Values> </member> </Conditions> <Priority>10</Priority> <Actions> <member> <Type>forward</Type> <TargetGroupArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067</TargetGroupArn> </member> </Actions> <RuleArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee</RuleArn> </member> <member> <IsDefault>true</IsDefault> <Conditions /> <Priority>default</Priority> <Actions> <member> <Type>forward</Type> <TargetGroupArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067</TargetGroupArn> </member> </Actions> <RuleArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/fd906cf3d7a9d36d</RuleArn> </member> </Rules> </DescribeRulesResult> <ResponseMetadata> <RequestId>d8581c8d-f3a3-11e5-8a24-ffe2bf8623ae</RequestId> </ResponseMetadata> </DescribeRulesResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: