public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticBeanstalk.Model.UpdateConfigurationTemplateRequest(); if (cmdletContext.ApplicationName != null) { request.ApplicationName = cmdletContext.ApplicationName; } if (cmdletContext.Description != null) { request.Description = cmdletContext.Description; } if (cmdletContext.OptionSetting != null) { request.OptionSettings = cmdletContext.OptionSetting; } if (cmdletContext.OptionsToRemove != null) { request.OptionsToRemove = cmdletContext.OptionsToRemove; } if (cmdletContext.TemplateName != null) { request.TemplateName = cmdletContext.TemplateName; } 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 UpdateConfigurationTemplate operation. /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.UpdateConfigurationTemplate"/> /// </summary> /// /// <param name="updateConfigurationTemplateRequest">Container for the necessary parameters to execute the UpdateConfigurationTemplate operation /// on AmazonElasticBeanstalk.</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 /// EndUpdateConfigurationTemplate operation.</returns> public IAsyncResult BeginUpdateConfigurationTemplate(UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest, AsyncCallback callback, object state) { return invokeUpdateConfigurationTemplate(updateConfigurationTemplateRequest, callback, state, false); }
IAsyncResult invokeUpdateConfigurationTemplate(UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateConfigurationTemplateRequestMarshaller().Marshall(updateConfigurationTemplateRequest); var unmarshaller = UpdateConfigurationTemplateResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para> Updates the specified configuration template to have the specified properties or configuration option values. </para> /// <para><b>NOTE:</b> If a property (for example, ApplicationName) is not provided, its value remains unchanged. To clear such properties, /// specify an empty string. </para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// /// </ul> /// </summary> /// /// <param name="updateConfigurationTemplateRequest">Container for the necessary parameters to execute the UpdateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// public UpdateConfigurationTemplateResponse UpdateConfigurationTemplate(UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest) { IAsyncResult asyncResult = invokeUpdateConfigurationTemplate(updateConfigurationTemplateRequest, null, null, true); return EndUpdateConfigurationTemplate(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the UpdateConfigurationTemplate operation. /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateConfigurationTemplate 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<UpdateConfigurationTemplateResponse> UpdateConfigurationTemplateAsync(UpdateConfigurationTemplateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateConfigurationTemplateRequestMarshaller(); var unmarshaller = UpdateConfigurationTemplateResponseUnmarshaller.Instance; return InvokeAsync<UpdateConfigurationTemplateRequest,UpdateConfigurationTemplateResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal UpdateConfigurationTemplateResponse UpdateConfigurationTemplate(UpdateConfigurationTemplateRequest request) { var marshaller = new UpdateConfigurationTemplateRequestMarshaller(); var unmarshaller = UpdateConfigurationTemplateResponseUnmarshaller.Instance; return Invoke<UpdateConfigurationTemplateRequest,UpdateConfigurationTemplateResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para> Updates the specified configuration template to have the specified properties or configuration option values. </para> /// <para><b>NOTE:</b> If a property (for example, ApplicationName) is not provided, its value remains unchanged. To clear such properties, /// specify an empty string. </para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// /// </ul> /// </summary> /// /// <param name="updateConfigurationTemplateRequest">Container for the necessary parameters to execute the UpdateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// public UpdateConfigurationTemplateResponse UpdateConfigurationTemplate(UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest) { IRequest<UpdateConfigurationTemplateRequest> request = new UpdateConfigurationTemplateRequestMarshaller().Marshall(updateConfigurationTemplateRequest); UpdateConfigurationTemplateResponse response = Invoke<UpdateConfigurationTemplateRequest, UpdateConfigurationTemplateResponse> (request, this.signer, UpdateConfigurationTemplateResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// <para> Updates the specified configuration template to have the specified properties or configuration option values. </para> /// <para><b>NOTE:</b> If a property (for example, ApplicationName) is not provided, its value remains unchanged. To clear such properties, /// specify an empty string. </para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// /// </ul> /// </summary> /// /// <param name="updateConfigurationTemplateRequest">Container for the necessary parameters to execute the UpdateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<UpdateConfigurationTemplateResponse> UpdateConfigurationTemplateAsync(UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateConfigurationTemplateRequestMarshaller(); var unmarshaller = UpdateConfigurationTemplateResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdateConfigurationTemplateRequest, UpdateConfigurationTemplateResponse>(updateConfigurationTemplateRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal UpdateConfigurationTemplateResponse UpdateConfigurationTemplate(UpdateConfigurationTemplateRequest request) { var task = UpdateConfigurationTemplateAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the UpdateConfigurationTemplate operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateConfigurationTemplate operation on AmazonElasticBeanstalkClient.</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 EndUpdateConfigurationTemplate /// operation.</returns> public IAsyncResult BeginUpdateConfigurationTemplate(UpdateConfigurationTemplateRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateConfigurationTemplateRequestMarshaller(); var unmarshaller = UpdateConfigurationTemplateResponseUnmarshaller.Instance; return BeginInvoke<UpdateConfigurationTemplateRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeUpdateConfigurationTemplate(UpdateConfigurationTemplateRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new UpdateConfigurationTemplateRequestMarshaller(); var unmarshaller = UpdateConfigurationTemplateResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
private Amazon.ElasticBeanstalk.Model.UpdateConfigurationTemplateResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.UpdateConfigurationTemplateRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "UpdateConfigurationTemplate"); try { #if DESKTOP return(client.UpdateConfigurationTemplate(request)); #elif CORECLR return(client.UpdateConfigurationTemplateAsync(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; } }
/// <summary> /// <para> Updates the specified configuration template to have the specified properties or configuration option values. </para> /// <para><b>NOTE:</b> If a property (for example, ApplicationName) is not provided, its value remains unchanged. To clear such properties, /// specify an empty string. </para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// /// </ul> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> public UpdateConfigurationTemplateResponse UpdateConfigurationTemplate(UpdateConfigurationTemplateRequest request) { var task = UpdateConfigurationTemplateAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para> Updates the specified configuration template to have the specified properties or configuration option values. </para> /// <para><b>NOTE:</b> If a property (for example, ApplicationName) is not provided, its value remains unchanged. To clear such properties, /// specify an empty string. </para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// /// </ul> /// </summary> /// /// <param name="updateConfigurationTemplateRequest">Container for the necessary parameters to execute the UpdateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<UpdateConfigurationTemplateResponse> UpdateConfigurationTemplateAsync(UpdateConfigurationTemplateRequest updateConfigurationTemplateRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateConfigurationTemplateRequestMarshaller(); var unmarshaller = UpdateConfigurationTemplateResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdateConfigurationTemplateRequest, UpdateConfigurationTemplateResponse>(updateConfigurationTemplateRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }