ec2_describe_scheduled_instance_availability: Finds available schedules that meet the specified criteria

Description Usage Arguments Value Request syntax Examples

View source: R/ec2_operations.R

Description

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 purchase_scheduled_instances to purchase Scheduled Instances with that schedule.

Usage

1
2
3
ec2_describe_scheduled_instance_availability(DryRun, Filters,
  FirstSlotStartTimeRange, MaxResults, MaxSlotDurationInHours,
  MinSlotDurationInHours, NextToken, Recurrence)

Arguments

DryRun

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.

Filters

The filters.

  • availability-zone - The Availability Zone (for example, us-west-2a).

  • instance-type - The instance type (for example, c4.large).

  • network-platform - The network platform (EC2-Classic or EC2-VPC).

  • platform - The platform (Linux/UNIX or Windows).

FirstSlotStartTimeRange

[required] The time period for the first schedule to start.

MaxResults

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

The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720.

MinSlotDurationInHours

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

The token for the next set of results.

Recurrence

[required] The schedule recurrence.

Value

A list with the following syntax:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
list(
  NextToken = "string",
  ScheduledInstanceAvailabilitySet = list(
    list(
      AvailabilityZone = "string",
      AvailableInstanceCount = 123,
      FirstSlotStartTime = as.POSIXct(
        "2015-01-01"
      ),
      HourlyPrice = "string",
      InstanceType = "string",
      MaxTermDurationInDays = 123,
      MinTermDurationInDays = 123,
      NetworkPlatform = "string",
      Platform = "string",
      PurchaseToken = "string",
      Recurrence = list(
        Frequency = "string",
        Interval = 123,
        OccurrenceDaySet = list(
          123
        ),
        OccurrenceRelativeToEnd = TRUE|FALSE,
        OccurrenceUnit = "string"
      ),
      SlotDurationInHours = 123,
      TotalScheduledInstanceHours = 123
    )
  )
)

Request syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
svc$describe_scheduled_instance_availability(
  DryRun = TRUE|FALSE,
  Filters = list(
    list(
      Name = "string",
      Values = list(
        "string"
      )
    )
  ),
  FirstSlotStartTimeRange = list(
    EarliestTime = as.POSIXct(
      "2015-01-01"
    ),
    LatestTime = as.POSIXct(
      "2015-01-01"
    )
  ),
  MaxResults = 123,
  MaxSlotDurationInHours = 123,
  MinSlotDurationInHours = 123,
  NextToken = "string",
  Recurrence = list(
    Frequency = "string",
    Interval = 123,
    OccurrenceDays = list(
      123
    ),
    OccurrenceRelativeToEnd = TRUE|FALSE,
    OccurrenceUnit = "string"
  )
)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# This example describes a schedule that occurs every week on Sunday,
# starting on the specified date. Note that the output contains a single
# schedule as an example.
svc$describe_scheduled_instance_availability(
  FirstSlotStartTimeRange = list(
    EarliestTime = "2016-01-31T00:00:00Z",
    LatestTime = "2016-01-31T04:00:00Z"
  ),
  Recurrence = list(
    Frequency = "Weekly",
    Interval = 1L,
    OccurrenceDays = list(
      1L
    )
  )
)

## End(Not run)

paws.compute documentation built on March 7, 2021, 5:10 p.m.