AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the PutScheduledUpdateGroupAction operation. Creates or updates a scheduled scaling action for an Auto Scaling group.

For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.

You can view the scheduled actions for an Auto Scaling group using the DescribeScheduledActions API call. If you are no longer using a scheduled action, you can delete it by calling the DeleteScheduledAction API.

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

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.AutoScaling.AmazonAutoScalingRequest
      Amazon.AutoScaling.Model.PutScheduledUpdateGroupActionRequest

Namespace: Amazon.AutoScaling.Model
Assembly: AWSSDK.AutoScaling.dll
Version: 3.x.y.z

Syntax

C#
public class PutScheduledUpdateGroupActionRequest : AmazonAutoScalingRequest
         IAmazonWebServiceRequest

The PutScheduledUpdateGroupActionRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AutoScalingGroupName System.String

Gets and sets the property AutoScalingGroupName.

The name of the Auto Scaling group.

Public Property DesiredCapacity System.Int32

Gets and sets the property DesiredCapacity.

The desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain. It can scale beyond this capacity if you add more scaling conditions.

You must specify at least one of the following properties: MaxSize, MinSize, or DesiredCapacity.

Public Property EndTime System.DateTime

Gets and sets the property EndTimeUtc.

This property is deprecated. Setting this property results in non-UTC DateTimes not being marshalled correctly. Use EndTimeUtc instead. Setting either EndTime or EndTimeUtc results in both EndTime and EndTimeUtc being assigned, the latest assignment to either one of the two property is reflected in the value of both. EndTime is provided for backwards compatibility only and assigning a non-Utc DateTime to it results in the wrong timestamp being passed to the service.

The date and time for the recurring schedule to end, in UTC. For example, "2021-06-01T00:00:00Z".

Public Property EndTimeUtc System.DateTime

Gets and sets the property EndTimeUtc.

The date and time for the recurring schedule to end, in UTC. For example, "2021-06-01T00:00:00Z".

Public Property MaxSize System.Int32

Gets and sets the property MaxSize.

The maximum size of the Auto Scaling group.

Public Property MinSize System.Int32

Gets and sets the property MinSize.

The minimum size of the Auto Scaling group.

Public Property Recurrence System.String

Gets and sets the property Recurrence.

The recurring schedule for this action. This format consists of five fields separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes (for example, "30 0 1 1,6,12 *"). For more information about this format, see Crontab.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action starts and stops.

Cron expressions use Universal Coordinated Time (UTC) by default.

Public Property ScheduledActionName System.String

Gets and sets the property ScheduledActionName.

The name of this scaling action.

Public Property StartTime System.DateTime

Gets and sets the property StartTimeUtc.

This property is deprecated. Setting this property results in non-UTC DateTimes not being marshalled correctly. Use StartTimeUtc instead. Setting either StartTime or StartTimeUtc results in both StartTime and StartTimeUtc being assigned, the latest assignment to either one of the two property is reflected in the value of both. StartTime is provided for backwards compatibility only and assigning a non-Utc DateTime to it results in the wrong timestamp being passed to the service.

The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example, "2021-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.

Public Property StartTimeUtc System.DateTime

Gets and sets the property StartTimeUtc.

The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example, "2021-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.

Public Property Time System.DateTime

Gets and sets the property TimeUtc.

This property is deprecated. Setting this property results in non-UTC DateTimes not being marshalled correctly. Use TimeUtc instead. Setting either Time or TimeUtc results in both Time and TimeUtc being assigned, the latest assignment to either one of the two property is reflected in the value of both. Time is provided for backwards compatibility only and assigning a non-Utc DateTime to it results in the wrong timestamp being passed to the service.

This property is no longer used.

Public Property TimeUtc System.DateTime

Gets and sets the property TimeUtc.

This property is no longer used.

Public Property TimeZone System.String

Gets and sets the property TimeZone.

Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default.

Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.

Examples

This example adds the specified scheduled action to the specified Auto Scaling group.

To add a scheduled action to an Auto Scaling group


var client = new AmazonAutoScalingClient();
var response = client.PutScheduledUpdateGroupAction(new PutScheduledUpdateGroupActionRequest 
{
    AutoScalingGroupName = "my-auto-scaling-group",
    DesiredCapacity = 4,
    EndTimeUtc = new DateTime(2014, 5, 12, 8, 0, 0, DateTimeKind.Utc),
    MaxSize = 6,
    MinSize = 2,
    ScheduledActionName = "my-scheduled-action",
    StartTimeUtc = new DateTime(2014, 5, 12, 8, 0, 0, DateTimeKind.Utc)
});


            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5