internal CreatePipelineResponse CreatePipeline(CreatePipelineRequest request) { var marshaller = new CreatePipelineRequestMarshaller(); var unmarshaller = CreatePipelineResponseUnmarshaller.Instance; return Invoke<CreatePipelineRequest,CreatePipelineResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreatePipeline operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreatePipeline 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<CreatePipelineResponse> CreatePipelineAsync(CreatePipelineRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreatePipelineRequestMarshaller(); var unmarshaller = CreatePipelineResponseUnmarshaller.Instance; return InvokeAsync<CreatePipelineRequest,CreatePipelineResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeCreatePipeline(CreatePipelineRequest createPipelineRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreatePipelineRequestMarshaller().Marshall(createPipelineRequest); var unmarshaller = CreatePipelineResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the CreatePipeline operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreatePipeline 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 EndCreatePipeline /// operation.</returns> public IAsyncResult BeginCreatePipeline(CreatePipelineRequest request, AsyncCallback callback, object state) { var marshaller = new CreatePipelineRequestMarshaller(); var unmarshaller = CreatePipelineResponseUnmarshaller.Instance; return BeginInvoke<CreatePipelineRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para>The CreatePipeline operation creates a pipeline with settings that you specify.</para> /// </summary> /// /// <param name="createPipelineRequest">Container for the necessary parameters to execute the CreatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the CreatePipeline service method, as returned by AmazonElasticTranscoder.</returns> /// /// <exception cref="AccessDeniedException"/> /// <exception cref="ResourceNotFoundException"/> /// <exception cref="InternalServiceException"/> /// <exception cref="LimitExceededException"/> /// <exception cref="ValidationException"/> /// <exception cref="IncompatibleVersionException"/> public CreatePipelineResponse CreatePipeline(CreatePipelineRequest createPipelineRequest) { IAsyncResult asyncResult = invokeCreatePipeline(createPipelineRequest, null, null, true); return EndCreatePipeline(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the CreatePipeline operation. /// <seealso cref="Amazon.ElasticTranscoder.IAmazonElasticTranscoder.CreatePipeline"/> /// </summary> /// /// <param name="createPipelineRequest">Container for the necessary parameters to execute the CreatePipeline 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 EndCreatePipeline /// operation.</returns> public IAsyncResult BeginCreatePipeline(CreatePipelineRequest createPipelineRequest, AsyncCallback callback, object state) { return invokeCreatePipeline(createPipelineRequest, callback, state, false); }
internal CreatePipelineResponse CreatePipeline(CreatePipelineRequest request) { var task = CreatePipelineAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// <para>The CreatePipeline operation creates a pipeline with settings that you specify.</para> /// </summary> /// /// <param name="createPipelineRequest">Container for the necessary parameters to execute the CreatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the CreatePipeline 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.InternalServiceException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.LimitExceededException" /> /// <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<CreatePipelineResponse> CreatePipelineAsync(CreatePipelineRequest createPipelineRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreatePipelineRequestMarshaller(); var unmarshaller = CreatePipelineResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreatePipelineRequest, CreatePipelineResponse>(createPipelineRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>The CreatePipeline operation creates a pipeline with settings that you specify.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the CreatePipeline 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.InternalServiceException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.LimitExceededException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.ValidationException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.IncompatibleVersionException" /> public CreatePipelineResponse CreatePipeline(CreatePipelineRequest request) { var task = CreatePipelineAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.ElasticTranscoder.Model.CreatePipelineResponse CallAWSServiceOperation(IAmazonElasticTranscoder client, Amazon.ElasticTranscoder.Model.CreatePipelineRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Elastic Transcoder", "CreatePipeline"); try { #if DESKTOP return(client.CreatePipeline(request)); #elif CORECLR return(client.CreatePipelineAsync(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.CreatePipelineRequest(); 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.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.OutputBucket != null) { request.OutputBucket = cmdletContext.OutputBucket; } 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>The CreatePipeline operation creates a pipeline with settings that you specify.</para> /// </summary> /// /// <param name="createPipelineRequest">Container for the necessary parameters to execute the CreatePipeline service method on /// AmazonElasticTranscoder.</param> /// /// <returns>The response from the CreatePipeline 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.InternalServiceException" /> /// <exception cref="T:Amazon.ElasticTranscoder.Model.LimitExceededException" /> /// <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<CreatePipelineResponse> CreatePipelineAsync(CreatePipelineRequest createPipelineRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreatePipelineRequestMarshaller(); var unmarshaller = CreatePipelineResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreatePipelineRequest, CreatePipelineResponse>(createPipelineRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
IAsyncResult invokeCreatePipeline(CreatePipelineRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreatePipelineRequestMarshaller(); var unmarshaller = CreatePipelineResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }