/// <summary> /// <para>The CancelJob operation cancels an unfinished job.</para> <para><b>NOTE:</b>You can only cancel a job that has a status of Submitted. /// To prevent a pipeline from starting to process a job while you're getting the job identifier, use UpdatePipelineStatus to temporarily pause /// the pipeline.</para> /// </summary> /// /// <param name="cancelJobRequest">Container for the necessary parameters to execute the CancelJob service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the CancelJob service method, as returned by AmazonElasticTranscoder.</returns> /// /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceNotFoundException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.AccessDeniedException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceInUseException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.InternalServiceException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.ValidationException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.IncompatibleVersionException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task <CancelJobResponse> CancelJobAsync(CancelJobRequest cancelJobRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CancelJobRequestMarshaller(); var unmarshaller = CancelJobResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, CancelJobRequest, CancelJobResponse>(cancelJobRequest, marshaller, unmarshaller, signer, cancellationToken)); }
IAsyncResult invokeCancelJob(CancelJobRequest cancelJobRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CancelJobRequestMarshaller().Marshall(cancelJobRequest); var unmarshaller = CancelJobResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return(result); }
/// <summary> /// <para> This operation cancels a specified job. Only the job owner can /// cancel it. The operation fails if the job has already started or is /// complete. </para> /// </summary> /// /// <param name="cancelJobRequest">Container for the necessary parameters /// to execute the CancelJob service method on AmazonImportExport.</param> /// /// <returns>The response from the CancelJob service method, as returned /// by AmazonImportExport.</returns> /// /// <exception cref="CanceledJobIdException"/> /// <exception cref="ExpiredJobIdException"/> /// <exception cref="InvalidAccessKeyIdException"/> /// <exception cref="InvalidJobIdException"/> /// <exception cref="UnableToCancelJobIdException"/> public CancelJobResponse CancelJob(CancelJobRequest cancelJobRequest) { IRequest <CancelJobRequest> request = new CancelJobRequestMarshaller().Marshall(cancelJobRequest); CancelJobResponse response = Invoke <CancelJobRequest, CancelJobResponse> (request, this.signer, CancelJobResponseUnmarshaller.GetInstance()); return(response); }