Skip to content

update_subscription_grant_status

update_subscription_grant_status(
    domain_identifier: DomainId,
    identifier: SubscriptionGrantId,
    asset_identifier: AssetId,
    status: SubscriptionGrantStatus,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    failure_cause: Optional[FailureCause] = None,
    target_name: Optional[str] = None,
) -> UpdateSubscriptionGrantStatusOutput

Updates the status of the specified subscription grant status in Amazon DataZone.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain in which a subscription grant status is to be updated.

  • identifier (SubscriptionGrantId) –

    The identifier of the subscription grant the status of which is to be updated.

  • asset_identifier (AssetId) –

    The identifier of the asset the subscription grant status of which is to be updated.

  • status (SubscriptionGrantStatus) –

    The status to be updated as part of the UpdateSubscriptionGrantStatus action.

  • failure_cause (Optional[FailureCause], default: None ) –

    Specifies the error message that is returned if the operation cannot be successfully completed.

  • target_name (Optional[str], default: None ) –

    The target name to be updated as part of the UpdateSubscriptionGrantStatus action.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def update_subscription_grant_status(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.subscription_grant_id.SubscriptionGrantId",
    asset_identifier: "capo_datazone.types.asset_id.AssetId",
    status: "capo_datazone.types.subscription_grant_status.SubscriptionGrantStatus",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    failure_cause: Optional[
        "capo_datazone.types.failure_cause.FailureCause"
    ] = None,
    target_name: Optional[str] = None,
) -> "capo_datazone.types.update_subscription_grant_status_output.UpdateSubscriptionGrantStatusOutput":
    """<p>Updates the status of the specified subscription grant status in Amazon DataZone.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain in which a subscription grant status is to be updated.</p>
        identifier: <p>The identifier of the subscription grant the status of which is to be updated.</p>
        asset_identifier: <p>The identifier of the asset the subscription grant status of which is to be updated.</p>
        status: <p>The status to be updated as part of the <code>UpdateSubscriptionGrantStatus</code> action.</p>
        failure_cause: <p>Specifies the error message that is returned if the operation cannot be successfully completed.</p>
        target_name: <p>The target name to be updated as part of the <code>UpdateSubscriptionGrantStatus</code> action.</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.conflict_exception.ConflictException: <p>There is a conflict while performing 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.update_subscription_grant_status_input.UpdateSubscriptionGrantStatusInput]",
    ) -> OperationResponse[
        "capo_datazone.types.update_subscription_grant_status_output.UpdateSubscriptionGrantStatusOutput"
    ]:
        import capo_datazone._operations.data_zone.update_subscription_grant_status

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSubscriptionGrantStatus")
    )
    input_: capo_datazone.types.update_subscription_grant_status_input.UpdateSubscriptionGrantStatusInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
        "asset_identifier": asset_identifier,
        "status": status,
    }
    if failure_cause is not None:
        input_["failure_cause"] = failure_cause
    if target_name is not None:
        input_["target_name"] = target_name

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