Skip to content

revoke_signature async

revoke_signature(
    job_id: JobId,
    reason: RevocationReasonString,
    *,
    config_overrides: Optional[AsyncsignerClientConfig] = None,
    job_owner: Optional[AccountId] = None,
) -> None

Changes the state of a signing job to REVOKED. This indicates that the signature is no longer valid.

Parameters:

Raises:

Source code in docs_src/capo_signer/_services/async_signer.py
async def revoke_signature(
    self,
    job_id: "capo_signer.types.job_id.JobId",
    reason: "capo_signer.types.revocation_reason_string.RevocationReasonString",
    *,
    config_overrides: Optional[AsyncsignerClientConfig] = None,
    job_owner: Optional["capo_signer.types.account_id.AccountId"] = None,
) -> None:
    """<p>Changes the state of a signing job to <code>REVOKED</code>. This indicates that the signature is no longer valid.</p>

    Args:
        job_id: <p>ID of the signing job to be revoked.</p>
        job_owner: <p>AWS account ID of the job owner.</p>
        reason: <p>The reason for revoking the signing job.</p>

    Raises:
        capo_signer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_signer.errors.internal_service_error_exception.InternalServiceErrorException: <p>An internal error occurred.</p>
        capo_signer.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource could not be found.</p>
        capo_signer.errors.too_many_requests_exception.TooManyRequestsException: <p>The allowed number of job-signing requests has been exceeded.</p> <p>This error supersedes the error <code>ThrottlingException</code>.</p>
        capo_signer.errors.validation_exception.ValidationException: <p>You signing certificate could not be validated.</p>
        capo_signer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_signer.types.revoke_signature_request.RevokeSignatureRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_signer._operations.wallaby_service.revoke_signature

        (
            output,
            http_response,
        ) = await capo_signer._operations.wallaby_service.revoke_signature.async_revoke_signature(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RevokeSignature")
    )
    input_: capo_signer.types.revoke_signature_request.RevokeSignatureRequest = {
        "job_id": job_id,
        "reason": reason,
    }
    if job_owner is not None:
        input_["job_owner"] = job_owner

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output