Auto Scaling

2018/08/14 - Auto Scaling - 2 new api methods

Changes  Update autoscaling client to latest version

BatchPutScheduledUpdateGroupAction (new) Link ¶

Creates or updates one or more scheduled scaling actions for an Auto Scaling group. When updating a scheduled scaling action, if you leave a parameter unspecified, the corresponding value remains unchanged.

See also: AWS API Documentation

Request Syntax

client.batch_put_scheduled_update_group_action(
    AutoScalingGroupName='string',
    ScheduledUpdateGroupActions=[
        {
            'ScheduledActionName': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'Recurrence': 'string',
            'MinSize': 123,
            'MaxSize': 123,
            'DesiredCapacity': 123
        },
    ]
)
type AutoScalingGroupName:

string

param AutoScalingGroupName:

[REQUIRED]

The name of the Auto Scaling group.

type ScheduledUpdateGroupActions:

list

param ScheduledUpdateGroupActions:

[REQUIRED]

One or more scheduled actions. The maximum number allowed is 50.

  • (dict) --

    Describes one or more scheduled scaling action updates for a specified Auto Scaling group. Used in combination with BatchPutScheduledUpdateGroupAction.

    When updating a scheduled scaling action, all optional parameters are left unchanged if not specified.

    • ScheduledActionName (string) -- [REQUIRED]

      The name of the scaling action.

    • StartTime (datetime) --

      The time for the action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only (for example, 2014-06-01T00:00:00Z).

      If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this time, and then performs the action based on the specified recurrence.

      If you try to schedule the action in the past, Amazon EC2 Auto Scaling returns an error message.

    • EndTime (datetime) --

      The time for the recurring schedule to end. Amazon EC2 Auto Scaling does not perform the action after this time.

    • Recurrence (string) --

      The recurring schedule for the action, in Unix cron syntax format. For more information about this format, see Crontab.

    • MinSize (integer) --

      The minimum size of the group.

    • MaxSize (integer) --

      The maximum size of the group.

    • DesiredCapacity (integer) --

      The number of EC2 instances that should be running in the group.

rtype:

dict

returns:

Response Syntax

{
    'FailedScheduledUpdateGroupActions': [
        {
            'ScheduledActionName': 'string',
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • FailedScheduledUpdateGroupActions (list) --

      The names of the scheduled actions that could not be created or updated, including an error message.

      • (dict) --

        Describes a scheduled action that could not be created, updated, or deleted.

        • ScheduledActionName (string) --

          The name of the scheduled action.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The error message accompanying the error code.

BatchDeleteScheduledAction (new) Link ¶

Deletes one or more scheduled actions for the specified Auto Scaling group.

See also: AWS API Documentation

Request Syntax

client.batch_delete_scheduled_action(
    AutoScalingGroupName='string',
    ScheduledActionNames=[
        'string',
    ]
)
type AutoScalingGroupName:

string

param AutoScalingGroupName:

[REQUIRED]

The name of the Auto Scaling group.

type ScheduledActionNames:

list

param ScheduledActionNames:

[REQUIRED]

The names of the scheduled actions to delete. The maximum number allowed is 50.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'FailedScheduledActions': [
        {
            'ScheduledActionName': 'string',
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • FailedScheduledActions (list) --

      The names of the scheduled actions that could not be deleted, including an error message.

      • (dict) --

        Describes a scheduled action that could not be created, updated, or deleted.

        • ScheduledActionName (string) --

          The name of the scheduled action.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The error message accompanying the error code.