getResourcePolicies method
Gets the policies for the specified resources that you own and have shared.
May throw MalformedArnException. May throw InvalidNextTokenException. May throw InvalidParameterException. May throw ResourceArnNotFoundException. May throw ServerInternalException. May throw ServiceUnavailableException.
Parameter resourceArns
:
The Amazon Resource Names (ARN) of the resources.
Parameter maxResults
:
The maximum number of results to return with a single call. To retrieve
the remaining results, make another call with the returned
nextToken
value.
Parameter nextToken
:
The token for the next page of results.
Parameter principal
:
The principal.
Implementation
Future<GetResourcePoliciesResponse> getResourcePolicies({
required List<String> resourceArns,
int? maxResults,
String? nextToken,
String? principal,
}) async {
ArgumentError.checkNotNull(resourceArns, 'resourceArns');
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final $payload = <String, dynamic>{
'resourceArns': resourceArns,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (principal != null) 'principal': principal,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/getresourcepolicies',
exceptionFnMap: _exceptionFns,
);
return GetResourcePoliciesResponse.fromJson(response);
}