There are more AWS SDK examples available in the AWS Doc SDK Examples
Use SetLoadBalancerPoliciesOfListener with a CLI
The following code examples show how to use SetLoadBalancerPoliciesOfListener.
- CLI
-
- AWS CLI
-
To replace the policies associated with a listener
This example replaces the policies that are currently associated with the specified listener.
Command:
aws elb set-load-balancer-policies-of-listener --load-balancer-namemy-load-balancer--load-balancer-port443--policy-namesmy-SSLNegotiation-policyTo remove all policies associated with your listener
This example removes all policies that are currently associated with the specified listener.
Command:
aws elb set-load-balancer-policies-of-listener --load-balancer-namemy-load-balancer--load-balancer-port443--policy-names[]To confirm that the policies are removed from the load balancer, use the
describe-load-balancer-policiescommand.-
For API details, see SetLoadBalancerPoliciesOfListener
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example replaces the policies for the specified listener with the specified policy.
Set-ELBLoadBalancerPolicyOfListener -LoadBalancerName my-load-balancer -LoadBalancerPort 443 -PolicyName my-SSLNegotiation-policyExample 2: This example removes all policies associated with the specified listener.
Set-ELBLoadBalancerPolicyOfListener -LoadBalancerName my-load-balancer -LoadBalancerPort 443-
For API details, see SetLoadBalancerPoliciesOfListener in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example replaces the policies for the specified listener with the specified policy.
Set-ELBLoadBalancerPolicyOfListener -LoadBalancerName my-load-balancer -LoadBalancerPort 443 -PolicyName my-SSLNegotiation-policyExample 2: This example removes all policies associated with the specified listener.
Set-ELBLoadBalancerPolicyOfListener -LoadBalancerName my-load-balancer -LoadBalancerPort 443-
For API details, see SetLoadBalancerPoliciesOfListener in AWS Tools for PowerShell Cmdlet Reference (V5).
-