listStacks method
Returns the summary information for stacks whose status matches the
specified StackStatusFilter. Summary information for stacks
that have been deleted is kept for 90 days after the stack is deleted. If
no StackStatusFilter is specified, summary information for
all stacks is returned (including existing stacks and stacks that have
been deleted).
Parameter nextToken :
The token for the next set of items to return. (You received this token
from a previous call.)
Parameter stackStatusFilter :
Stack status to use as a filter. Specify one or more stack status codes to
list only stacks with the specified status codes. For a complete list of
stack status codes, see the StackStatus parameter of the
Stack data type.
Implementation
Future<ListStacksOutput> listStacks({
String? nextToken,
List<StackStatus>? stackStatusFilter,
}) async {
final $request = <String, String>{
if (nextToken != null) 'NextToken': nextToken,
if (stackStatusFilter != null)
if (stackStatusFilter.isEmpty)
'StackStatusFilter': ''
else
for (var i1 = 0; i1 < stackStatusFilter.length; i1++)
'StackStatusFilter.member.${i1 + 1}': stackStatusFilter[i1].value,
};
final $result = await _protocol.send(
$request,
action: 'ListStacks',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ListStacksResult',
);
return ListStacksOutput.fromXml($result);
}