Skip to main content

spot_datafeed_subscriptions

Creates, updates, deletes, gets or lists a spot_datafeed_subscriptions resource.

Overview

Namespot_datafeed_subscriptions
TypeResource
Idaws.ec2.spot_datafeed_subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bucketstringThe name of the Amazon S3 bucket where the Spot Instance data feed is located.
faultstringThe fault codes for the Spot Instance request, if any.
owner_idstringThe Amazon Web Services account ID of the account.
prefixstringThe prefix for the data feed files.
statestringThe state of the Spot Instance data feed subscription.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_spot_datafeed_subscriptionselectregionDryRunDescribes the data feed for Spot Instances. For more information, see Spot Instance data feed in the Amazon EC2 User Guide.
create_spot_datafeed_subscriptioninsertregionDryRun, Bucket, PrefixCreates a data feed for Spot Instances, enabling you to view Spot Instance usage logs. You can create one data feed per Amazon Web Services account. For more information, see Spot Instance data feed in the Amazon EC2 User Guide.
delete_spot_datafeed_subscriptiondeleteregionDryRunDeletes the data feed for Spot Instances.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
BucketstringThe name of the Amazon S3 bucket in which to store the Spot Instance data feed. For more information about bucket names, see Bucket naming rules in the Amazon S3 User Guide.
DryRunbooleanChecks 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.
PrefixstringThe prefix for the data feed file names.

SELECT examples

Describes the data feed for Spot Instances. For more information, see Spot Instance data feed in the Amazon EC2 User Guide.

SELECT
bucket,
fault,
owner_id,
prefix,
state
FROM aws.ec2.spot_datafeed_subscriptions
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
;

INSERT examples

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

INSERT INTO aws.ec2.spot_datafeed_subscriptions (
region,
DryRun,
Bucket,
Prefix
)
SELECT
'{{ region }}',
'{{ DryRun }}',
'{{ Bucket }}',
'{{ Prefix }}'
RETURNING
bucket,
fault,
owner_id,
prefix,
state
;

DELETE examples

Deletes the data feed for Spot Instances.

DELETE FROM aws.ec2.spot_datafeed_subscriptions
WHERE region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;