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-name
my-load-balancer
--load-balancer-port443
--policy-namesmy-SSLNegotiation-policy
To 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-name
my-load-balancer
--load-balancer-port443
--policy-names[]
To confirm that the policies are removed from the load balancer, use the
describe-load-balancer-policies
command.-
For API details, see SetLoadBalancerPoliciesOfListener
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
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-policy
Example 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.
-