listStackSets method

Future<ListStackSetsOutput> listStackSets({
  1. CallAs? callAs,
  2. int? maxResults,
  3. String? nextToken,
  4. StackSetStatus? status,
})

Returns summary information about StackSets that are associated with the user.

  • \[Self-managed permissions\] If you set the CallAs parameter to SELF while signed in to your Amazon Web Services account, ListStackSets returns all self-managed StackSets in your Amazon Web Services account.
  • \[Service-managed permissions\] If you set the CallAs parameter to SELF while signed in to the organization's management account, ListStackSets returns all StackSets in the management account.
  • \[Service-managed permissions\] If you set the CallAs parameter to DELEGATED_ADMIN while signed in to your member account, ListStackSets returns all StackSets with service-managed permissions in the management account.

Parameter callAs : [Service-managed permissions] Specifies whether you are acting as an account administrator in the management account or as a delegated administrator in a member account.

By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

  • If you are signed in to the management account, specify SELF.
  • If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

Parameter maxResults : The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

Parameter nextToken : The token for the next set of items to return. (You received this token from a previous call.)

Parameter status : The status of the StackSets that you want to get summary information about.

Implementation

Future<ListStackSetsOutput> listStackSets({
  CallAs? callAs,
  int? maxResults,
  String? nextToken,
  StackSetStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $request = <String, String>{
    if (callAs != null) 'CallAs': callAs.value,
    if (maxResults != null) 'MaxResults': maxResults.toString(),
    if (nextToken != null) 'NextToken': nextToken,
    if (status != null) 'Status': status.value,
  };
  final $result = await _protocol.send(
    $request,
    action: 'ListStackSets',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ListStackSetsResult',
  );
  return ListStackSetsOutput.fromXml($result);
}