listRelatedResourcesForAuditFinding method
The related resources of an Audit finding. The following resources can be returned from calling this API:
- DEVICE_CERTIFICATE
- CA_CERTIFICATE
- IOT_POLICY
- COGNITO_IDENTITY_POOL
- CLIENT_ID
- ACCOUNT_SETTINGS
- ROLE_ALIAS
- IAM_ROLE
- ISSUER_CERTIFICATE
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter findingId :
The finding Id.
Parameter maxResults :
The maximum number of results to return at one time.
Parameter nextToken :
A token that can be used to retrieve the next set of results, or
null if there are no additional results.
Implementation
Future<ListRelatedResourcesForAuditFindingResponse>
listRelatedResourcesForAuditFinding({
required String findingId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
'findingId': [findingId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/audit/relatedResources',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListRelatedResourcesForAuditFindingResponse.fromJson(response);
}