/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AutoScaling.Model { /// /// 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. /// /// public partial class PutScheduledUpdateGroupActionRequest : AmazonAutoScalingRequest { private string _autoScalingGroupName; private int? _desiredCapacity; private DateTime? _endTimeUtc; private int? _maxSize; private int? _minSize; private string _recurrence; private string _scheduledActionName; private DateTime? _startTimeUtc; private DateTime? _timeUtc; private string _timeZone; /// /// Gets and sets the property AutoScalingGroupName. /// /// The name of the Auto Scaling group. /// /// [AWSProperty(Required=true, Min=1, Max=255)] public string AutoScalingGroupName { get { return this._autoScalingGroupName; } set { this._autoScalingGroupName = value; } } // Check to see if AutoScalingGroupName property is set internal bool IsSetAutoScalingGroupName() { return this._autoScalingGroupName != null; } /// /// 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 int DesiredCapacity { get { return this._desiredCapacity.GetValueOrDefault(); } set { this._desiredCapacity = value; } } // Check to see if DesiredCapacity property is set internal bool IsSetDesiredCapacity() { return this._desiredCapacity.HasValue; } /// /// 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 DateTime EndTimeUtc { get { return this._endTimeUtc.GetValueOrDefault(); } set { this._endTime = this._endTimeUtc = value; } } // Check to see if EndTimeUtc property is set internal bool IsSetEndTimeUtc() { return this._endTimeUtc.HasValue; } /// /// Gets and sets the property MaxSize. /// /// The maximum size of the Auto Scaling group. /// /// public int MaxSize { get { return this._maxSize.GetValueOrDefault(); } set { this._maxSize = value; } } // Check to see if MaxSize property is set internal bool IsSetMaxSize() { return this._maxSize.HasValue; } /// /// Gets and sets the property MinSize. /// /// The minimum size of the Auto Scaling group. /// /// public int MinSize { get { return this._minSize.GetValueOrDefault(); } set { this._minSize = value; } } // Check to see if MinSize property is set internal bool IsSetMinSize() { return this._minSize.HasValue; } /// /// 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. /// /// [AWSProperty(Min=1, Max=255)] public string Recurrence { get { return this._recurrence; } set { this._recurrence = value; } } // Check to see if Recurrence property is set internal bool IsSetRecurrence() { return this._recurrence != null; } /// /// Gets and sets the property ScheduledActionName. /// /// The name of this scaling action. /// /// [AWSProperty(Required=true, Min=1, Max=255)] public string ScheduledActionName { get { return this._scheduledActionName; } set { this._scheduledActionName = value; } } // Check to see if ScheduledActionName property is set internal bool IsSetScheduledActionName() { return this._scheduledActionName != null; } /// /// 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 DateTime StartTimeUtc { get { return this._startTimeUtc.GetValueOrDefault(); } set { this._startTime = this._startTimeUtc = value; } } // Check to see if StartTimeUtc property is set internal bool IsSetStartTimeUtc() { return this._startTimeUtc.HasValue; } /// /// Gets and sets the property TimeUtc. /// /// This property is no longer used. /// /// public DateTime TimeUtc { get { return this._timeUtc.GetValueOrDefault(); } set { this._time = this._timeUtc = value; } } // Check to see if TimeUtc property is set internal bool IsSetTimeUtc() { return this._timeUtc.HasValue; } /// /// 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. /// /// [AWSProperty(Min=1, Max=255)] public string TimeZone { get { return this._timeZone; } set { this._timeZone = value; } } // Check to see if TimeZone property is set internal bool IsSetTimeZone() { return this._timeZone != null; } #region Backwards compatible properties private DateTime? _endTime; private DateTime? _startTime; private DateTime? _time; /// /// 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". /// /// [Obsolete("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.", false)] public DateTime EndTime { get { return this._endTime.GetValueOrDefault(); } set { this._endTime = value; this._endTimeUtc = new DateTime(value.Ticks, DateTimeKind.Utc); } } /// /// 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. /// /// [Obsolete("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.", false)] public DateTime StartTime { get { return this._startTime.GetValueOrDefault(); } set { this._startTime = value; this._startTimeUtc = new DateTime(value.Ticks, DateTimeKind.Utc); } } /// /// 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. /// /// [Obsolete("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.", false)] public DateTime Time { get { return this._time.GetValueOrDefault(); } set { this._time = value; this._timeUtc = new DateTime(value.Ticks, DateTimeKind.Utc); } } #endregion } }