describeStacks method

Future<DescribeStacksOutput> describeStacks({
  1. String? nextToken,
  2. String? stackName,
})

Returns the description for the specified stack; if no stack name was specified, then it returns the description for all the stacks created.

Parameter nextToken : A string that identifies the next page of stacks that you want to retrieve.

Parameter stackName : The name or the unique stack ID that is associated with the stack, which are not always interchangeable:

  • Running stacks: You can specify either the stack's name or its unique stack ID.
  • Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.

Implementation

Future<DescribeStacksOutput> describeStacks({
  String? nextToken,
  String? stackName,
}) async {
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1024,
  );
  final $request = <String, dynamic>{};
  nextToken?.also((arg) => $request['NextToken'] = arg);
  stackName?.also((arg) => $request['StackName'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeStacks',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeStacksInput'],
    shapes: shapes,
    resultWrapper: 'DescribeStacksResult',
  );
  return DescribeStacksOutput.fromXml($result);
}