Amazon Elastic Compute Cloud
API Reference (API Version 2015-04-15)
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 data feed 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 Instance Data Feed 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 data feed.

Type: String

Required: Yes

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

Prefix

A prefix for the data feed 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 data feed 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 data feed 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/2015-04-15/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
  <spotDatafeedSubscription>
    <ownerId>123456789012</ownerId>
    <bucket>my-s3-bucket</bucket>
    <prefix>spotdata_</prefix>
    <state>Active</state>
  </spotDatafeedSubscription>
</CreateSpotDatafeedSubscriptionResponse>