describeAutoScalingGroups method
Gets information about the Auto Scaling groups in the account and Region.
If you specify Auto Scaling group names, the output includes information for only the specified Auto Scaling groups. If you specify filters, the output includes information for only those Auto Scaling groups that meet the filter criteria. If you do not specify group names or filters, the output includes information for all Auto Scaling groups.
This operation also returns information about instances in Auto Scaling groups. To retrieve information about the instances in a warm pool, you must call the DescribeWarmPool API.
May throw InvalidNextToken.
May throw ResourceContentionFault.
Parameter autoScalingGroupNames :
The names of the Auto Scaling groups. By default, you can only specify up
to 50 names. You can optionally increase this limit using the
MaxRecords property.
If you omit this property, all Auto Scaling groups are described.
Parameter filters :
One or more filters to limit the results based on specific tags.
Parameter includeInstances :
Specifies whether to include information about Amazon EC2 instances in the
response. When set to true (default), the response includes
instance details.
Parameter maxRecords :
The maximum number of items to return with this call. The default value is
50 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<AutoScalingGroupsType> describeAutoScalingGroups({
List<String>? autoScalingGroupNames,
List<Filter>? filters,
bool? includeInstances,
int? maxRecords,
String? nextToken,
}) async {
final $request = <String, String>{
if (autoScalingGroupNames != null)
if (autoScalingGroupNames.isEmpty)
'AutoScalingGroupNames': ''
else
for (var i1 = 0; i1 < autoScalingGroupNames.length; i1++)
'AutoScalingGroupNames.member.${i1 + 1}': autoScalingGroupNames[i1],
if (filters != null)
if (filters.isEmpty)
'Filters': ''
else
for (var i1 = 0; i1 < filters.length; i1++)
for (var e3 in filters[i1].toQueryMap().entries)
'Filters.member.${i1 + 1}.${e3.key}': e3.value,
if (includeInstances != null)
'IncludeInstances': includeInstances.toString(),
if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
if (nextToken != null) 'NextToken': nextToken,
};
final $result = await _protocol.send(
$request,
action: 'DescribeAutoScalingGroups',
version: '2011-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeAutoScalingGroupsResult',
);
return AutoScalingGroupsType.fromXml($result);
}