Skip to content

delete_automated_reasoning_policy_test_case

delete_automated_reasoning_policy_test_case(
    policy_arn: AutomatedReasoningPolicyArn,
    test_case_id: AutomatedReasoningPolicyTestCaseId,
    last_updated_at: Timestamp,
    *,
    config_overrides: Optional[BedrockClientConfig] = None,
) -> DeleteAutomatedReasoningPolicyTestCaseResponse

Deletes an Automated Reasoning policy test. This operation is idempotent; if you delete a test more than once, each call succeeds.

Parameters:

  • policy_arn (AutomatedReasoningPolicyArn) –

    The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test.

  • test_case_id (AutomatedReasoningPolicyTestCaseId) –

    The unique identifier of the test to delete.

  • last_updated_at (Timestamp) –

    The timestamp when the test was last updated. This is used as a concurrency token to prevent conflicting modifications.

Raises:

  • AccessDeniedException –

    The request is denied because of missing access permissions.

  • ConflictException –

    Error occurred because of a conflict while performing an operation.

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • ResourceInUseException –

    Thrown when attempting to delete or modify a resource that is currently being used by other resources or operations. For example, trying to delete an Automated Reasoning policy that is referenced by an active guardrail.

  • ResourceNotFoundException –

    The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

  • ThrottlingException –

    The number of requests exceeds the limit. Resubmit your request later.

  • ValidationException –

    Input validation failed. Check your request parameters and retry the request.

  • UnknownServiceError –

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

Source code in docs_src/capo_bedrock/_services/bedrock.py
def delete_automated_reasoning_policy_test_case(
    self,
    policy_arn: "capo_bedrock.types.automated_reasoning_policy_arn.AutomatedReasoningPolicyArn",
    test_case_id: "capo_bedrock.types.automated_reasoning_policy_test_case_id.AutomatedReasoningPolicyTestCaseId",
    last_updated_at: "capo_bedrock.types.timestamp.Timestamp",
    *,
    config_overrides: Optional[BedrockClientConfig] = None,
) -> "capo_bedrock.types.delete_automated_reasoning_policy_test_case_response.DeleteAutomatedReasoningPolicyTestCaseResponse":
    """<p>Deletes an Automated Reasoning policy test. This operation is idempotent; if you delete a test more than once, each call succeeds.</p>

    Args:
        policy_arn: <p>The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test.</p>
        test_case_id: <p>The unique identifier of the test to delete.</p>
        last_updated_at: <p>The timestamp when the test was last updated. This is used as a concurrency token to prevent conflicting modifications.</p>

    Raises:
        capo_bedrock.errors.access_denied_exception.AccessDeniedException: <p>The request is denied because of missing access permissions.</p>
        capo_bedrock.errors.conflict_exception.ConflictException: <p>Error occurred because of a conflict while performing an operation.</p>
        capo_bedrock.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_bedrock.errors.resource_in_use_exception.ResourceInUseException: <p>Thrown when attempting to delete or modify a resource that is currently being used by other resources or operations. For example, trying to delete an Automated Reasoning policy that is referenced by an active guardrail.</p>
        capo_bedrock.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
        capo_bedrock.errors.throttling_exception.ThrottlingException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_bedrock.errors.validation_exception.ValidationException: <p>Input validation failed. Check your request parameters and retry the request.</p>
        capo_bedrock.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_bedrock.types.delete_automated_reasoning_policy_test_case_request.DeleteAutomatedReasoningPolicyTestCaseRequest]",
    ) -> OperationResponse[
        "capo_bedrock.types.delete_automated_reasoning_policy_test_case_response.DeleteAutomatedReasoningPolicyTestCaseResponse"
    ]:
        import capo_bedrock._operations.amazon_bedrock_control_plane_service.delete_automated_reasoning_policy_test_case

        output, http_response = (
            capo_bedrock._operations.amazon_bedrock_control_plane_service.delete_automated_reasoning_policy_test_case.delete_automated_reasoning_policy_test_case(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAutomatedReasoningPolicyTestCase")
    )
    input_: capo_bedrock.types.delete_automated_reasoning_policy_test_case_request.DeleteAutomatedReasoningPolicyTestCaseRequest = {
        "policy_arn": policy_arn,
        "test_case_id": test_case_id,
        "last_updated_at": last_updated_at,
    }

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