/*
* 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
{
///
/// The options for Spot Instances.
///
public partial class LaunchTemplateSpotMarketOptions
{
private int? _blockDurationMinutes;
private InstanceInterruptionBehavior _instanceInterruptionBehavior;
private string _maxPrice;
private SpotInstanceType _spotInstanceType;
private DateTime? _validUntil;
///
/// Gets and sets the property BlockDurationMinutes.
///
/// The required duration for the Spot Instances (also known as Spot blocks), in minutes.
/// This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
///
///
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 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 MaxPrice.
///
/// The maximum hourly price you're willing to pay for the Spot Instances. 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 Spot Instances will be interrupted more frequently
/// than if you do not specify this parameter.
///
///
///
public string MaxPrice
{
get { return this._maxPrice; }
set { this._maxPrice = value; }
}
// Check to see if MaxPrice property is set
internal bool IsSetMaxPrice()
{
return this._maxPrice != null;
}
///
/// Gets and sets the property SpotInstanceType.
///
/// The Spot Instance request type.
///
///
public SpotInstanceType SpotInstanceType
{
get { return this._spotInstanceType; }
set { this._spotInstanceType = value; }
}
// Check to see if SpotInstanceType property is set
internal bool IsSetSpotInstanceType()
{
return this._spotInstanceType != null;
}
///
/// Gets and sets the property ValidUntil.
///
/// The end date of the request. For a one-time request, the request remains active until
/// all instances launch, the request is canceled, or this date is reached. If the request
/// is persistent, it remains active until it is canceled or this date and time is reached.
///
///
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;
}
}
}