/* * 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 ec2-2016-11-15.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.EC2.Model { /// /// Container for the parameters to the CreateInstanceEventWindow operation. /// Creates an event window in which scheduled events for the associated Amazon EC2 instances /// can run. /// /// /// /// You can define either a set of time ranges or a cron expression when creating the /// event window, but not both. All event window times are in UTC. /// /// /// /// You can create up to 200 event windows per Amazon Web Services Region. /// /// /// /// When you create the event window, targets (instance IDs, Dedicated Host IDs, or tags) /// are not yet associated with it. To ensure that the event window can be used, you must /// associate one or more targets with it by using the AssociateInstanceEventWindow /// API. /// /// /// /// Event windows are applicable only for scheduled events that stop, reboot, or terminate /// instances. /// /// /// /// Event windows are not applicable for: /// /// /// /// For more information, see Define /// event windows for scheduled events in the Amazon EC2 User Guide. /// /// public partial class CreateInstanceEventWindowRequest : AmazonEC2Request { private string _cronExpression; private string _name; private List _tagSpecifications = new List(); private List _timeRanges = new List(); /// /// Gets and sets the property CronExpression. /// /// The cron expression for the event window, for example, * 0-4,20-23 * * 1,5. /// If you specify a cron expression, you can't specify a time range. /// /// /// /// Constraints: /// ///
  • /// /// Only hour and day of the week values are supported. /// ///
  • /// /// For day of the week values, you can specify either integers 0 through /// 6, or alternative single values SUN through SAT. /// ///
  • /// /// The minute, month, and year must be specified by *. /// ///
  • /// /// The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23. /// ///
  • /// /// Each hour range must be >= 2 hours, for example, 0-2 or 20-23. /// ///
  • /// /// The event window must be >= 4 hours. The combined total time ranges in the event /// window must be >= 4 hours. /// ///
/// /// For more information about cron expressions, see cron /// on the Wikipedia website. /// ///
public string CronExpression { get { return this._cronExpression; } set { this._cronExpression = value; } } // Check to see if CronExpression property is set internal bool IsSetCronExpression() { return this._cronExpression != null; } /// /// Gets and sets the property Name. /// /// The name of the event window. /// /// public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// /// Gets and sets the property TagSpecifications. /// /// The tags to apply to the event window. /// /// public List TagSpecifications { get { return this._tagSpecifications; } set { this._tagSpecifications = value; } } // Check to see if TagSpecifications property is set internal bool IsSetTagSpecifications() { return this._tagSpecifications != null && this._tagSpecifications.Count > 0; } /// /// Gets and sets the property TimeRanges. /// /// The time range for the event window. If you specify a time range, you can't specify /// a cron expression. /// /// public List TimeRanges { get { return this._timeRanges; } set { this._timeRanges = value; } } // Check to see if TimeRanges property is set internal bool IsSetTimeRanges() { return this._timeRanges != null && this._timeRanges.Count > 0; } } }