listStacks method

Future<ListStacksOutput> listStacks({
  1. String? nextToken,
  2. List<StackStatus>? stackStatusFilter,
})

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 : A string that identifies the next page of stacks that you want to retrieve.

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 {
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1024,
  );
  final $request = <String, dynamic>{};
  nextToken?.also((arg) => $request['NextToken'] = arg);
  stackStatusFilter?.also((arg) =>
      $request['StackStatusFilter'] = arg.map((e) => e.toValue()).toList());
  final $result = await _protocol.send(
    $request,
    action: 'ListStacks',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ListStacksInput'],
    shapes: shapes,
    resultWrapper: 'ListStacksResult',
  );
  return ListStacksOutput.fromXml($result);
}