public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticTranscoder.Model.UpdatePipelineStatusRequest(); if (cmdletContext.Id != null) { request.Id = cmdletContext.Id; } if (cmdletContext.Status != null) { request.Status = cmdletContext.Status; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
/// <summary> /// Initiates the asynchronous execution of the UpdatePipelineStatus operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdatePipelineStatus operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<UpdatePipelineStatusResponse> UpdatePipelineStatusAsync(UpdatePipelineStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdatePipelineStatusRequestMarshaller(); var unmarshaller = UpdatePipelineStatusResponseUnmarshaller.Instance; return InvokeAsync<UpdatePipelineStatusRequest,UpdatePipelineStatusResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal UpdatePipelineStatusResponse UpdatePipelineStatus(UpdatePipelineStatusRequest request) { var marshaller = new UpdatePipelineStatusRequestMarshaller(); var unmarshaller = UpdatePipelineStatusResponseUnmarshaller.Instance; return Invoke<UpdatePipelineStatusRequest,UpdatePipelineStatusResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdatePipelineStatus operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdatePipelineStatus operation on AmazonElasticTranscoderClient.</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 EndUpdatePipelineStatus /// operation.</returns> public IAsyncResult BeginUpdatePipelineStatus(UpdatePipelineStatusRequest request, AsyncCallback callback, object state) { var marshaller = new UpdatePipelineStatusRequestMarshaller(); var unmarshaller = UpdatePipelineStatusResponseUnmarshaller.Instance; return BeginInvoke<UpdatePipelineStatusRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeUpdatePipelineStatus(UpdatePipelineStatusRequest updatePipelineStatusRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdatePipelineStatusRequestMarshaller().Marshall(updatePipelineStatusRequest); var unmarshaller = UpdatePipelineStatusResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the UpdatePipelineStatus operation. /// <seealso cref="Amazon.ElasticTranscoder.IAmazonElasticTranscoder.UpdatePipelineStatus"/> /// </summary> /// /// <param name="updatePipelineStatusRequest">Container for the necessary parameters to execute the UpdatePipelineStatus operation on /// AmazonElasticTranscoder.</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 /// EndUpdatePipelineStatus operation.</returns> public IAsyncResult BeginUpdatePipelineStatus(UpdatePipelineStatusRequest updatePipelineStatusRequest, AsyncCallback callback, object state) { return invokeUpdatePipelineStatus(updatePipelineStatusRequest, callback, state, false); }
/// <summary> /// <para>The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of /// jobs.</para> <para>Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic /// Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for /// the jobs that you want to cancel, and to send a CancelJob request. </para> /// </summary> /// /// <param name="updatePipelineStatusRequest">Container for the necessary parameters to execute the UpdatePipelineStatus service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipelineStatus service method, as returned by AmazonElasticTranscoder.</returns> /// /// <exception cref="ResourceNotFoundException"/> /// <exception cref="AccessDeniedException"/> /// <exception cref="ResourceInUseException"/> /// <exception cref="InternalServiceException"/> /// <exception cref="ValidationException"/> /// <exception cref="IncompatibleVersionException"/> public UpdatePipelineStatusResponse UpdatePipelineStatus(UpdatePipelineStatusRequest updatePipelineStatusRequest) { IAsyncResult asyncResult = invokeUpdatePipelineStatus(updatePipelineStatusRequest, null, null, true); return EndUpdatePipelineStatus(asyncResult); }
/// <summary> /// <para>The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of /// jobs.</para> <para>Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic /// Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for /// the jobs that you want to cancel, and to send a CancelJob request. </para> /// </summary> /// /// <param name="updatePipelineStatusRequest">Container for the necessary parameters to execute the UpdatePipelineStatus service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipelineStatus 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<UpdatePipelineStatusResponse> UpdatePipelineStatusAsync(UpdatePipelineStatusRequest updatePipelineStatusRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdatePipelineStatusRequestMarshaller(); var unmarshaller = UpdatePipelineStatusResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdatePipelineStatusRequest, UpdatePipelineStatusResponse>(updatePipelineStatusRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal UpdatePipelineStatusResponse UpdatePipelineStatus(UpdatePipelineStatusRequest request) { var task = UpdatePipelineStatusAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// <para>The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of /// jobs.</para> <para>Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic /// Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for /// the jobs that you want to cancel, and to send a CancelJob request. </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdatePipelineStatus service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipelineStatus 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" /> public UpdatePipelineStatusResponse UpdatePipelineStatus(UpdatePipelineStatusRequest request) { var task = UpdatePipelineStatusAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para>The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of /// jobs.</para> <para>Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic /// Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for /// the jobs that you want to cancel, and to send a CancelJob request. </para> /// </summary> /// /// <param name="updatePipelineStatusRequest">Container for the necessary parameters to execute the UpdatePipelineStatus service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipelineStatus 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 async Task<UpdatePipelineStatusResponse> UpdatePipelineStatusAsync(UpdatePipelineStatusRequest updatePipelineStatusRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdatePipelineStatusRequestMarshaller(); var unmarshaller = UpdatePipelineStatusResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdatePipelineStatusRequest, UpdatePipelineStatusResponse>(updatePipelineStatusRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
private Amazon.ElasticTranscoder.Model.UpdatePipelineStatusResponse CallAWSServiceOperation(IAmazonElasticTranscoder client, Amazon.ElasticTranscoder.Model.UpdatePipelineStatusRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Elastic Transcoder", "UpdatePipelineStatus"); try { #if DESKTOP return(client.UpdatePipelineStatus(request)); #elif CORECLR return(client.UpdatePipelineStatusAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
IAsyncResult invokeUpdatePipelineStatus(UpdatePipelineStatusRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new UpdatePipelineStatusRequestMarshaller(); var unmarshaller = UpdatePipelineStatusResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }