Skip to main content

scheduled_instance_availabilities

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

Overview

Namescheduled_instance_availabilities
TypeResource
Idaws.ec2.scheduled_instance_availabilities

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
availability_zonestringThe Availability Zone.
available_instance_countintegerThe number of available instances.
first_slot_start_timestringThe time period for the first schedule to start.
hourly_pricestringThe hourly price for a single instance.
instance_typestringThe instance type. You can specify one of the C3, C4, M4, or R3 instance types.
max_term_duration_in_daysintegerThe maximum term. The only possible value is 365 days.
min_term_duration_in_daysintegerThe minimum term. The only possible value is 365 days.
network_platformstringThe network platform.
platformstringThe platform (Linux/UNIX or Windows).
purchase_tokenstringThe purchase token. This token expires in two hours.
recurrencestringThe schedule recurrence.
slot_duration_in_hoursintegerThe number of hours in the schedule.
total_scheduled_instance_hoursintegerThe total number of hours for a single instance for the entire term.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_scheduled_instance_availabilityselectFirstSlotStartTimeRange, regionDryRun, Filter, MaxResults, MaxSlotDurationInHours, MinSlotDurationInHours, NextToken, RecurrenceFinds available schedules that meet the specified criteria. You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours. After you find a schedule that meets your needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that schedule.

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
FirstSlotStartTimeRangeobjectThe time period for the first schedule to start.
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.
FilterarrayThe filters. availability-zone - The Availability Zone (for example, us-west-2a). instance-type - The instance type (for example, c4.large). platform - The platform (Linux/UNIX or Windows).
MaxResultsintegerThe maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned NextToken value.
MaxSlotDurationInHoursintegerThe maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720.
MinSlotDurationInHoursintegerThe minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.
NextTokenstringThe token for the next set of results.
RecurrenceobjectThe schedule recurrence.

SELECT examples

Finds available schedules that meet the specified criteria. You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours. After you find a schedule that meets your needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that schedule.

SELECT
availability_zone,
available_instance_count,
first_slot_start_time,
hourly_price,
instance_type,
max_term_duration_in_days,
min_term_duration_in_days,
network_platform,
platform,
purchase_token,
recurrence,
slot_duration_in_hours,
total_scheduled_instance_hours
FROM aws.ec2.scheduled_instance_availabilities
WHERE FirstSlotStartTimeRange = '{{ FirstSlotStartTimeRange }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND MaxSlotDurationInHours = '{{ MaxSlotDurationInHours }}'
AND MinSlotDurationInHours = '{{ MinSlotDurationInHours }}'
AND NextToken = '{{ NextToken }}'
AND Recurrence = '{{ Recurrence }}'
;