Deletes the specified version from the specified application.
NOTE:You cannot delete an application version that is associated with a running environment.
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticBeanstalk.Model.DeleteApplicationVersionRequest(); if (cmdletContext.ApplicationName != null) { request.ApplicationName = cmdletContext.ApplicationName; } if (cmdletContext.DeleteSourceBundle != null) { request.DeleteSourceBundle = cmdletContext.DeleteSourceBundle.Value; } 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> /// <para> Deletes the specified version from the specified application. </para> <para><b>NOTE:</b>You cannot delete an application version that /// is associated with a running environment.</para> /// </summary> /// /// <param name="deleteApplicationVersionRequest">Container for the necessary parameters to execute the DeleteApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <exception cref="SourceBundleDeletionException"/> public DeleteApplicationVersionResponse DeleteApplicationVersion(DeleteApplicationVersionRequest deleteApplicationVersionRequest) { IAsyncResult asyncResult = invokeDeleteApplicationVersion(deleteApplicationVersionRequest, null, null, true); return EndDeleteApplicationVersion(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the DeleteApplicationVersion operation. /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.DeleteApplicationVersion"/> /// </summary> /// /// <param name="deleteApplicationVersionRequest">Container for the necessary parameters to execute the DeleteApplicationVersion 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> public IAsyncResult BeginDeleteApplicationVersion(DeleteApplicationVersionRequest deleteApplicationVersionRequest, AsyncCallback callback, object state) { return invokeDeleteApplicationVersion(deleteApplicationVersionRequest, callback, state, false); }
IAsyncResult invokeDeleteApplicationVersion(DeleteApplicationVersionRequest deleteApplicationVersionRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteApplicationVersionRequestMarshaller().Marshall(deleteApplicationVersionRequest); var unmarshaller = DeleteApplicationVersionResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DeleteApplicationVersion operation. /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteApplicationVersion 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<DeleteApplicationVersionResponse> DeleteApplicationVersionAsync(DeleteApplicationVersionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteApplicationVersionRequestMarshaller(); var unmarshaller = DeleteApplicationVersionResponseUnmarshaller.Instance; return InvokeAsync<DeleteApplicationVersionRequest,DeleteApplicationVersionResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal DeleteApplicationVersionResponse DeleteApplicationVersion(DeleteApplicationVersionRequest request) { var marshaller = new DeleteApplicationVersionRequestMarshaller(); var unmarshaller = DeleteApplicationVersionResponseUnmarshaller.Instance; return Invoke<DeleteApplicationVersionRequest,DeleteApplicationVersionResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para> Deletes the specified version from the specified application. </para> <para><b>NOTE:</b>You cannot delete an application version that /// is associated with a running environment.</para> /// </summary> /// /// <param name="deleteApplicationVersionRequest">Container for the necessary parameters to execute the DeleteApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <exception cref="SourceBundleDeletionException"/> public DeleteApplicationVersionResponse DeleteApplicationVersion(DeleteApplicationVersionRequest deleteApplicationVersionRequest) { IRequest<DeleteApplicationVersionRequest> request = new DeleteApplicationVersionRequestMarshaller().Marshall(deleteApplicationVersionRequest); DeleteApplicationVersionResponse response = Invoke<DeleteApplicationVersionRequest, DeleteApplicationVersionResponse> (request, this.signer, DeleteApplicationVersionResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// <para> Deletes the specified version from the specified application. </para> <para><b>NOTE:</b>You cannot delete an application version that /// is associated with a running environment.</para> /// </summary> /// /// <param name="deleteApplicationVersionRequest">Container for the necessary parameters to execute the DeleteApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.OperationInProgressException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.SourceBundleDeletionException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.S3LocationNotInServiceRegionException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeleteApplicationVersionResponse> DeleteApplicationVersionAsync(DeleteApplicationVersionRequest deleteApplicationVersionRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteApplicationVersionRequestMarshaller(); var unmarshaller = DeleteApplicationVersionResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteApplicationVersionRequest, DeleteApplicationVersionResponse>(deleteApplicationVersionRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal DeleteApplicationVersionResponse DeleteApplicationVersion(DeleteApplicationVersionRequest request) { var task = DeleteApplicationVersionAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the DeleteApplicationVersion operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteApplicationVersion 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 EndDeleteApplicationVersion /// operation.</returns> public IAsyncResult BeginDeleteApplicationVersion(DeleteApplicationVersionRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteApplicationVersionRequestMarshaller(); var unmarshaller = DeleteApplicationVersionResponseUnmarshaller.Instance; return BeginInvoke<DeleteApplicationVersionRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeDeleteApplicationVersion(DeleteApplicationVersionRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DeleteApplicationVersionRequestMarshaller(); var unmarshaller = DeleteApplicationVersionResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// <para> Deletes the specified version from the specified application. </para> <para><b>NOTE:</b>You cannot delete an application version that /// is associated with a running environment.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.OperationInProgressException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.SourceBundleDeletionException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.S3LocationNotInServiceRegionException" /> public DeleteApplicationVersionResponse DeleteApplicationVersion(DeleteApplicationVersionRequest request) { var task = DeleteApplicationVersionAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.ElasticBeanstalk.Model.DeleteApplicationVersionResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.DeleteApplicationVersionRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "DeleteApplicationVersion"); try { #if DESKTOP return(client.DeleteApplicationVersion(request)); #elif CORECLR return(client.DeleteApplicationVersionAsync(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> Deletes the specified version from the specified application. </para> <para><b>NOTE:</b>You cannot delete an application version that /// is associated with a running environment.</para> /// </summary> /// /// <param name="deleteApplicationVersionRequest">Container for the necessary parameters to execute the DeleteApplicationVersion service method /// on AmazonElasticBeanstalk.</param> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.OperationInProgressException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.SourceBundleDeletionException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.S3LocationNotInServiceRegionException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<DeleteApplicationVersionResponse> DeleteApplicationVersionAsync(DeleteApplicationVersionRequest deleteApplicationVersionRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteApplicationVersionRequestMarshaller(); var unmarshaller = DeleteApplicationVersionResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteApplicationVersionRequest, DeleteApplicationVersionResponse>(deleteApplicationVersionRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }