Container for the parameters to the DeleteApplication operation.

Deletes the specified application along with all associated versions and configurations. The application versions will not be deleted from your Amazon S3 bucket.

NOTE:You cannot delete an application that has a running environment.

Inheritance: AmazonElasticBeanstalkRequest
コード例 #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ElasticBeanstalk.Model.DeleteApplicationRequest();

            if (cmdletContext.ApplicationName != null)
            {
                request.ApplicationName = cmdletContext.ApplicationName;
            }
            if (cmdletContext.TerminateEnvByForce != null)
            {
                request.TerminateEnvByForce = cmdletContext.TerminateEnvByForce.Value;
            }

            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);
        }
コード例 #2
0
 /// <summary>
 /// <para> Deletes the specified application along with all associated versions and configurations. </para> <para><b>NOTE:</b>You cannot delete
 /// an application that has a running environment. </para>
 /// </summary>
 /// 
 /// <param name="deleteApplicationRequest">Container for the necessary parameters to execute the DeleteApplication service method on
 ///          AmazonElasticBeanstalk.</param>
 /// 
 public DeleteApplicationResponse DeleteApplication(DeleteApplicationRequest deleteApplicationRequest)
 {
     IAsyncResult asyncResult = invokeDeleteApplication(deleteApplicationRequest, null, null, true);
     return EndDeleteApplication(asyncResult);
 }
コード例 #3
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteApplication operation.
 /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.DeleteApplication"/>
 /// </summary>
 /// 
 /// <param name="deleteApplicationRequest">Container for the necessary parameters to execute the DeleteApplication 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 BeginDeleteApplication(DeleteApplicationRequest deleteApplicationRequest, AsyncCallback callback, object state)
 {
     return invokeDeleteApplication(deleteApplicationRequest, callback, state, false);
 }
コード例 #4
0
 IAsyncResult invokeDeleteApplication(DeleteApplicationRequest deleteApplicationRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DeleteApplicationRequestMarshaller().Marshall(deleteApplicationRequest);
     var unmarshaller = DeleteApplicationResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
コード例 #5
0
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteApplication operation.
        /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteApplication 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<DeleteApplicationResponse> DeleteApplicationAsync(DeleteApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteApplicationRequestMarshaller();
            var unmarshaller = DeleteApplicationResponseUnmarshaller.Instance;

            return InvokeAsync<DeleteApplicationRequest,DeleteApplicationResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
コード例 #6
0
        internal DeleteApplicationResponse DeleteApplication(DeleteApplicationRequest request)
        {
            var marshaller = new DeleteApplicationRequestMarshaller();
            var unmarshaller = DeleteApplicationResponseUnmarshaller.Instance;

            return Invoke<DeleteApplicationRequest,DeleteApplicationResponse>(request, marshaller, unmarshaller);
        }
コード例 #7
0
  /// <summary>
  /// <para> Deletes the specified application along with all associated versions and configurations. </para> <para><b>NOTE:</b>You cannot delete
  /// an application that has a running environment. </para>
  /// </summary>
  /// 
  /// <param name="deleteApplicationRequest">Container for the necessary parameters to execute the DeleteApplication service method on
  ///           AmazonElasticBeanstalk.</param>
  /// 
 public DeleteApplicationResponse DeleteApplication(DeleteApplicationRequest deleteApplicationRequest) 
 {           
     IRequest<DeleteApplicationRequest> request = new DeleteApplicationRequestMarshaller().Marshall(deleteApplicationRequest);
     DeleteApplicationResponse response = Invoke<DeleteApplicationRequest, DeleteApplicationResponse> (request, this.signer, DeleteApplicationResponseUnmarshaller.GetInstance());
     return response;
 }
コード例 #8
0
        /// <summary>
        /// <para> Deletes the specified application along with all associated versions and configurations. The application versions will not be deleted
        /// from your Amazon S3 bucket. </para> <para><b>NOTE:</b>You cannot delete an application that has a running environment. </para>
        /// </summary>
        /// 
        /// <param name="deleteApplicationRequest">Container for the necessary parameters to execute the DeleteApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <exception cref="T:Amazon.ElasticBeanstalk.Model.OperationInProgressException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<DeleteApplicationResponse> DeleteApplicationAsync(DeleteApplicationRequest deleteApplicationRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteApplicationRequestMarshaller();
            var unmarshaller = DeleteApplicationResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DeleteApplicationRequest, DeleteApplicationResponse>(deleteApplicationRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
コード例 #9
0
		internal DeleteApplicationResponse DeleteApplication(DeleteApplicationRequest request)
        {
            var task = DeleteApplicationAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
コード例 #10
0
 private Amazon.ElasticBeanstalk.Model.DeleteApplicationResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.DeleteApplicationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "DeleteApplication");
     try
     {
         #if DESKTOP
         return(client.DeleteApplication(request));
         #elif CORECLR
         return(client.DeleteApplicationAsync(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;
     }
 }
コード例 #11
0
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteApplication operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteApplication 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 EndDeleteApplication
        ///         operation.</returns>
        public IAsyncResult BeginDeleteApplication(DeleteApplicationRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DeleteApplicationRequestMarshaller();
            var unmarshaller = DeleteApplicationResponseUnmarshaller.Instance;

            return BeginInvoke<DeleteApplicationRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
コード例 #12
0
        IAsyncResult invokeDeleteApplication(DeleteApplicationRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new DeleteApplicationRequestMarshaller();
            var unmarshaller = DeleteApplicationResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
コード例 #13
0
        /// <summary>
        /// <para> Deletes the specified application along with all associated versions and configurations. The application versions will not be deleted
        /// from your Amazon S3 bucket. </para> <para><b>NOTE:</b>You cannot delete an application that has a running environment. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <exception cref="T:Amazon.ElasticBeanstalk.Model.OperationInProgressException" />
		public DeleteApplicationResponse DeleteApplication(DeleteApplicationRequest request)
        {
            var task = DeleteApplicationAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
コード例 #14
0
        /// <summary>
        /// <para> Deletes the specified application along with all associated versions and configurations. The application versions will not be deleted
        /// from your Amazon S3 bucket. </para> <para><b>NOTE:</b>You cannot delete an application that has a running environment. </para>
        /// </summary>
        /// 
        /// <param name="deleteApplicationRequest">Container for the necessary parameters to execute the DeleteApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <exception cref="T:Amazon.ElasticBeanstalk.Model.OperationInProgressException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<DeleteApplicationResponse> DeleteApplicationAsync(DeleteApplicationRequest deleteApplicationRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteApplicationRequestMarshaller();
            var unmarshaller = DeleteApplicationResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, DeleteApplicationRequest, DeleteApplicationResponse>(deleteApplicationRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }