Container for the parameters to the RestartAppServer operation.

Causes the environment to restart the application container server running on each Amazon EC2 instance.

상속: AmazonElasticBeanstalkRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ElasticBeanstalk.Model.RestartAppServerRequest();

            if (cmdletContext.EnvironmentId != null)
            {
                request.EnvironmentId = cmdletContext.EnvironmentId;
            }
            if (cmdletContext.EnvironmentName != null)
            {
                request.EnvironmentName = cmdletContext.EnvironmentName;
            }

            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 RestartAppServer operation.
 /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.RestartAppServer"/>
 /// </summary>
 /// 
 /// <param name="restartAppServerRequest">Container for the necessary parameters to execute the RestartAppServer 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 BeginRestartAppServer(RestartAppServerRequest restartAppServerRequest, AsyncCallback callback, object state)
 {
     return invokeRestartAppServer(restartAppServerRequest, callback, state, false);
 }
 IAsyncResult invokeRestartAppServer(RestartAppServerRequest restartAppServerRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new RestartAppServerRequestMarshaller().Marshall(restartAppServerRequest);
     var unmarshaller = RestartAppServerResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 /// <summary>
 /// <para> Causes the environment to restart the application container server running on each Amazon EC2 instance. </para>
 /// </summary>
 /// 
 /// <param name="restartAppServerRequest">Container for the necessary parameters to execute the RestartAppServer service method on
 ///          AmazonElasticBeanstalk.</param>
 /// 
 public RestartAppServerResponse RestartAppServer(RestartAppServerRequest restartAppServerRequest)
 {
     IAsyncResult asyncResult = invokeRestartAppServer(restartAppServerRequest, null, null, true);
     return EndRestartAppServer(asyncResult);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the RestartAppServer operation.
        /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the RestartAppServer 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<RestartAppServerResponse> RestartAppServerAsync(RestartAppServerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new RestartAppServerRequestMarshaller();
            var unmarshaller = RestartAppServerResponseUnmarshaller.Instance;

            return InvokeAsync<RestartAppServerRequest,RestartAppServerResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal RestartAppServerResponse RestartAppServer(RestartAppServerRequest request)
        {
            var marshaller = new RestartAppServerRequestMarshaller();
            var unmarshaller = RestartAppServerResponseUnmarshaller.Instance;

            return Invoke<RestartAppServerRequest,RestartAppServerResponse>(request, marshaller, unmarshaller);
        }
  /// <summary>
  /// <para> Causes the environment to restart the application container server running on each Amazon EC2 instance. </para>
  /// </summary>
  /// 
  /// <param name="restartAppServerRequest">Container for the necessary parameters to execute the RestartAppServer service method on
  ///           AmazonElasticBeanstalk.</param>
  /// 
 public RestartAppServerResponse RestartAppServer(RestartAppServerRequest restartAppServerRequest) 
 {           
     IRequest<RestartAppServerRequest> request = new RestartAppServerRequestMarshaller().Marshall(restartAppServerRequest);
     RestartAppServerResponse response = Invoke<RestartAppServerRequest, RestartAppServerResponse> (request, this.signer, RestartAppServerResponseUnmarshaller.GetInstance());
     return response;
 }
        /// <summary>
        /// <para> Causes the environment to restart the application container server running on each Amazon EC2 instance. </para>
        /// </summary>
        /// 
        /// <param name="restartAppServerRequest">Container for the necessary parameters to execute the RestartAppServer service method on
        /// AmazonElasticBeanstalk.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<RestartAppServerResponse> RestartAppServerAsync(RestartAppServerRequest restartAppServerRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new RestartAppServerRequestMarshaller();
            var unmarshaller = RestartAppServerResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, RestartAppServerRequest, RestartAppServerResponse>(restartAppServerRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
		internal RestartAppServerResponse RestartAppServer(RestartAppServerRequest request)
        {
            var task = RestartAppServerAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the RestartAppServer operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the RestartAppServer 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 EndRestartAppServer
        ///         operation.</returns>
        public IAsyncResult BeginRestartAppServer(RestartAppServerRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new RestartAppServerRequestMarshaller();
            var unmarshaller = RestartAppServerResponseUnmarshaller.Instance;

            return BeginInvoke<RestartAppServerRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        IAsyncResult invokeRestartAppServer(RestartAppServerRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new RestartAppServerRequestMarshaller();
            var unmarshaller = RestartAppServerResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
        /// <summary>
        /// <para> Causes the environment to restart the application container server running on each Amazon EC2 instance. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the RestartAppServer service method on
        /// AmazonElasticBeanstalk.</param>
		public RestartAppServerResponse RestartAppServer(RestartAppServerRequest request)
        {
            var task = RestartAppServerAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
 private Amazon.ElasticBeanstalk.Model.RestartAppServerResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.RestartAppServerRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "RestartAppServer");
     try
     {
         #if DESKTOP
         return(client.RestartAppServer(request));
         #elif CORECLR
         return(client.RestartAppServerAsync(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> Causes the environment to restart the application container server running on each Amazon EC2 instance. </para>
        /// </summary>
        /// 
        /// <param name="restartAppServerRequest">Container for the necessary parameters to execute the RestartAppServer service method on
        /// AmazonElasticBeanstalk.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<RestartAppServerResponse> RestartAppServerAsync(RestartAppServerRequest restartAppServerRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new RestartAppServerRequestMarshaller();
            var unmarshaller = RestartAppServerResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, RestartAppServerRequest, RestartAppServerResponse>(restartAppServerRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }