listSubscriptionGrants method

Future<ListSubscriptionGrantsOutput> listSubscriptionGrants({
  1. required String domainIdentifier,
  2. String? environmentId,
  3. int? maxResults,
  4. String? nextToken,
  5. String? owningGroupId,
  6. String? owningIamPrincipalArn,
  7. String? owningProjectId,
  8. String? owningUserId,
  9. SortKey? sortBy,
  10. SortOrder? sortOrder,
  11. String? subscribedListingId,
  12. String? subscriptionId,
  13. String? subscriptionTargetId,
})

Lists subscription grants.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The identifier of the Amazon DataZone domain.

Parameter environmentId : The identifier of the Amazon DataZone environment.

Parameter maxResults : The maximum number of subscription grants to return in a single call to ListSubscriptionGrants. When the number of subscription grants to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListSubscriptionGrants to list the next set of subscription grants.

Parameter nextToken : When the number of subscription grants is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of subscription grants, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListSubscriptionGrants to list the next set of subscription grants.

Parameter owningGroupId : The ID of the owning group.

Parameter owningIamPrincipalArn : The ARN of the owning IAM principal.

Parameter owningProjectId : The ID of the owning project of the subscription grants.

Parameter owningUserId : The ID of the owning user.

Parameter sortBy : Specifies the way of sorting the results of this action.

Parameter sortOrder : Specifies the sort order of this action.

Parameter subscribedListingId : The identifier of the subscribed listing.

Parameter subscriptionId : The identifier of the subscription.

Parameter subscriptionTargetId : The identifier of the subscription target.

Implementation

Future<ListSubscriptionGrantsOutput> listSubscriptionGrants({
  required String domainIdentifier,
  String? environmentId,
  int? maxResults,
  String? nextToken,
  String? owningGroupId,
  String? owningIamPrincipalArn,
  String? owningProjectId,
  String? owningUserId,
  SortKey? sortBy,
  SortOrder? sortOrder,
  String? subscribedListingId,
  String? subscriptionId,
  String? subscriptionTargetId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (environmentId != null) 'environmentId': [environmentId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (owningGroupId != null) 'owningGroupId': [owningGroupId],
    if (owningIamPrincipalArn != null)
      'owningIamPrincipalArn': [owningIamPrincipalArn],
    if (owningProjectId != null) 'owningProjectId': [owningProjectId],
    if (owningUserId != null) 'owningUserId': [owningUserId],
    if (sortBy != null) 'sortBy': [sortBy.value],
    if (sortOrder != null) 'sortOrder': [sortOrder.value],
    if (subscribedListingId != null)
      'subscribedListingId': [subscribedListingId],
    if (subscriptionId != null) 'subscriptionId': [subscriptionId],
    if (subscriptionTargetId != null)
      'subscriptionTargetId': [subscriptionTargetId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/subscription-grants',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSubscriptionGrantsOutput.fromJson(response);
}