Amazon Elastic Compute Cloud
API Reference (API Version 2014-10-01)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.

CreateSpotDatafeedSubscription

Creates a datafeed for Spot Instances, enabling you to view Spot Instance usage logs. You can create one data feed per AWS account. For more information, see Spot Instances in the Amazon Elastic Compute Cloud User Guide for Linux.

Request Parameters

For information about the common parameters that all actions use, see Common Query Parameters.

Bucket

The Amazon S3 bucket in which to store the Spot Instance datafeed.

Constraints: Must be a valid bucket associated with your AWS account.

Type: String

Required: Yes

DryRun

Type: Boolean

Required: No

Prefix

A prefix for the datafeed file names.

Type: String

Required: No

Response Elements

The following elements are returned.

requestId

The ID of the request.

Type: String

spotDatafeedSubscription

The Spot Instance datafeed subscription.

Type: SpotDatafeedSubscription

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Examples

Example

This example creates a Spot Instance datafeed for the account.

Sample Request

https://ec2.amazonaws.com/?Action=CreateSpotDatafeedSubscription
&Bucket=my-s3-bucket
&AUTHPARAMS

Sample Response

<CreateSpotDatafeedSubscriptionResponse xmlns="http://ec2.amazonaws.com/doc/2014-10-01/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
  <spotDatafeedSubscription>
    <ownerId>123456789012</ownerId>
    <bucket>my-s3-bucket</bucket>
    <prefix>spotdata_</prefix>
    <state>Active</state>
  </spotDatafeedSubscription>
</CreateSpotDatafeedSubscriptionResponse>