AutoScaling / Client / exit_standby

exit_standby#

AutoScaling.Client.exit_standby(**kwargs)#

Moves the specified instances out of the standby state.

After you put the instances back in service, the desired capacity is incremented.

For more information, see Temporarily removing instances from your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.

See also: AWS API Documentation

Request Syntax

response = client.exit_standby(
    InstanceIds=[
        'string',
    ],
    AutoScalingGroupName='string'
)
Parameters:
  • InstanceIds (list) –

    The IDs of the instances. You can specify up to 20 instances.

    • (string) –

  • AutoScalingGroupName (string) –

    [REQUIRED]

    The name of the Auto Scaling group.

Return type:

dict

Returns:

Response Syntax

{
    'Activities': [
        {
            'ActivityId': 'string',
            'AutoScalingGroupName': 'string',
            'Description': 'string',
            'Cause': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'StatusCode': 'PendingSpotBidPlacement'|'WaitingForSpotInstanceRequestId'|'WaitingForSpotInstanceId'|'WaitingForInstanceId'|'PreInService'|'InProgress'|'WaitingForELBConnectionDraining'|'MidLifecycleAction'|'WaitingForInstanceWarmup'|'Successful'|'Failed'|'Cancelled'|'WaitingForConnectionDraining',
            'StatusMessage': 'string',
            'Progress': 123,
            'Details': 'string',
            'AutoScalingGroupState': 'string',
            'AutoScalingGroupARN': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • Activities (list) –

      The activities related to moving instances out of Standby mode.

      • (dict) –

        Describes scaling activity, which is a long-running process that represents a change to your Auto Scaling group, such as changing its size or replacing an instance.

        • ActivityId (string) –

          The ID of the activity.

        • AutoScalingGroupName (string) –

          The name of the Auto Scaling group.

        • Description (string) –

          A friendly, more verbose description of the activity.

        • Cause (string) –

          The reason the activity began.

        • StartTime (datetime) –

          The start time of the activity.

        • EndTime (datetime) –

          The end time of the activity.

        • StatusCode (string) –

          The current status of the activity.

        • StatusMessage (string) –

          A friendly, more verbose description of the activity status.

        • Progress (integer) –

          A value between 0 and 100 that indicates the progress of the activity.

        • Details (string) –

          The details about the activity.

        • AutoScalingGroupState (string) –

          The state of the Auto Scaling group, which is either InService or Deleted.

        • AutoScalingGroupARN (string) –

          The Amazon Resource Name (ARN) of the Auto Scaling group.

Exceptions

  • AutoScaling.Client.exceptions.ResourceContentionFault

Examples

This example moves the specified instance out of standby mode.

response = client.exit_standby(
    AutoScalingGroupName='my-auto-scaling-group',
    InstanceIds=[
        'i-93633f9b',
    ],
)

print(response)

Expected Output:

{
    'Activities': [
        {
            'ActivityId': '142928e1-a2dc-453a-9b24-b85ad6735928',
            'AutoScalingGroupName': 'my-auto-scaling-group',
            'Cause': 'At 2015-04-12T15:14:29Z instance i-93633f9b was moved out of standby in response to a user request, increasing the capacity from 1 to 2.',
            'Description': 'Moving EC2 instance out of Standby: i-93633f9b',
            'Details': 'details',
            'Progress': 30,
            'StartTime': datetime(2015, 4, 12, 15, 14, 29, 6, 102, 0),
            'StatusCode': 'PreInService',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}