getResourcePolicies method
Retrieves the resource policies attached to the specified response plan.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the response plan with the attached
resource policy.
Parameter maxResults :
The maximum number of resource policies to display for each page of
results.
Parameter nextToken :
The pagination token for the next set of items to return. (You received
this token from a previous call.)
Implementation
Future<GetResourcePoliciesOutput> getResourcePolicies({
required String resourceArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
'resourceArn': [resourceArn],
};
final $payload = <String, dynamic>{
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/getResourcePolicies',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetResourcePoliciesOutput.fromJson(response);
}