Skip to main content

spot_fleet_request_histories

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

Overview

Namespot_fleet_request_histories
TypeResource
Idaws.ec2.spot_fleet_request_histories

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
event_informationstringInformation about the event.
event_typestringThe event type. error - An error with the Spot Fleet request. fleetRequestChange - A change in the status or configuration of the Spot Fleet request. instanceChange - An instance was launched or terminated. Information - An informational event.
timestampstringThe date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_spot_fleet_request_historyselectSpotFleetRequestId, StartTime, regionDryRun, EventType, NextToken, MaxResultsDescribes the events for the specified Spot Fleet request during the specified time. Spot Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. Spot Fleet events are available for 48 hours. For more information, see Monitor fleet events using Amazon EventBridge in the Amazon EC2 User Guide.

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
SpotFleetRequestIdstringThe ID of the Spot Fleet request.
StartTimestring (date-time)The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
regionstringAWS region (default: us-east-1)
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.
EventTypestringThe type of events to describe. By default, all events are described.
MaxResultsintegerThe maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
NextTokenstringThe token to include in another request to get the next page of items. This value is null when there are no more items to return.

SELECT examples

Describes the events for the specified Spot Fleet request during the specified time. Spot Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. Spot Fleet events are available for 48 hours. For more information, see Monitor fleet events using Amazon EventBridge in the Amazon EC2 User Guide.

SELECT
event_information,
event_type,
timestamp
FROM aws.ec2.spot_fleet_request_histories
WHERE SpotFleetRequestId = '{{ SpotFleetRequestId }}' -- required
AND StartTime = '{{ StartTime }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND EventType = '{{ EventType }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;