describeLoadBalancerPolicies method

Future<DescribeLoadBalancerPoliciesOutput> describeLoadBalancerPolicies({
  1. String? loadBalancerName,
  2. List<String>? policyNames,
})

Describes the specified policies.

If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer. If you specify a policy name associated with your load balancer, the action returns the description of that policy. If you don't specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies. The names of the sample policies have the ELBSample- prefix.

May throw AccessPointNotFoundException. May throw PolicyNotFoundException.

Parameter loadBalancerName : The name of the load balancer.

Parameter policyNames : The names of the policies.

Implementation

Future<DescribeLoadBalancerPoliciesOutput> describeLoadBalancerPolicies({
  String? loadBalancerName,
  List<String>? policyNames,
}) async {
  final $request = <String, String>{
    if (loadBalancerName != null) 'LoadBalancerName': loadBalancerName,
    if (policyNames != null)
      if (policyNames.isEmpty)
        'PolicyNames': ''
      else
        for (var i1 = 0; i1 < policyNames.length; i1++)
          'PolicyNames.member.${i1 + 1}': policyNames[i1],
  };
  final $result = await _protocol.send(
    $request,
    action: 'DescribeLoadBalancerPolicies',
    version: '2012-06-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'DescribeLoadBalancerPoliciesResult',
  );
  return DescribeLoadBalancerPoliciesOutput.fromXml($result);
}