Skip to content

list_subscription_grants

list_subscription_grants(
    domain_identifier: DomainId,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    environment_id: Optional[EnvironmentId] = None,
    subscription_target_id: Optional[SubscriptionTargetId] = None,
    subscribed_listing_id: Optional[ListingId] = None,
    subscription_id: Optional[SubscriptionId] = None,
    owning_project_id: Optional[ProjectId] = None,
    owning_iam_principal_arn: Optional[IamPrincipalArn] = None,
    owning_user_id: Optional[UserProfileId] = None,
    owning_group_id: Optional[GroupProfileId] = None,
    sort_by: Optional[SortKey] = None,
    sort_order: Optional[SortOrder] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListSubscriptionGrantsOutput

Lists subscription grants.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain.

  • environment_id (Optional[EnvironmentId], default: None ) –

    The identifier of the Amazon DataZone environment.

  • subscription_target_id (Optional[SubscriptionTargetId], default: None ) –

    The identifier of the subscription target.

  • subscribed_listing_id (Optional[ListingId], default: None ) –

    The identifier of the subscribed listing.

  • subscription_id (Optional[SubscriptionId], default: None ) –

    The identifier of the subscription.

  • owning_project_id (Optional[ProjectId], default: None ) –

    The ID of the owning project of the subscription grants.

  • owning_iam_principal_arn (Optional[IamPrincipalArn], default: None ) –

    The ARN of the owning IAM principal.

  • owning_user_id (Optional[UserProfileId], default: None ) –

    The ID of the owning user.

  • owning_group_id (Optional[GroupProfileId], default: None ) –

    The ID of the owning group.

  • sort_by (Optional[SortKey], default: None ) –

    Specifies the way of sorting the results of this action.

  • sort_order (Optional[SortOrder], default: None ) –

    Specifies the sort order of this action.

  • max_results (Optional[MaxResults], default: None ) –

    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.

  • next_token (Optional[PaginationToken], default: None ) –

    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.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def list_subscription_grants(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    environment_id: Optional[
        "capo_datazone.types.environment_id.EnvironmentId"
    ] = None,
    subscription_target_id: Optional[
        "capo_datazone.types.subscription_target_id.SubscriptionTargetId"
    ] = None,
    subscribed_listing_id: Optional[
        "capo_datazone.types.listing_id.ListingId"
    ] = None,
    subscription_id: Optional[
        "capo_datazone.types.subscription_id.SubscriptionId"
    ] = None,
    owning_project_id: Optional["capo_datazone.types.project_id.ProjectId"] = None,
    owning_iam_principal_arn: Optional[
        "capo_datazone.types.iam_principal_arn.IamPrincipalArn"
    ] = None,
    owning_user_id: Optional[
        "capo_datazone.types.user_profile_id.UserProfileId"
    ] = None,
    owning_group_id: Optional[
        "capo_datazone.types.group_profile_id.GroupProfileId"
    ] = None,
    sort_by: Optional["capo_datazone.types.sort_key.SortKey"] = None,
    sort_order: Optional["capo_datazone.types.sort_order.SortOrder"] = None,
    max_results: Optional["capo_datazone.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_datazone.types.list_subscription_grants_output.ListSubscriptionGrantsOutput":
    """<p>Lists subscription grants.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain.</p>
        environment_id: <p>The identifier of the Amazon DataZone environment.</p>
        subscription_target_id: <p>The identifier of the subscription target.</p>
        subscribed_listing_id: <p>The identifier of the subscribed listing.</p>
        subscription_id: <p>The identifier of the subscription.</p>
        owning_project_id: <p>The ID of the owning project of the subscription grants.</p>
        owning_iam_principal_arn: <p>The ARN of the owning IAM principal.</p>
        owning_user_id: <p>The ID of the owning user.</p>
        owning_group_id: <p>The ID of the owning group.</p>
        sort_by: <p>Specifies the way of sorting the results of this action.</p>
        sort_order: <p>Specifies the sort order of this action.</p>
        max_results: <p>The maximum number of subscription grants to return in a single call to <code>ListSubscriptionGrants</code>. When the number of subscription grants to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListSubscriptionGrants</code> to list the next set of subscription grants.</p>
        next_token: <p>When the number of subscription grants is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of subscription grants, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListSubscriptionGrants</code> to list the next set of subscription grants.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.list_subscription_grants_input.ListSubscriptionGrantsInput]",
    ) -> OperationResponse[
        "capo_datazone.types.list_subscription_grants_output.ListSubscriptionGrantsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_subscription_grants

        output, http_response = (
            capo_datazone._operations.data_zone.list_subscription_grants.list_subscription_grants(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListSubscriptionGrants")
    )
    input_: capo_datazone.types.list_subscription_grants_input.ListSubscriptionGrantsInput = {
        "domain_identifier": domain_identifier
    }
    if environment_id is not None:
        input_["environment_id"] = environment_id
    if subscription_target_id is not None:
        input_["subscription_target_id"] = subscription_target_id
    if subscribed_listing_id is not None:
        input_["subscribed_listing_id"] = subscribed_listing_id
    if subscription_id is not None:
        input_["subscription_id"] = subscription_id
    if owning_project_id is not None:
        input_["owning_project_id"] = owning_project_id
    if owning_iam_principal_arn is not None:
        input_["owning_iam_principal_arn"] = owning_iam_principal_arn
    if owning_user_id is not None:
        input_["owning_user_id"] = owning_user_id
    if owning_group_id is not None:
        input_["owning_group_id"] = owning_group_id
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output