Skip to content

delete_challenge async

delete_challenge(
    challenge_arn: ChallengeArn,
    *,
    config_overrides: Optional[AsyncPcaConnectorScepClientConfig] = None,
) -> None

Deletes the specified Challenge.

Parameters:

  • challenge_arn (ChallengeArn) –

    The Amazon Resource Name (ARN) of the challenge password to delete.

Raises:

  • AccessDeniedException –

    You can receive this error if you attempt to perform an operation and you don't have the required permissions. This can be caused by insufficient permissions in policies attached to your Amazon Web Services Identity and Access Management (IAM) principal. It can also happen because of restrictions in place from an Amazon Web Services Organizations service control policy (SCP) that affects your Amazon Web Services account.

  • ConflictException –

    This request can't be completed for one of the following reasons because the requested resource was being concurrently modified by another request.

  • InternalServerException –

    The request processing has failed because of an unknown error, exception or failure with an internal server.

  • ResourceNotFoundException –

    The operation tried to access a nonexistent resource. The resource might be incorrectly specified, or it might have a status other than ACTIVE.

  • ThrottlingException –

    The limit on the number of requests per second was exceeded.

  • ValidationException –

    An input validation error occurred. For example, invalid characters in a name tag, or an invalid pagination token.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_pca_connector_scep/_services/async_pca_connector_scep.py
async def delete_challenge(
    self,
    challenge_arn: "capo_pca_connector_scep.types.challenge_arn.ChallengeArn",
    *,
    config_overrides: Optional[AsyncPcaConnectorScepClientConfig] = None,
) -> None:
    """<p>Deletes the specified <a href="https://docs.aws.amazon.com/pca-connector-scep/latest/APIReference/API_Challenge.html">Challenge</a>.</p>

    Args:
        challenge_arn: <p>The Amazon Resource Name (ARN) of the challenge password to delete.</p>

    Raises:
        capo_pca_connector_scep.errors.access_denied_exception.AccessDeniedException: <p>You can receive this error if you attempt to perform an operation and you don't have the required permissions. This can be caused by insufficient permissions in policies attached to your Amazon Web Services Identity and Access Management (IAM) principal. It can also happen because of restrictions in place from an Amazon Web Services Organizations service control policy (SCP) that affects your Amazon Web Services account.</p>
        capo_pca_connector_scep.errors.conflict_exception.ConflictException: <p>This request can't be completed for one of the following reasons because the requested resource was being concurrently modified by another request.</p>
        capo_pca_connector_scep.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure with an internal server.</p>
        capo_pca_connector_scep.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a nonexistent resource. The resource might be incorrectly specified, or it might have a status other than <code>ACTIVE</code>.</p>
        capo_pca_connector_scep.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_pca_connector_scep.errors.validation_exception.ValidationException: <p>An input validation error occurred. For example, invalid characters in a name tag, or an invalid pagination token.</p>
        capo_pca_connector_scep.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pca_connector_scep.types.delete_challenge_request.DeleteChallengeRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_pca_connector_scep._operations.pca_connector_scep.delete_challenge

        (
            output,
            http_response,
        ) = await capo_pca_connector_scep._operations.pca_connector_scep.delete_challenge.async_delete_challenge(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteChallenge")
    )
    input_: capo_pca_connector_scep.types.delete_challenge_request.DeleteChallengeRequest = {
        "challenge_arn": challenge_arn
    }

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