Container for the parameters to the SuspendProcesses operation. Suspends the specified Auto Scaling processes, or all processes, for the specified Auto Scaling group.

Note that if you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly.

To resume processes that have been suspended, use ResumeProcesses.

For more information, see Suspending and Resuming Auto Scaling Processes in the Auto Scaling User Guide.

Inheritance: AmazonAutoScalingRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.AutoScaling.Model.SuspendProcessesRequest();

            if (cmdletContext.AutoScalingGroupName != null)
            {
                request.AutoScalingGroupName = cmdletContext.AutoScalingGroupName;
            }
            if (cmdletContext.ScalingProcess != null)
            {
                request.ScalingProcesses = cmdletContext.ScalingProcess;
            }

            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 SuspendProcesses operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SuspendProcesses 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<SuspendProcessesResponse> SuspendProcessesAsync(SuspendProcessesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new SuspendProcessesRequestMarshaller();
            var unmarshaller = SuspendProcessesResponseUnmarshaller.Instance;

            return InvokeAsync<SuspendProcessesRequest,SuspendProcessesResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal SuspendProcessesResponse SuspendProcesses(SuspendProcessesRequest request)
        {
            var marshaller = new SuspendProcessesRequestMarshaller();
            var unmarshaller = SuspendProcessesResponseUnmarshaller.Instance;

            return Invoke<SuspendProcessesRequest,SuspendProcessesResponse>(request, marshaller, unmarshaller);
        }
 IAsyncResult invokeSuspendProcesses(SuspendProcessesRequest suspendProcessesRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new SuspendProcessesRequestMarshaller().Marshall(suspendProcessesRequest);
     var unmarshaller = SuspendProcessesResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 /// <summary>
 /// Initiates the asynchronous execution of the SuspendProcesses operation.
 /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.SuspendProcesses"/>
 /// </summary>
 /// 
 /// <param name="suspendProcessesRequest">Container for the necessary parameters to execute the SuspendProcesses operation on
 ///          AmazonAutoScaling.</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 BeginSuspendProcesses(SuspendProcessesRequest suspendProcessesRequest, AsyncCallback callback, object state)
 {
     return invokeSuspendProcesses(suspendProcessesRequest, callback, state, false);
 }
 /// <summary>
 /// <para> Suspends Auto Scaling processes for an Auto Scaling group. To suspend specific process types, specify them by name with the
 /// <c>ScalingProcesses.member.N</c> parameter. To suspend all process types, omit the <c>ScalingProcesses.member.N</c> parameter. </para>
 /// <para><b>IMPORTANT:</b> Suspending either of the two primary process types, Launch or Terminate, can prevent other process types from
 /// functioning properly. </para> <para> To resume processes that have been suspended, use ResumeProcesses For more information on suspending
 /// and resuming Auto Scaling process, see <a href="http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US_SuspendResume.html" >Suspend
 /// and Resume Auto Scaling Process</a> .
 /// </para>
 /// </summary>
 /// 
 /// <param name="suspendProcessesRequest">Container for the necessary parameters to execute the SuspendProcesses service method on
 ///          AmazonAutoScaling.</param>
 /// 
 public SuspendProcessesResponse SuspendProcesses(SuspendProcessesRequest suspendProcessesRequest)
 {
     IAsyncResult asyncResult = invokeSuspendProcesses(suspendProcessesRequest, null, null, true);
     return EndSuspendProcesses(asyncResult);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the SuspendProcesses operation.
        /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.SuspendProcesses"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SuspendProcesses 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<SuspendProcessesResponse> SuspendProcessesAsync(SuspendProcessesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new SuspendProcessesRequestMarshaller();
            var unmarshaller = SuspendProcessesResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, SuspendProcessesRequest, SuspendProcessesResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// <para> Suspends Auto Scaling processes for an Auto Scaling group. To suspend specific process types, specify them by name with the
        /// <c>ScalingProcesses.member.N</c> parameter. To suspend all process types, omit the <c>ScalingProcesses.member.N</c> parameter. </para>
        /// <para><b>IMPORTANT:</b> Suspending either of the two primary process types, Launch or Terminate, can prevent other process types from
        /// functioning properly. </para> <para> To resume processes that have been suspended, use ResumeProcesses For more information on suspending
        /// and resuming Auto Scaling process, see <a href="http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US_SuspendResume.html">Suspend
        /// and Resume Auto Scaling Process</a> .
        /// </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SuspendProcesses service method on
        /// AmazonAutoScaling.</param>
		public SuspendProcessesResponse SuspendProcesses(SuspendProcessesRequest request)
        {
            var task = SuspendProcessesAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the SuspendProcesses operation.
        /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SuspendProcesses operation on AmazonAutoScalingClient.</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 EndSuspendProcesses
        ///         operation.</returns>
        public IAsyncResult BeginSuspendProcesses(SuspendProcessesRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new SuspendProcessesRequestMarshaller();
            var unmarshaller = SuspendProcessesResponseUnmarshaller.Instance;

            return BeginInvoke<SuspendProcessesRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 private Amazon.AutoScaling.Model.SuspendProcessesResponse CallAWSServiceOperation(IAmazonAutoScaling client, Amazon.AutoScaling.Model.SuspendProcessesRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Auto Scaling", "SuspendProcesses");
     try
     {
         #if DESKTOP
         return(client.SuspendProcesses(request));
         #elif CORECLR
         return(client.SuspendProcessesAsync(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> Suspends Auto Scaling processes for an Auto Scaling group. To suspend specific process types, specify them by name with the
 /// <c>ScalingProcesses.member.N</c> parameter. To suspend all process types, omit the <c>ScalingProcesses.member.N</c> parameter. </para>
 /// <para><b>IMPORTANT:</b> Suspending either of the two primary process types, Launch or Terminate, can prevent other process types from
 /// functioning properly. For more information about processes and their dependencies, see ProcessType. </para> <para> To resume processes that
 /// have been suspended, use ResumeProcesses. </para>
 /// </summary>
 /// 
 /// <param name="suspendProcessesRequest">Container for the necessary parameters to execute the SuspendProcesses service method on
 ///           AmazonAutoScaling.</param>
 /// 
 public SuspendProcessesResponse SuspendProcesses(SuspendProcessesRequest suspendProcessesRequest)
 {
     IRequest<SuspendProcessesRequest> request = new SuspendProcessesRequestMarshaller().Marshall(suspendProcessesRequest);
     SuspendProcessesResponse response = Invoke<SuspendProcessesRequest, SuspendProcessesResponse> (request, this.signer, SuspendProcessesResponseUnmarshaller.GetInstance());
     return response;
 }
		internal SuspendProcessesResponse SuspendProcesses(SuspendProcessesRequest request)
        {
            var task = SuspendProcessesAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the SuspendProcesses operation.
        /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.SuspendProcesses"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SuspendProcesses 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 async Task<SuspendProcessesResponse> SuspendProcessesAsync(SuspendProcessesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new SuspendProcessesRequestMarshaller();
            var unmarshaller = SuspendProcessesResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, SuspendProcessesRequest, SuspendProcessesResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }