listStackResources method

Future<ListStackResourcesOutput> listStackResources({
  1. required String stackName,
  2. String? nextToken,
})

Returns descriptions of all resources of the specified stack.

For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.

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.

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

Implementation

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