listOrganizationRecommendationResources method

Future<ListOrganizationRecommendationResourcesResponse> listOrganizationRecommendationResources({
  1. required String organizationRecommendationIdentifier,
  2. String? affectedAccountId,
  3. ExclusionStatus? exclusionStatus,
  4. int? maxResults,
  5. String? nextToken,
  6. String? regionCode,
  7. ResourceStatus? status,
})

List Resources of a Recommendation within an Organization. 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 AWS Organization organization's Recommendation identifier

Parameter affectedAccountId : An account affected by this organization recommendation

Parameter exclusionStatus : The exclusion status of the resource

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.

Parameter regionCode : The AWS Region code of the resource

Parameter status : The status of the resource

Implementation

Future<ListOrganizationRecommendationResourcesResponse>
    listOrganizationRecommendationResources({
  required String organizationRecommendationIdentifier,
  String? affectedAccountId,
  ExclusionStatus? exclusionStatus,
  int? maxResults,
  String? nextToken,
  String? regionCode,
  ResourceStatus? status,
}) async {
  final $query = <String, List<String>>{
    if (affectedAccountId != null) 'affectedAccountId': [affectedAccountId],
    if (exclusionStatus != null) 'exclusionStatus': [exclusionStatus.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (regionCode != null) 'regionCode': [regionCode],
    if (status != null) 'status': [status.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/organization-recommendations/${Uri.encodeComponent(organizationRecommendationIdentifier)}/resources',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListOrganizationRecommendationResourcesResponse.fromJson(response);
}