listOrganizationRecommendationAccounts method
Lists the accounts that own the resources for an organization aggregate recommendation. This API only supports prioritized recommendations and provides global priority recommendations, eliminating the need to call the API in each AWS Region.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter organizationRecommendationIdentifier :
The Recommendation identifier
Parameter affectedAccountId :
An account affected by this organization recommendation
Parameter maxResults :
The maximum number of results to return per page.
Parameter nextToken :
The token for the next set of results. Use the value returned in the
previous response in the next request to retrieve the next set of results.
Implementation
Future<ListOrganizationRecommendationAccountsResponse>
listOrganizationRecommendationAccounts({
required String organizationRecommendationIdentifier,
String? affectedAccountId,
int? maxResults,
String? nextToken,
}) async {
final $query = <String, List<String>>{
if (affectedAccountId != null) 'affectedAccountId': [affectedAccountId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/organization-recommendations/${Uri.encodeComponent(organizationRecommendationIdentifier)}/accounts',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListOrganizationRecommendationAccountsResponse.fromJson(response);
}