AutoScaling / Client / suspend_processes

suspend_processes#

AutoScaling.Client.suspend_processes(**kwargs)#

Suspends the specified auto scaling processes, or all processes, for the specified Auto Scaling group.

If you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly. For more information, see Suspending and resuming scaling processes in the Amazon EC2 Auto Scaling User Guide.

To resume processes that have been suspended, call the ResumeProcesses API.

See also: AWS API Documentation

Request Syntax

response = client.suspend_processes(
    AutoScalingGroupName='string',
    ScalingProcesses=[
        'string',
    ]
)
Parameters:
  • AutoScalingGroupName (string) –

    [REQUIRED]

    The name of the Auto Scaling group.

  • ScalingProcesses (list) –

    One or more of the following processes:

    • Launch

    • Terminate

    • AddToLoadBalancer

    • AlarmNotification

    • AZRebalance

    • HealthCheck

    • InstanceRefresh

    • ReplaceUnhealthy

    • ScheduledActions

    If you omit this property, all processes are specified.

    • (string) –

Returns:

None

Exceptions

  • AutoScaling.Client.exceptions.ResourceInUseFault

  • AutoScaling.Client.exceptions.ResourceContentionFault

Examples

This example suspends the specified scaling process for the specified Auto Scaling group.

response = client.suspend_processes(
    AutoScalingGroupName='my-auto-scaling-group',
    ScalingProcesses=[
        'AlarmNotification',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}