listRecommendationTemplates method
Lists the recommendation templates for the Resilience Hub applications.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter assessmentArn :
Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
arn:partition:resiliencehub:region:account:app-assessment/app-id.
For more information about ARNs, see
Amazon Resource Names (ARNs) in the Amazon Web Services General
Reference guide.
Parameter maxResults :
Maximum number of results to include in the response. If more results
exist than the specified MaxResults value, a token is
included in the response so that the remaining results can be retrieved.
Parameter name :
The name for one of the listed recommendation templates.
Parameter nextToken :
Null, or the token from a previous call to get the next set of results.
Parameter recommendationTemplateArn :
The Amazon Resource Name (ARN) for a recommendation template.
Parameter reverseOrder :
The default is to sort by ascending startTime. To sort by
descending startTime, set reverseOrder to true.
Parameter status :
Status of the action.
Implementation
Future<ListRecommendationTemplatesResponse> listRecommendationTemplates({
String? assessmentArn,
int? maxResults,
String? name,
String? nextToken,
String? recommendationTemplateArn,
bool? reverseOrder,
List<RecommendationTemplateStatus>? status,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (assessmentArn != null) 'assessmentArn': [assessmentArn],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (name != null) 'name': [name],
if (nextToken != null) 'nextToken': [nextToken],
if (recommendationTemplateArn != null)
'recommendationTemplateArn': [recommendationTemplateArn],
if (reverseOrder != null) 'reverseOrder': [reverseOrder.toString()],
if (status != null) 'status': status.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/list-recommendation-templates',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListRecommendationTemplatesResponse.fromJson(response);
}