listReceivedGrantsForOrganization method
Lists the grants received for all accounts in the organization.
May throw AccessDeniedException.
May throw AuthorizationException.
May throw InvalidParameterValueException.
May throw RateLimitExceededException.
May throw ResourceLimitExceededException.
May throw ServerInternalException.
May throw ValidationException.
Parameter licenseArn :
The Amazon Resource Name (ARN) of the received license.
Parameter filters :
Filters to scope the results. The following filters are supported:
-
ParentArn -
GranteePrincipalArn
Parameter maxResults :
Maximum number of results to return in a single call.
Parameter nextToken :
Token for the next set of results.
Implementation
Future<ListReceivedGrantsForOrganizationResponse>
listReceivedGrantsForOrganization({
required String licenseArn,
List<Filter>? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSLicenseManager.ListReceivedGrantsForOrganization'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'LicenseArn': licenseArn,
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListReceivedGrantsForOrganizationResponse.fromJson(
jsonResponse.body);
}