internal UpdatePipelineResponse UpdatePipeline(UpdatePipelineRequest request) { var marshaller = new UpdatePipelineRequestMarshaller(); var unmarshaller = UpdatePipelineResponseUnmarshaller.Instance; return Invoke<UpdatePipelineRequest,UpdatePipelineResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdatePipeline operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdatePipeline 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<UpdatePipelineResponse> UpdatePipelineAsync(UpdatePipelineRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdatePipelineRequestMarshaller(); var unmarshaller = UpdatePipelineResponseUnmarshaller.Instance; return InvokeAsync<UpdatePipelineRequest,UpdatePipelineResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeUpdatePipeline(UpdatePipelineRequest updatePipelineRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdatePipelineRequestMarshaller().Marshall(updatePipelineRequest); var unmarshaller = UpdatePipelineResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the UpdatePipeline operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdatePipeline 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 EndUpdatePipeline /// operation.</returns> public IAsyncResult BeginUpdatePipeline(UpdatePipelineRequest request, AsyncCallback callback, object state) { var marshaller = new UpdatePipelineRequestMarshaller(); var unmarshaller = UpdatePipelineResponseUnmarshaller.Instance; return BeginInvoke<UpdatePipelineRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para> Use the <c>UpdatePipeline</c> operation to update settings for a pipeline. <para><b>IMPORTANT:</b>When you change pipeline settings, /// your changes take effect immediately. Jobs that you have already submitted and that Elastic Transcoder has not started to process are /// affected in addition to jobs that you submit after you change settings. </para> </para> /// </summary> /// /// <param name="updatePipelineRequest">Container for the necessary parameters to execute the UpdatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipeline service method, as returned by AmazonElasticTranscoder.</returns> /// /// <exception cref="AccessDeniedException"/> /// <exception cref="ResourceNotFoundException"/> /// <exception cref="ResourceInUseException"/> /// <exception cref="InternalServiceException"/> /// <exception cref="ValidationException"/> /// <exception cref="IncompatibleVersionException"/> public UpdatePipelineResponse UpdatePipeline(UpdatePipelineRequest updatePipelineRequest) { IAsyncResult asyncResult = invokeUpdatePipeline(updatePipelineRequest, null, null, true); return EndUpdatePipeline(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the UpdatePipeline operation. /// <seealso cref="Amazon.ElasticTranscoder.IAmazonElasticTranscoder.UpdatePipeline"/> /// </summary> /// /// <param name="updatePipelineRequest">Container for the necessary parameters to execute the UpdatePipeline 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 EndUpdatePipeline /// operation.</returns> public IAsyncResult BeginUpdatePipeline(UpdatePipelineRequest updatePipelineRequest, AsyncCallback callback, object state) { return invokeUpdatePipeline(updatePipelineRequest, callback, state, false); }
internal UpdatePipelineResponse UpdatePipeline(UpdatePipelineRequest request) { var task = UpdatePipelineAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// <para> Use the <c>UpdatePipeline</c> operation to update settings for a pipeline. <para><b>IMPORTANT:</b>When you change pipeline settings, /// your changes take effect immediately. Jobs that you have already submitted and that Elastic Transcoder has not started to process are /// affected in addition to jobs that you submit after you change settings. </para> </para> /// </summary> /// /// <param name="updatePipelineRequest">Container for the necessary parameters to execute the UpdatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipeline service method, as returned by AmazonElasticTranscoder.</returns> /// /// <exception cref="T:Amazon.ElasticTranscoder.Model.AccessDeniedException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceNotFoundException" /> /// <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<UpdatePipelineResponse> UpdatePipelineAsync(UpdatePipelineRequest updatePipelineRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdatePipelineRequestMarshaller(); var unmarshaller = UpdatePipelineResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdatePipelineRequest, UpdatePipelineResponse>(updatePipelineRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para> Use the <c>UpdatePipeline</c> operation to update settings for a pipeline. <para><b>IMPORTANT:</b>When you change pipeline settings, /// your changes take effect immediately. Jobs that you have already submitted and that Elastic Transcoder has not started to process are /// affected in addition to jobs that you submit after you change settings. </para> </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipeline service method, as returned by AmazonElasticTranscoder.</returns> /// /// <exception cref="T:Amazon.ElasticTranscoder.Model.AccessDeniedException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceNotFoundException" /> /// <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 UpdatePipelineResponse UpdatePipeline(UpdatePipelineRequest request) { var task = UpdatePipelineAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.ElasticTranscoder.Model.UpdatePipelineResponse CallAWSServiceOperation(IAmazonElasticTranscoder client, Amazon.ElasticTranscoder.Model.UpdatePipelineRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Elastic Transcoder", "UpdatePipeline"); try { #if DESKTOP return(client.UpdatePipeline(request)); #elif CORECLR return(client.UpdatePipelineAsync(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; } }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticTranscoder.Model.UpdatePipelineRequest(); if (cmdletContext.AwsKmsKeyArn != null) { request.AwsKmsKeyArn = cmdletContext.AwsKmsKeyArn; } // populate ContentConfig var requestContentConfigIsNull = true; request.ContentConfig = new Amazon.ElasticTranscoder.Model.PipelineOutputConfig(); System.String requestContentConfig_contentConfig_Bucket = null; if (cmdletContext.ContentConfig_Bucket != null) { requestContentConfig_contentConfig_Bucket = cmdletContext.ContentConfig_Bucket; } if (requestContentConfig_contentConfig_Bucket != null) { request.ContentConfig.Bucket = requestContentConfig_contentConfig_Bucket; requestContentConfigIsNull = false; } List <Amazon.ElasticTranscoder.Model.Permission> requestContentConfig_contentConfig_Permission = null; if (cmdletContext.ContentConfig_Permission != null) { requestContentConfig_contentConfig_Permission = cmdletContext.ContentConfig_Permission; } if (requestContentConfig_contentConfig_Permission != null) { request.ContentConfig.Permissions = requestContentConfig_contentConfig_Permission; requestContentConfigIsNull = false; } System.String requestContentConfig_contentConfig_StorageClass = null; if (cmdletContext.ContentConfig_StorageClass != null) { requestContentConfig_contentConfig_StorageClass = cmdletContext.ContentConfig_StorageClass; } if (requestContentConfig_contentConfig_StorageClass != null) { request.ContentConfig.StorageClass = requestContentConfig_contentConfig_StorageClass; requestContentConfigIsNull = false; } // determine if request.ContentConfig should be set to null if (requestContentConfigIsNull) { request.ContentConfig = null; } if (cmdletContext.Id != null) { request.Id = cmdletContext.Id; } if (cmdletContext.InputBucket != null) { request.InputBucket = cmdletContext.InputBucket; } if (cmdletContext.Name != null) { request.Name = cmdletContext.Name; } // populate Notifications var requestNotificationsIsNull = true; request.Notifications = new Amazon.ElasticTranscoder.Model.Notifications(); System.String requestNotifications_notifications_Completed = null; if (cmdletContext.Notifications_Completed != null) { requestNotifications_notifications_Completed = cmdletContext.Notifications_Completed; } if (requestNotifications_notifications_Completed != null) { request.Notifications.Completed = requestNotifications_notifications_Completed; requestNotificationsIsNull = false; } System.String requestNotifications_notifications_Error = null; if (cmdletContext.Notifications_Error != null) { requestNotifications_notifications_Error = cmdletContext.Notifications_Error; } if (requestNotifications_notifications_Error != null) { request.Notifications.Error = requestNotifications_notifications_Error; requestNotificationsIsNull = false; } System.String requestNotifications_notifications_Progressing = null; if (cmdletContext.Notifications_Progressing != null) { requestNotifications_notifications_Progressing = cmdletContext.Notifications_Progressing; } if (requestNotifications_notifications_Progressing != null) { request.Notifications.Progressing = requestNotifications_notifications_Progressing; requestNotificationsIsNull = false; } System.String requestNotifications_notifications_Warning = null; if (cmdletContext.Notifications_Warning != null) { requestNotifications_notifications_Warning = cmdletContext.Notifications_Warning; } if (requestNotifications_notifications_Warning != null) { request.Notifications.Warning = requestNotifications_notifications_Warning; requestNotificationsIsNull = false; } // determine if request.Notifications should be set to null if (requestNotificationsIsNull) { request.Notifications = null; } if (cmdletContext.Role != null) { request.Role = cmdletContext.Role; } // populate ThumbnailConfig var requestThumbnailConfigIsNull = true; request.ThumbnailConfig = new Amazon.ElasticTranscoder.Model.PipelineOutputConfig(); System.String requestThumbnailConfig_thumbnailConfig_Bucket = null; if (cmdletContext.ThumbnailConfig_Bucket != null) { requestThumbnailConfig_thumbnailConfig_Bucket = cmdletContext.ThumbnailConfig_Bucket; } if (requestThumbnailConfig_thumbnailConfig_Bucket != null) { request.ThumbnailConfig.Bucket = requestThumbnailConfig_thumbnailConfig_Bucket; requestThumbnailConfigIsNull = false; } List <Amazon.ElasticTranscoder.Model.Permission> requestThumbnailConfig_thumbnailConfig_Permission = null; if (cmdletContext.ThumbnailConfig_Permission != null) { requestThumbnailConfig_thumbnailConfig_Permission = cmdletContext.ThumbnailConfig_Permission; } if (requestThumbnailConfig_thumbnailConfig_Permission != null) { request.ThumbnailConfig.Permissions = requestThumbnailConfig_thumbnailConfig_Permission; requestThumbnailConfigIsNull = false; } System.String requestThumbnailConfig_thumbnailConfig_StorageClass = null; if (cmdletContext.ThumbnailConfig_StorageClass != null) { requestThumbnailConfig_thumbnailConfig_StorageClass = cmdletContext.ThumbnailConfig_StorageClass; } if (requestThumbnailConfig_thumbnailConfig_StorageClass != null) { request.ThumbnailConfig.StorageClass = requestThumbnailConfig_thumbnailConfig_StorageClass; requestThumbnailConfigIsNull = false; } // determine if request.ThumbnailConfig should be set to null if (requestThumbnailConfigIsNull) { request.ThumbnailConfig = null; } 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> /// <para> Use the <c>UpdatePipeline</c> operation to update settings for a pipeline. <para><b>IMPORTANT:</b>When you change pipeline settings, /// your changes take effect immediately. Jobs that you have already submitted and that Elastic Transcoder has not started to process are /// affected in addition to jobs that you submit after you change settings. </para> </para> /// </summary> /// /// <param name="updatePipelineRequest">Container for the necessary parameters to execute the UpdatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the UpdatePipeline service method, as returned by AmazonElasticTranscoder.</returns> /// /// <exception cref="T:Amazon.ElasticTranscoder.Model.AccessDeniedException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.ResourceNotFoundException" /> /// <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<UpdatePipelineResponse> UpdatePipelineAsync(UpdatePipelineRequest updatePipelineRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdatePipelineRequestMarshaller(); var unmarshaller = UpdatePipelineResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdatePipelineRequest, UpdatePipelineResponse>(updatePipelineRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
IAsyncResult invokeUpdatePipeline(UpdatePipelineRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new UpdatePipelineRequestMarshaller(); var unmarshaller = UpdatePipelineResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }