scheduled_instance_availabilities
Creates, updates, deletes, gets or lists a scheduled_instance_availabilities resource.
Overview
| Name | scheduled_instance_availabilities |
| Type | Resource |
| Id | aws.ec2.scheduled_instance_availabilities |
Fields
The following fields are returned by SELECT queries:
- describe_scheduled_instance_availability
| Name | Datatype | Description |
|---|---|---|
availability_zone | string | The Availability Zone. |
available_instance_count | integer | The number of available instances. |
first_slot_start_time | string | The time period for the first schedule to start. |
hourly_price | string | The hourly price for a single instance. |
instance_type | string | The instance type. You can specify one of the C3, C4, M4, or R3 instance types. |
max_term_duration_in_days | integer | The maximum term. The only possible value is 365 days. |
min_term_duration_in_days | integer | The minimum term. The only possible value is 365 days. |
network_platform | string | The network platform. |
platform | string | The platform (Linux/UNIX or Windows). |
purchase_token | string | The purchase token. This token expires in two hours. |
recurrence | string | The schedule recurrence. |
slot_duration_in_hours | integer | The number of hours in the schedule. |
total_scheduled_instance_hours | integer | The total number of hours for a single instance for the entire term. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_scheduled_instance_availability | select | FirstSlotStartTimeRange, region | DryRun, Filter, MaxResults, MaxSlotDurationInHours, MinSlotDurationInHours, NextToken, Recurrence | 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. |
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 |
|---|---|---|
FirstSlotStartTimeRange | object | The time period for the first schedule to start. |
region | string | AWS region (default: us-east-1) |
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. |
Filter | array | The 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). |
MaxResults | integer | The 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. |
MaxSlotDurationInHours | integer | The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720. |
MinSlotDurationInHours | integer | The 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. |
NextToken | string | The token for the next set of results. |
Recurrence | object | The schedule recurrence. |
SELECT examples
- describe_scheduled_instance_availability
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 }}'
;