listAppAssessments method
Lists the assessments for an Resilience Hub application. You can use request parameters to refine the results for the response object.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter appArn :
Amazon Resource Name (ARN) of the Resilience Hub application. The format
for this ARN is:
arn:partition:resiliencehub:region:account:app/app-id.
For more information about ARNs, see
Amazon Resource Names (ARNs) in the Amazon Web Services General
Reference guide.
Parameter assessmentName :
The name for the assessment.
Parameter assessmentStatus :
The current status of the assessment for the resiliency policy.
Parameter complianceStatus :
The current status of compliance for the resiliency policy.
Parameter invoker :
Specifies the entity that invoked a specific assessment, either a
User or the System.
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 nextToken :
Null, or the token from a previous call to get the next set of results.
Parameter reverseOrder :
The default is to sort by ascending startTime. To sort by
descending startTime, set reverseOrder to true.
Implementation
Future<ListAppAssessmentsResponse> listAppAssessments({
String? appArn,
String? assessmentName,
List<AssessmentStatus>? assessmentStatus,
ComplianceStatus? complianceStatus,
AssessmentInvoker? invoker,
int? maxResults,
String? nextToken,
bool? reverseOrder,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (appArn != null) 'appArn': [appArn],
if (assessmentName != null) 'assessmentName': [assessmentName],
if (assessmentStatus != null)
'assessmentStatus': assessmentStatus.map((e) => e.value).toList(),
if (complianceStatus != null)
'complianceStatus': [complianceStatus.value],
if (invoker != null) 'invoker': [invoker.value],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (reverseOrder != null) 'reverseOrder': [reverseOrder.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/list-app-assessments',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListAppAssessmentsResponse.fromJson(response);
}