SetLoadBalancerPoliciesForBackendServer - Elastic Load Balancing

SetLoadBalancerPoliciesForBackendServer

Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.

Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, use the PolicyNames parameter to list the policies that you want to enable.

You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify that the policy is associated with the EC2 instance.

For more information about enabling back-end instance authentication, see Configure back-end instance authentication in the User Guide for Classic Load Balancers. For more information about Proxy Protocol, see Configure proxy protocol support in the User Guide for Classic Load Balancers.

Request Parameters

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

InstancePort

The port number associated with the EC2 instance.

Type: Integer

Required: Yes

LoadBalancerName

The name of the load balancer.

Type: String

Required: Yes

PolicyNames.member.N

The names of the policies. If the list is empty, then all current polices are removed from the EC2 instance.

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

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 policies.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=SetLoadBalancerPoliciesForBackendServer &LoadBalancerName=my-loadbalancer &InstancePort=80 &PolicyNames.member.1=EnableProxyProtocol &PolicyNames.member.2=my-policy2 &PolicyNames.member.3=my-policy3 &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: