Skip to content

delete_ai_prompt

delete_ai_prompt(
    assistant_id: UuidOrArn,
    ai_prompt_id: UuidOrArnOrEitherWithQualifier,
    *,
    config_overrides: Optional[QConnectClientConfig] = None,
) -> DeleteAIPromptResponse

Deletes an Amazon Q in Connect AI Prompt.

Parameters:

  • assistant_id (UuidOrArn) –

    The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

  • ai_prompt_id (UuidOrArnOrEitherWithQualifier) –

    The identifier of the Amazon Q in Connect AI prompt. Can be either the ID or the ARN. URLs cannot contain the ARN.

Raises:

Source code in docs_src/capo_qconnect/_services/q_connect.py
def delete_ai_prompt(
    self,
    assistant_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    ai_prompt_id: "capo_qconnect.types.uuid_or_arn_or_either_with_qualifier.UuidOrArnOrEitherWithQualifier",
    *,
    config_overrides: Optional[QConnectClientConfig] = None,
) -> "capo_qconnect.types.delete_ai_prompt_response.DeleteAIPromptResponse":
    """<p>Deletes an Amazon Q in Connect AI Prompt.</p>

    Args:
        assistant_id: <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
        ai_prompt_id: <p>The identifier of the Amazon Q in Connect AI prompt. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>

    Raises:
        capo_qconnect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_qconnect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_qconnect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_qconnect.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_qconnect.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_qconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_qconnect.types.delete_ai_prompt_request.DeleteAIPromptRequest]",
    ) -> OperationResponse[
        "capo_qconnect.types.delete_ai_prompt_response.DeleteAIPromptResponse"
    ]:
        import capo_qconnect._operations.wisdom_service.delete_ai_prompt

        output, http_response = (
            capo_qconnect._operations.wisdom_service.delete_ai_prompt.delete_ai_prompt(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAIPrompt")
    )
    input_: capo_qconnect.types.delete_ai_prompt_request.DeleteAIPromptRequest = {
        "assistant_id": assistant_id,
        "ai_prompt_id": ai_prompt_id,
    }

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