listOrganizationInsights method
Returns a list of insights associated with the account or OU Id.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter accountIds :
The ID of the Amazon Web Services account.
Parameter maxResults :
The maximum number of results to return with a single call. To retrieve
the remaining results, make another call with the returned
nextToken value.
Parameter nextToken :
The pagination token to use to retrieve the next page of results for this
operation. If this value is null, it retrieves the first page.
Parameter organizationalUnitIds :
The ID of the organizational unit.
Implementation
Future<ListOrganizationInsightsResponse> listOrganizationInsights({
required ListInsightsStatusFilter statusFilter,
List<String>? accountIds,
int? maxResults,
String? nextToken,
List<String>? organizationalUnitIds,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'StatusFilter': statusFilter,
if (accountIds != null) 'AccountIds': accountIds,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (organizationalUnitIds != null)
'OrganizationalUnitIds': organizationalUnitIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/organization/insights',
exceptionFnMap: _exceptionFns,
);
return ListOrganizationInsightsResponse.fromJson(response);
}