/* * 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 { /// /// Describes a Spot Instance request. /// public partial class SpotInstanceRequest { private string _actualBlockHourlyPrice; private string _availabilityZoneGroup; private int? _blockDurationMinutes; private DateTime? _createTime; private SpotInstanceStateFault _fault; private string _instanceId; private InstanceInterruptionBehavior _instanceInterruptionBehavior; private string _launchedAvailabilityZone; private string _launchGroup; private LaunchSpecification _launchSpecification; private RIProductDescription _productDescription; private string _spotInstanceRequestId; private string _spotPrice; private SpotInstanceState _state; private SpotInstanceStatus _status; private List _tags = new List(); private SpotInstanceType _type; private DateTime? _validFrom; private DateTime? _validUntil; /// /// Gets and sets the property ActualBlockHourlyPrice. /// /// Deprecated. /// /// public string ActualBlockHourlyPrice { get { return this._actualBlockHourlyPrice; } set { this._actualBlockHourlyPrice = value; } } // Check to see if ActualBlockHourlyPrice property is set internal bool IsSetActualBlockHourlyPrice() { return this._actualBlockHourlyPrice != null; } /// /// Gets and sets the property AvailabilityZoneGroup. /// /// The Availability Zone group. If you specify the same Availability Zone group for all /// Spot Instance requests, all Spot Instances are launched in the same Availability Zone. /// /// public string AvailabilityZoneGroup { get { return this._availabilityZoneGroup; } set { this._availabilityZoneGroup = value; } } // Check to see if AvailabilityZoneGroup property is set internal bool IsSetAvailabilityZoneGroup() { return this._availabilityZoneGroup != null; } /// /// Gets and sets the property BlockDurationMinutes. /// /// Deprecated. /// /// public int BlockDurationMinutes { get { return this._blockDurationMinutes.GetValueOrDefault(); } set { this._blockDurationMinutes = value; } } // Check to see if BlockDurationMinutes property is set internal bool IsSetBlockDurationMinutes() { return this._blockDurationMinutes.HasValue; } /// /// Gets and sets the property CreateTime. /// /// The date and time when the Spot Instance request was created, in UTC format (for example, /// YYYY-MM-DDTHH:MM:SSZ). /// /// public DateTime CreateTime { get { return this._createTime.GetValueOrDefault(); } set { this._createTime = value; } } // Check to see if CreateTime property is set internal bool IsSetCreateTime() { return this._createTime.HasValue; } /// /// Gets and sets the property Fault. /// /// The fault codes for the Spot Instance request, if any. /// /// public SpotInstanceStateFault Fault { get { return this._fault; } set { this._fault = value; } } // Check to see if Fault property is set internal bool IsSetFault() { return this._fault != null; } /// /// Gets and sets the property InstanceId. /// /// The instance ID, if an instance has been launched to fulfill the Spot Instance request. /// /// public string InstanceId { get { return this._instanceId; } set { this._instanceId = value; } } // Check to see if InstanceId property is set internal bool IsSetInstanceId() { return this._instanceId != null; } /// /// Gets and sets the property InstanceInterruptionBehavior. /// /// The behavior when a Spot Instance is interrupted. /// /// public InstanceInterruptionBehavior InstanceInterruptionBehavior { get { return this._instanceInterruptionBehavior; } set { this._instanceInterruptionBehavior = value; } } // Check to see if InstanceInterruptionBehavior property is set internal bool IsSetInstanceInterruptionBehavior() { return this._instanceInterruptionBehavior != null; } /// /// Gets and sets the property LaunchedAvailabilityZone. /// /// The Availability Zone in which the request is launched. /// /// public string LaunchedAvailabilityZone { get { return this._launchedAvailabilityZone; } set { this._launchedAvailabilityZone = value; } } // Check to see if LaunchedAvailabilityZone property is set internal bool IsSetLaunchedAvailabilityZone() { return this._launchedAvailabilityZone != null; } /// /// Gets and sets the property LaunchGroup. /// /// The instance launch group. Launch groups are Spot Instances that launch together and /// terminate together. /// /// public string LaunchGroup { get { return this._launchGroup; } set { this._launchGroup = value; } } // Check to see if LaunchGroup property is set internal bool IsSetLaunchGroup() { return this._launchGroup != null; } /// /// Gets and sets the property LaunchSpecification. /// /// Additional information for launching instances. /// /// public LaunchSpecification LaunchSpecification { get { return this._launchSpecification; } set { this._launchSpecification = value; } } // Check to see if LaunchSpecification property is set internal bool IsSetLaunchSpecification() { return this._launchSpecification != null; } /// /// Gets and sets the property ProductDescription. /// /// The product description associated with the Spot Instance. /// /// public RIProductDescription ProductDescription { get { return this._productDescription; } set { this._productDescription = value; } } // Check to see if ProductDescription property is set internal bool IsSetProductDescription() { return this._productDescription != null; } /// /// Gets and sets the property SpotInstanceRequestId. /// /// The ID of the Spot Instance request. /// /// public string SpotInstanceRequestId { get { return this._spotInstanceRequestId; } set { this._spotInstanceRequestId = value; } } // Check to see if SpotInstanceRequestId property is set internal bool IsSetSpotInstanceRequestId() { return this._spotInstanceRequestId != null; } /// /// Gets and sets the property SpotPrice. /// /// The maximum price per unit hour that you are willing to pay for a Spot Instance. We /// do not recommend using this parameter because it can lead to increased interruptions. /// If you do not specify this parameter, you will pay the current Spot price. /// /// /// /// If you specify a maximum price, your instances will be interrupted more frequently /// than if you do not specify this parameter. /// /// /// public string SpotPrice { get { return this._spotPrice; } set { this._spotPrice = value; } } // Check to see if SpotPrice property is set internal bool IsSetSpotPrice() { return this._spotPrice != null; } /// /// Gets and sets the property State. /// /// The state of the Spot Instance request. Spot request status information helps track /// your Spot Instance requests. For more information, see Spot /// request status in the Amazon EC2 User Guide for Linux Instances. /// /// public SpotInstanceState State { get { return this._state; } set { this._state = value; } } // Check to see if State property is set internal bool IsSetState() { return this._state != null; } /// /// Gets and sets the property Status. /// /// The status code and status message describing the Spot Instance request. /// /// public SpotInstanceStatus Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// /// Gets and sets the property Tags. /// /// Any tags assigned to the resource. /// /// public List Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// /// Gets and sets the property Type. /// /// The Spot Instance request type. /// /// public SpotInstanceType Type { get { return this._type; } set { this._type = value; } } // Check to see if Type property is set internal bool IsSetType() { return this._type != null; } /// /// Gets and sets the property ValidFrom. /// /// The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). /// The request becomes active at this date and time. /// /// public DateTime ValidFrom { get { return this._validFrom.GetValueOrDefault(); } set { this._validFrom = value; } } // Check to see if ValidFrom property is set internal bool IsSetValidFrom() { return this._validFrom.HasValue; } /// /// Gets and sets the property ValidUntil. /// /// The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). /// ///
  • /// /// For a persistent request, the request remains active until the validUntil /// date and time is reached. Otherwise, the request remains active until you cancel it. /// /// ///
  • /// /// For a one-time request, the request remains active until all instances launch, the /// request is canceled, or the validUntil date and time is reached. By default, /// the request is valid for 7 days from the date the request was created. /// ///
///
public DateTime ValidUntil { get { return this._validUntil.GetValueOrDefault(); } set { this._validUntil = value; } } // Check to see if ValidUntil property is set internal bool IsSetValidUntil() { return this._validUntil.HasValue; } } }