SetRulePriorities - Elastic Load Balancing


Sets the priorities of the specified rules.

You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.

Request Parameters

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


The rule priorities.

Type: Array of RulePriorityPair objects

Required: Yes

Response Elements

The following element is returned by the service.


Information about the rules.

Type: Array of Rule objects


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


This operation is not allowed.

HTTP Status Code: 400


The specified priority is in use.

HTTP Status Code: 400


The specified rule does not exist.

HTTP Status Code: 400


Set the rule priority

This example sets the priority of the specified rule.

Sample Request &RulePriorities.member.1.RuleArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3 &RulePriorities.member.1.Priority=5 &Version=2015-12-01 &AUTHPARAMS

Sample Response

<SetRulePrioritiesResponse xmlns=""> <SetRulePrioritiesResult> <Rules> <member> <IsDefault>false</IsDefault> <Conditions> <member> <Field>path-pattern</Field> <Values> <member>/img/*</member> </Values> </member> </Conditions> <Priority>5</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/1291d13826f405c3</RuleArn> </member> </Rules> </SetRulePrioritiesResult> <ResponseMetadata> <RequestId>4d7a8036-f3a7-11e5-9c02-8fd20490d5a6</RequestId> </ResponseMetadata> </SetRulePrioritiesResponse>

See Also

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