describeLoadBalancers method
Describes the load balancers for the specified Auto Scaling group.
This operation describes only Classic Load Balancers. If you have Application Load Balancers, Network Load Balancers, or Gateway Load Balancers, use the DescribeLoadBalancerTargetGroups API instead.
May throw ResourceContentionFault.
Parameter autoScalingGroupName
:
The name of the Auto Scaling group.
Parameter maxRecords
:
The maximum number of items to return with this call. The default value is
100
and the maximum value is 100
.
Parameter nextToken
:
The token for the next set of items to return. (You received this token
from a previous call.)
Implementation
Future<DescribeLoadBalancersResponse> describeLoadBalancers({
required String autoScalingGroupName,
int? maxRecords,
String? nextToken,
}) async {
ArgumentError.checkNotNull(autoScalingGroupName, 'autoScalingGroupName');
_s.validateStringLength(
'autoScalingGroupName',
autoScalingGroupName,
1,
255,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['AutoScalingGroupName'] = autoScalingGroupName;
maxRecords?.also((arg) => $request['MaxRecords'] = arg);
nextToken?.also((arg) => $request['NextToken'] = arg);
final $result = await _protocol.send(
$request,
action: 'DescribeLoadBalancers',
version: '2011-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DescribeLoadBalancersRequest'],
shapes: shapes,
resultWrapper: 'DescribeLoadBalancersResult',
);
return DescribeLoadBalancersResponse.fromXml($result);
}