Updates the specified application version to have the specified properties.
NOTE: If a property (for example, description ) is not provided, the value remains unchanged. To clear properties, specify an empty string.
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticBeanstalk.Model.UpdateApplicationVersionRequest(); if (cmdletContext.ApplicationName != null) { request.ApplicationName = cmdletContext.ApplicationName; } if (cmdletContext.Description != null) { request.Description = cmdletContext.Description; } if (cmdletContext.VersionLabel != null) { request.VersionLabel = cmdletContext.VersionLabel; } 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 UpdateApplicationVersion operation. /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.UpdateApplicationVersion"/> /// </summary> /// /// <param name="updateApplicationVersionRequest">Container for the necessary parameters to execute the UpdateApplicationVersion 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 /// EndUpdateApplicationVersion operation.</returns> public IAsyncResult BeginUpdateApplicationVersion(UpdateApplicationVersionRequest updateApplicationVersionRequest, AsyncCallback callback, object state) { return invokeUpdateApplicationVersion(updateApplicationVersionRequest, callback, state, false); }
IAsyncResult invokeUpdateApplicationVersion(UpdateApplicationVersionRequest updateApplicationVersionRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateApplicationVersionRequestMarshaller().Marshall(updateApplicationVersionRequest); var unmarshaller = UpdateApplicationVersionResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para> Updates the specified application version to have the specified properties. </para> <para><b>NOTE:</b> If a property (for example, /// description) is not provided, the value remains unchanged. To clear properties, specify an empty string. </para> /// </summary> /// /// <param name="updateApplicationVersionRequest">Container for the necessary parameters to execute the UpdateApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateApplicationVersion service method, as returned by AmazonElasticBeanstalk.</returns> /// public UpdateApplicationVersionResponse UpdateApplicationVersion(UpdateApplicationVersionRequest updateApplicationVersionRequest) { IAsyncResult asyncResult = invokeUpdateApplicationVersion(updateApplicationVersionRequest, null, null, true); return EndUpdateApplicationVersion(asyncResult); }
internal UpdateApplicationVersionResponse UpdateApplicationVersion(UpdateApplicationVersionRequest request) { var marshaller = new UpdateApplicationVersionRequestMarshaller(); var unmarshaller = UpdateApplicationVersionResponseUnmarshaller.Instance; return Invoke<UpdateApplicationVersionRequest,UpdateApplicationVersionResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdateApplicationVersion operation. /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateApplicationVersion 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<UpdateApplicationVersionResponse> UpdateApplicationVersionAsync(UpdateApplicationVersionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateApplicationVersionRequestMarshaller(); var unmarshaller = UpdateApplicationVersionResponseUnmarshaller.Instance; return InvokeAsync<UpdateApplicationVersionRequest,UpdateApplicationVersionResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// <para> Updates the specified application version to have the specified properties. </para> <para><b>NOTE:</b> If a property (for example, /// description) is not provided, the value remains unchanged. To clear properties, specify an empty string. </para> /// </summary> /// /// <param name="updateApplicationVersionRequest">Container for the necessary parameters to execute the UpdateApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateApplicationVersion service method, as returned by AmazonElasticBeanstalk.</returns> /// public UpdateApplicationVersionResponse UpdateApplicationVersion(UpdateApplicationVersionRequest updateApplicationVersionRequest) { IRequest<UpdateApplicationVersionRequest> request = new UpdateApplicationVersionRequestMarshaller().Marshall(updateApplicationVersionRequest); UpdateApplicationVersionResponse response = Invoke<UpdateApplicationVersionRequest, UpdateApplicationVersionResponse> (request, this.signer, UpdateApplicationVersionResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// <para> Updates the specified application version to have the specified properties. </para> <para><b>NOTE:</b> If a property (for example, /// description) is not provided, the value remains unchanged. To clear properties, specify an empty string. </para> /// </summary> /// /// <param name="updateApplicationVersionRequest">Container for the necessary parameters to execute the UpdateApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateApplicationVersion service method, as returned by AmazonElasticBeanstalk.</returns> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<UpdateApplicationVersionResponse> UpdateApplicationVersionAsync(UpdateApplicationVersionRequest updateApplicationVersionRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateApplicationVersionRequestMarshaller(); var unmarshaller = UpdateApplicationVersionResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdateApplicationVersionRequest, UpdateApplicationVersionResponse>(updateApplicationVersionRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal UpdateApplicationVersionResponse UpdateApplicationVersion(UpdateApplicationVersionRequest request) { var task = UpdateApplicationVersionAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
private Amazon.ElasticBeanstalk.Model.UpdateApplicationVersionResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.UpdateApplicationVersionRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "UpdateApplicationVersion"); try { #if DESKTOP return(client.UpdateApplicationVersion(request)); #elif CORECLR return(client.UpdateApplicationVersionAsync(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> /// Initiates the asynchronous execution of the UpdateApplicationVersion operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateApplicationVersion 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 EndUpdateApplicationVersion /// operation.</returns> public IAsyncResult BeginUpdateApplicationVersion(UpdateApplicationVersionRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateApplicationVersionRequestMarshaller(); var unmarshaller = UpdateApplicationVersionResponseUnmarshaller.Instance; return BeginInvoke<UpdateApplicationVersionRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeUpdateApplicationVersion(UpdateApplicationVersionRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new UpdateApplicationVersionRequestMarshaller(); var unmarshaller = UpdateApplicationVersionResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// <para> Updates the specified application version to have the specified properties. </para> <para><b>NOTE:</b> If a property (for example, /// description) is not provided, the value remains unchanged. To clear properties, specify an empty string. </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateApplicationVersion service method, as returned by AmazonElasticBeanstalk.</returns> public UpdateApplicationVersionResponse UpdateApplicationVersion(UpdateApplicationVersionRequest request) { var task = UpdateApplicationVersionAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para> Updates the specified application version to have the specified properties. </para> <para><b>NOTE:</b> If a property (for example, /// description) is not provided, the value remains unchanged. To clear properties, specify an empty string. </para> /// </summary> /// /// <param name="updateApplicationVersionRequest">Container for the necessary parameters to execute the UpdateApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the UpdateApplicationVersion service method, as returned by AmazonElasticBeanstalk.</returns> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<UpdateApplicationVersionResponse> UpdateApplicationVersionAsync(UpdateApplicationVersionRequest updateApplicationVersionRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateApplicationVersionRequestMarshaller(); var unmarshaller = UpdateApplicationVersionResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdateApplicationVersionRequest, UpdateApplicationVersionResponse>(updateApplicationVersionRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }