listInstances method
Lists the details of the organization and account instances of IAM Identity Center that were created in or visible to the account calling this API.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to display for the instance.
Parameter nextToken :
The pagination token for the list API. Initially the value is null. Use
the output of previous API calls to make subsequent calls.
Implementation
Future<ListInstancesResponse> listInstances({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SWBExternalService.ListInstances'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListInstancesResponse.fromJson(jsonResponse.body);
}