Skip to content

stop_test_case_execution async

stop_test_case_execution(
    instance_id: InstanceId,
    test_case_execution_id: TestCaseExecutionId,
    test_case_id: TestCaseId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> StopTestCaseExecutionResponse

Stops a running test execution.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Amazon Connect instance.

  • test_case_execution_id (TestCaseExecutionId) –

    The identifier of the test case execution to stop.

  • test_case_id (TestCaseId) –

    The identifier of the test case.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def stop_test_case_execution(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    test_case_execution_id: "capo_connect.types.test_case_execution_id.TestCaseExecutionId",
    test_case_id: "capo_connect.types.test_case_id.TestCaseId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    client_token: Optional["capo_connect.types.client_token.ClientToken"] = None,
) -> "capo_connect.types.stop_test_case_execution_response.StopTestCaseExecutionResponse":
    """<p>Stops a running test execution.</p>

    Args:
        instance_id: <p>The identifier of the Amazon Connect instance.</p>
        test_case_execution_id: <p>The identifier of the test case execution to stop.</p>
        test_case_id: <p>The identifier of the test case.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.stop_test_case_execution_request.StopTestCaseExecutionRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.stop_test_case_execution_response.StopTestCaseExecutionResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.stop_test_case_execution

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.stop_test_case_execution.async_stop_test_case_execution(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopTestCaseExecution")
    )
    input_: capo_connect.types.stop_test_case_execution_request.StopTestCaseExecutionRequest = {
        "instance_id": instance_id,
        "test_case_execution_id": test_case_execution_id,
        "test_case_id": test_case_id,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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