listAutomatedDiscoveryAccounts method

Future<ListAutomatedDiscoveryAccountsResponse> listAutomatedDiscoveryAccounts({
  1. List<String>? accountIds,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves the status of automated sensitive data discovery for one or more accounts.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter accountIds : The Amazon Web Services account ID for each account, for as many as 50 accounts. To retrieve the status for multiple accounts, append the accountIds parameter and argument for each account, separated by an ampersand (&). To retrieve the status for all the accounts in an organization, omit this parameter.

Parameter maxResults : The maximum number of items to include in each page of a paginated response.

Parameter nextToken : The nextToken string that specifies which page of results to return in a paginated response.

Implementation

Future<ListAutomatedDiscoveryAccountsResponse>
    listAutomatedDiscoveryAccounts({
  List<String>? accountIds,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    25,
  );
  final $query = <String, List<String>>{
    if (accountIds != null) 'accountIds': accountIds,
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/automated-discovery/accounts',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAutomatedDiscoveryAccountsResponse.fromJson(response);
}