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

CreateSpotDatafeedSubscription

Description

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

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.

Type: String

Default: None

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

Required: Yes

Prefix

A prefix for the datafeed file names.

Type: String

Default: None

Required: No

Response Elements

The following elements are returned in a CreateSpotDatafeedSubscriptionResponse element.

requestId

The ID of the request.

Type: xsd:string

spotDatafeedSubscription

The Spot Instance datafeed subscription.

Type: SpotDatafeedSubscriptionType

Examples

Example Request

This example request creates the data feed for the account.

https://ec2.amazonaws.com/?Action=CreateSpotDatafeedSubscription
&Bucket=myawsbucket
&AUTHPARAMS

Example Response

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