SetLoadBalancerPoliciesOfListener - Elastic Load Balancing

SetLoadBalancerPoliciesOfListener

Replaces the current set of policies for the specified load balancer port with the specified set of policies.

To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer.

For more information about setting policies, see Update the SSL negotiation configuration, Duration-based session stickiness, and Application-controlled session stickiness in the User Guide for Classic Load Balancers.

Request Parameters

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

LoadBalancerName

The name of the load balancer.

Type: String

Required: Yes

LoadBalancerPort

The external port of the load balancer.

Type: Integer

Required: Yes

PolicyNames.member.N

The names of the policies. This list must include all policies to be enabled. If you omit a policy that is currently enabled, it is disabled. If the list is empty, all current policies are disabled.

Type: Array of strings

Required: Yes

Errors

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

InvalidConfigurationRequest

The requested configuration change is not valid.

HTTP Status Code: 409

ListenerNotFound

The load balancer does not have a listener configured at the specified port.

HTTP Status Code: 400

LoadBalancerNotFound

The specified load balancer does not exist.

HTTP Status Code: 400

PolicyNotFound

One or more of the specified policies do not exist.

HTTP Status Code: 400

Examples

Replace policies

This example replaces the policies that are currently associated with the specified port with the specified policy. Note that this is the only policy that is enabled after this call. To ensure that any currently enabled policies remain enabled, add them to the PolicyNames list.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=SetLoadBalancerPoliciesOfListener &LoadBalancerName=my-loadbalancer &LoadBalancerPort=443 &PolicyNames.member.1=my-SSLNegotiation-policy &Version=2012-06-01 &AUTHPARAMS

See Also

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