AWS SDK Version 2 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.

.NET Framework 4.5
 
Container for the parameters to the RequestSpotInstances operation. Creates a Spot instance request. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot Instance capacity and current Spot instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.EC2.AmazonEC2Request
      Amazon.EC2.Model.RequestSpotInstancesRequest

Namespace: Amazon.EC2.Model
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class RequestSpotInstancesRequest : AmazonEC2Request
         IRequestEvents

The RequestSpotInstancesRequest type exposes the following members

Constructors

NameDescription
Public Method RequestSpotInstancesRequest() Empty constructor used to set properties independently even when a simple constructor is available
Public Method RequestSpotInstancesRequest(string) Instantiates RequestSpotInstancesRequest with the parameterized properties

Properties

NameTypeDescription
Public Property AvailabilityZoneGroup System.String Gets and sets the property AvailabilityZoneGroup.

The user-specified name for a logical grouping of bids.

When you specify an Availability Zone group in a Spot Instance request, all Spot instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to bids for Spot Instances of the same instance type. Any additional Spot instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.

If there is no active instance running in the Availability Zone group that you specify for a new Spot instance request (all instances are terminated, the bid is expired, or the bid falls below current market), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.

Default: Instances are launched in any available Availability Zone.

Public Property ClientToken System.String Gets and sets the property ClientToken.

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

Public Property InstanceCount System.Int32 Gets and sets the property InstanceCount.

The maximum number of Spot instances to launch.

Default: 1

Public Property LaunchGroup System.String Gets and sets the property LaunchGroup.

The instance launch group. Launch groups are Spot instances that launch together and terminate together.

Default: Instances are launched and terminated individually

Public Property LaunchSpecification Amazon.EC2.Model.LaunchSpecification Gets and sets the property LaunchSpecification.
Public Property SpotPrice System.String Gets and sets the property SpotPrice.

The maximum hourly price (bid) for any Spot instance launched to fulfill the request.

Public Property Type Amazon.EC2.SpotInstanceType Gets and sets the property Type.

The Spot instance request type.

Default: one-time

Public Property ValidFrom System.DateTime Gets and sets the property ValidFrom.

The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

Default: The request is effective indefinitely.

Public Property ValidUntil System.DateTime Gets and sets the property ValidUntil.

The end date of the request. If this is 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.

Default: The request is effective indefinitely.

Version Information

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

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8