setLoadBalancerPoliciesOfListener method
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 Classic Load Balancers Guide.
May throw AccessPointNotFoundException. May throw PolicyNotFoundException. May throw ListenerNotFoundException. May throw InvalidConfigurationRequestException.
Parameter loadBalancerName
:
The name of the load balancer.
Parameter loadBalancerPort
:
The external port of the load balancer.
Parameter policyNames
:
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.
Implementation
Future<void> setLoadBalancerPoliciesOfListener({
required String loadBalancerName,
required int loadBalancerPort,
required List<String> policyNames,
}) async {
ArgumentError.checkNotNull(loadBalancerName, 'loadBalancerName');
ArgumentError.checkNotNull(loadBalancerPort, 'loadBalancerPort');
ArgumentError.checkNotNull(policyNames, 'policyNames');
final $request = <String, dynamic>{};
$request['LoadBalancerName'] = loadBalancerName;
$request['LoadBalancerPort'] = loadBalancerPort;
$request['PolicyNames'] = policyNames;
await _protocol.send(
$request,
action: 'SetLoadBalancerPoliciesOfListener',
version: '2012-06-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['SetLoadBalancerPoliciesOfListenerInput'],
shapes: shapes,
resultWrapper: 'SetLoadBalancerPoliciesOfListenerResult',
);
}