spot_datafeed_subscriptions
Creates, updates, deletes, gets or lists a spot_datafeed_subscriptions resource.
Overview
| Name | spot_datafeed_subscriptions |
| Type | Resource |
| Id | aws.ec2.spot_datafeed_subscriptions |
Fields
The following fields are returned by SELECT queries:
- describe_spot_datafeed_subscription
| Name | Datatype | Description |
|---|---|---|
bucket | string | The name of the Amazon S3 bucket where the Spot Instance data feed is located. |
fault | string | The fault codes for the Spot Instance request, if any. |
owner_id | string | The Amazon Web Services account ID of the account. |
prefix | string | The prefix for the data feed files. |
state | string | The state of the Spot Instance data feed subscription. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_spot_datafeed_subscription | select | region | DryRun | Describes the data feed for Spot Instances. For more information, see Spot Instance data feed in the Amazon EC2 User Guide. |
create_spot_datafeed_subscription | insert | region | DryRun, Bucket, Prefix | 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. |
delete_spot_datafeed_subscription | delete | region | DryRun | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
Bucket | string | The 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. |
DryRun | boolean | 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. |
Prefix | string | The prefix for the data feed file names. |
SELECT examples
- describe_spot_datafeed_subscription
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
- create_spot_datafeed_subscription
- Manifest
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
;
# Description fields are for documentation purposes
- name: spot_datafeed_subscriptions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the spot_datafeed_subscriptions resource.
- name: DryRun
value: {{ DryRun }}
description: 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.
description: 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.
- name: Bucket
value: "{{ Bucket }}"
description: The 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.
description: The 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.
- name: Prefix
value: "{{ Prefix }}"
description: The prefix for the data feed file names.
description: The prefix for the data feed file names.
DELETE examples
- delete_spot_datafeed_subscription
Deletes the data feed for Spot Instances.
DELETE FROM aws.ec2.spot_datafeed_subscriptions
WHERE region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;