internal virtual CancelStatementResponse CancelStatement(CancelStatementRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CancelStatementRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CancelStatementResponseUnmarshaller.Instance;

            return(Invoke <CancelStatementResponse>(request, options));
        }
        /// <summary>
        /// Cancels a running query. To be canceled, a query must be running.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CancelStatement service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the CancelStatement service method, as returned by RedshiftDataAPIService.</returns>
        /// <exception cref="Amazon.RedshiftDataAPIService.Model.InternalServerException">
        /// The Amazon Redshift Data API operation failed due to invalid input.
        /// </exception>
        /// <exception cref="Amazon.RedshiftDataAPIService.Model.ResourceNotFoundException">
        /// The Amazon Redshift Data API operation failed due to a missing resource.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/CancelStatement">REST API Reference for CancelStatement Operation</seealso>
        public virtual Task <CancelStatementResponse> CancelStatementAsync(CancelStatementRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CancelStatementRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CancelStatementResponseUnmarshaller.Instance;

            return(InvokeAsync <CancelStatementResponse>(request, options, cancellationToken));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the CancelStatement operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CancelStatement operation on AmazonRedshiftDataAPIServiceClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCancelStatement
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/CancelStatement">REST API Reference for CancelStatement Operation</seealso>
        public virtual IAsyncResult BeginCancelStatement(CancelStatementRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = CancelStatementRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CancelStatementResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }