| Did this page help you? Yes No Tell us about it... |
Creates a Spot Instance request. Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum 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 about Spot Instances, go to Using Spot Instances in the Amazon Elastic Compute Cloud User Guide.
| Name | Description | Required |
|---|---|---|
|
|
The maximum hourly price for any Spot Instance launched to fulfill the request. Type: String Default: None |
Yes |
|
|
The maximum number of Spot Instances to launch. Type: xs:integer Default: 1 |
No |
|
|
The Spot Instance request type. Type: String Valid Values: Default: one-time |
No |
|
|
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. Type: DateTime Default: Request is effective independently |
No |
|
|
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. Type: DateTime Default: Request is effective indefinitely |
No |
|
|
The ID of the Amazon VPC subnet in which to launch the Spot Instance. Type: String Default: None |
No |
|
|
The instance launch group. Launch groups are Spot Instances that launch together and terminate together. Type: String Default: Instances are launched and terminated individually |
No |
|
|
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. Type: String Default: Instances are launched in any available Availability Zone. |
No |
|
|
The name of an existing placement group you want to launch the instance into (for cluster instances). Type: String Default: None. |
No |
|
|
The AMI ID. Type: String Default: None |
Yes |
|
|
The name of the key pair. Type: String Default: None |
No |
|
|
ID of the security group. You can use either this parameter or the next to specify a security group. You can use this parameter when launching instances with or without Amazon VPC. Type: String Default: The instance uses the default security group Condition: If you want to specify one or more security
groups, you can use either |
Conditional |
|
|
Name of the security group. You cannot use this parameter when launching an instance with Amazon VPC. Type: String Default: The instance uses the default security group Condition: If you want to specify one or more security
groups, you can use either |
Conditional |
|
|
MIME, Base64-encoded user data to make available to the instances. Type: String Default: None |
No |
|
|
Deprecated. Type: String Default: None |
No |
|
|
The instance type. Type: String Valid Values: Default: m1.small |
Yes |
|
|
The placement constraints (Availability Zone) for launching the instances. Type: String Default: Amazon EC2 selects an Availability Zone. |
No |
|
|
The ID of the kernel to select. Type: String Default: None |
No |
|
|
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk and search for the kernel ID. Type: String Default: None |
No |
|
|
Describes the mapping that defines native device names to use when exposing virtual devices. Type: String Default: None |
No |
|
|
The virtual device name. Type: String Default: None |
No |
|
|
The ID of the snapshot. Type: String Default: None |
No |
|
|
The size of the volume, in GiBs. Required if you are not creating a volume from a snapshot. Type: Integer Default: None |
No |
|
|
Specifies that no device should be mapped. Type: Boolean Default: true |
No |
|
|
Whether the Amazon EBS volume is deleted on instance termination. Type: Boolean Default: true |
No |
|
|
Enables monitoring for the instance. Type: String Default: Disabled |
No |
The elements in the following table are wrapped in a
RequestSpotInstancesResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
Information about the Spot Instance request, wrapped in an
|
This example creates a Spot Instances request for ten m1.small instances.
https://ec2.amazonaws.com/?Action=RequestSpotInstances &SpotPrice=0.50 &InstanceCount=2 &Type=one-time &AvailabilityZoneGroup=MyAzGroup &LaunchSpecification.ImageId=ami-43a4412a &LaunchSpecification.KeyName=MyKeypair &LaunchSpecification.Group.1=websrv &LaunchSpecification.InstanceType=m1.small &AUTHPARAMS
<RequestSpotInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<spotInstanceRequestSet>
<item>
<spotInstanceRequestId>sir-83d64e02</spotInstanceRequestId>
<spotPrice>0.5</spotPrice>
<type>one-time</type>
<state>open</state>
<availabilityZoneGroup>MyAzGroup</availabilityZoneGroup>
<launchSpecification>
<imageId>ami-43a4412a</imageId>
<keyName>MyKeypair</keyName>
<groupSet>
<item>
<groupId>websrv</groupId>
</item>
</groupSet>
<instanceType>m1.small</instanceType>
<blockDeviceMapping/>
<monitoring>
<enabled>false</enabled>
</monitoring>
</launchSpecification>
<createTime>2010-10-20T18:23:41.000Z</createTime>
<productDescription>Linux/UNIX</productDescription>
</item>
<item>
...
</item>
</spotInstanceRequestSet>
</RequestSpotInstancesResponse>