describeResourcePolicies method
Lists the resource policies in this account.
May throw InvalidParameterException.
May throw ServiceUnavailableException.
Parameter limit :
The maximum number of resource policies to be displayed with one call of
this API.
Parameter policyScope :
Specifies the scope of the resource policy. Valid values are
ACCOUNT or RESOURCE. When not specified,
defaults to ACCOUNT.
Parameter resourceArn :
The ARN of the CloudWatch Logs resource for which to query the resource
policy.
Implementation
Future<DescribeResourcePoliciesResponse> describeResourcePolicies({
int? limit,
String? nextToken,
PolicyScope? policyScope,
String? resourceArn,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Logs_20140328.DescribeResourcePolicies'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (limit != null) 'limit': limit,
if (nextToken != null) 'nextToken': nextToken,
if (policyScope != null) 'policyScope': policyScope.value,
if (resourceArn != null) 'resourceArn': resourceArn,
},
);
return DescribeResourcePoliciesResponse.fromJson(jsonResponse.body);
}