Skip to content

revoke_revision

revoke_revision(
    data_set_id: Id,
    revision_id: Id,
    revocation_comment: __stringMin10Max512,
    *,
    config_overrides: Optional[DataExchangeClientConfig] = None,
) -> RevokeRevisionResponse

This operation revokes subscribers' access to a revision.

Parameters:

  • data_set_id (Id) –

    The unique identifier for a data set.

  • revision_id (Id) –

    The unique identifier for a revision.

  • revocation_comment (__stringMin10Max512) –

    A required comment to inform subscribers of the reason their access to the revision was revoked.

Raises:

Source code in docs_src/capo_dataexchange/_services/data_exchange.py
def revoke_revision(
    self,
    data_set_id: "capo_dataexchange.types.id.Id",
    revision_id: "capo_dataexchange.types.id.Id",
    revocation_comment: "capo_dataexchange.types.__string_min10_max512.__stringMin10Max512",
    *,
    config_overrides: Optional[DataExchangeClientConfig] = None,
) -> "capo_dataexchange.types.revoke_revision_response.RevokeRevisionResponse":
    """<p>This operation revokes subscribers' access to a revision.</p>

    Args:
        data_set_id: <p>The unique identifier for a data set.</p>
        revision_id: <p>The unique identifier for a revision.</p>
        revocation_comment: <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>

    Raises:
        capo_dataexchange.errors.access_denied_exception.AccessDeniedException: <p>Access to the resource is denied.</p>
        capo_dataexchange.errors.conflict_exception.ConflictException: <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
        capo_dataexchange.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_dataexchange.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
        capo_dataexchange.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_dataexchange.errors.validation_exception.ValidationException: <p>The request was invalid.</p>
        capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_dataexchange.types.revoke_revision_request.RevokeRevisionRequest]",
    ) -> OperationResponse[
        "capo_dataexchange.types.revoke_revision_response.RevokeRevisionResponse"
    ]:
        import capo_dataexchange._operations.data_exchange.revoke_revision

        output, http_response = (
            capo_dataexchange._operations.data_exchange.revoke_revision.revoke_revision(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RevokeRevision")
    )
    input_: capo_dataexchange.types.revoke_revision_request.RevokeRevisionRequest = {
        "data_set_id": data_set_id,
        "revision_id": revision_id,
        "revocation_comment": revocation_comment,
    }

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