Container for the parameters to the UpdateApplication operation.

Updates the specified application to have the specified properties.

NOTE: If a property (for example, description) is not provided, the value remains unchanged. To clear these properties, specify an empty string.

Inheritance: Amazon.Runtime.AmazonWebServiceRequest
Esempio n. 1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ElasticBeanstalk.Model.UpdateApplicationRequest();

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

            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 UpdateApplication operation.
 /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.UpdateApplication"/>
 /// </summary>
 /// 
 /// <param name="updateApplicationRequest">Container for the necessary parameters to execute the UpdateApplication 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 EndUpdateApplication
 ///         operation.</returns>
 public IAsyncResult BeginUpdateApplication(UpdateApplicationRequest updateApplicationRequest, AsyncCallback callback, object state)
 {
     return invokeUpdateApplication(updateApplicationRequest, callback, state, false);
 }
 IAsyncResult invokeUpdateApplication(UpdateApplicationRequest updateApplicationRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new UpdateApplicationRequestMarshaller().Marshall(updateApplicationRequest);
     var unmarshaller = UpdateApplicationResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 /// <summary>
 /// <para>Updates the specified application 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 these properties, specify an empty string. </para>
 /// </summary>
 /// 
 /// <param name="updateApplicationRequest">Container for the necessary parameters to execute the UpdateApplication service method on
 ///          AmazonElasticBeanstalk.</param>
 /// 
 /// <returns>The response from the UpdateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
 /// 
 public UpdateApplicationResponse UpdateApplication(UpdateApplicationRequest updateApplicationRequest)
 {
     IAsyncResult asyncResult = invokeUpdateApplication(updateApplicationRequest, null, null, true);
     return EndUpdateApplication(asyncResult);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateApplication operation.
        /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateApplication 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<UpdateApplicationResponse> UpdateApplicationAsync(UpdateApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateApplicationRequestMarshaller();
            var unmarshaller = UpdateApplicationResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateApplicationRequest,UpdateApplicationResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal UpdateApplicationResponse UpdateApplication(UpdateApplicationRequest request)
        {
            var marshaller = new UpdateApplicationRequestMarshaller();
            var unmarshaller = UpdateApplicationResponseUnmarshaller.Instance;

            return Invoke<UpdateApplicationRequest,UpdateApplicationResponse>(request, marshaller, unmarshaller);
        }
  /// <summary>
  /// <para>Updates the specified application 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 these properties, specify an empty string. </para>
  /// </summary>
  /// 
  /// <param name="updateApplicationRequest">Container for the necessary parameters to execute the UpdateApplication service method on
  ///           AmazonElasticBeanstalk.</param>
  /// 
  /// <returns>The response from the UpdateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
  /// 
 public UpdateApplicationResponse UpdateApplication(UpdateApplicationRequest updateApplicationRequest) 
 {           
     IRequest<UpdateApplicationRequest> request = new UpdateApplicationRequestMarshaller().Marshall(updateApplicationRequest);
     UpdateApplicationResponse response = Invoke<UpdateApplicationRequest, UpdateApplicationResponse> (request, this.signer, UpdateApplicationResponseUnmarshaller.GetInstance());
     return response;
 }
		internal UpdateApplicationResponse UpdateApplication(UpdateApplicationRequest request)
        {
            var task = UpdateApplicationAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <summary>
        /// <para>Updates the specified application 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 these properties, specify an empty string. </para>
        /// </summary>
        /// 
        /// <param name="updateApplicationRequest">Container for the necessary parameters to execute the UpdateApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the UpdateApplication 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<UpdateApplicationResponse> UpdateApplicationAsync(UpdateApplicationRequest updateApplicationRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateApplicationRequestMarshaller();
            var unmarshaller = UpdateApplicationResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, UpdateApplicationRequest, UpdateApplicationResponse>(updateApplicationRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateApplication operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateApplication 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 EndUpdateApplication
        ///         operation.</returns>
        public IAsyncResult BeginUpdateApplication(UpdateApplicationRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateApplicationRequestMarshaller();
            var unmarshaller = UpdateApplicationResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateApplicationRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        IAsyncResult invokeUpdateApplication(UpdateApplicationRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new UpdateApplicationRequestMarshaller();
            var unmarshaller = UpdateApplicationResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
        /// <summary>
        /// <para>Updates the specified application 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 these properties, specify an empty string. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the UpdateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
		public UpdateApplicationResponse UpdateApplication(UpdateApplicationRequest request)
        {
            var task = UpdateApplicationAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// <para>Updates the specified application 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 these properties, specify an empty string. </para>
        /// </summary>
        /// 
        /// <param name="updateApplicationRequest">Container for the necessary parameters to execute the UpdateApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the UpdateApplication 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<UpdateApplicationResponse> UpdateApplicationAsync(UpdateApplicationRequest updateApplicationRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateApplicationRequestMarshaller();
            var unmarshaller = UpdateApplicationResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, UpdateApplicationRequest, UpdateApplicationResponse>(updateApplicationRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
Esempio n. 14
0
 private Amazon.ElasticBeanstalk.Model.UpdateApplicationResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.UpdateApplicationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "UpdateApplication");
     try
     {
         #if DESKTOP
         return(client.UpdateApplication(request));
         #elif CORECLR
         return(client.UpdateApplicationAsync(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;
     }
 }