describe_scheduled_instance_availability
async
¶
describe_scheduled_instance_availability(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
filters: Optional[FilterList] = None,
first_slot_start_time_range: Optional[SlotDateTimeRangeRequest] = None,
max_results: Optional[DescribeScheduledInstanceAvailabilityMaxResults] = None,
max_slot_duration_in_hours: Optional[Integer] = None,
min_slot_duration_in_hours: Optional[Integer] = None,
next_token: Optional[String] = None,
recurrence: Optional[ScheduledInstanceRecurrenceRequest] = None,
) -> DescribeScheduledInstanceAvailabilityResult
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:
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation. -
filters(Optional[FilterList], default:None) –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/UNIXorWindows).
-
-
first_slot_start_time_range(Optional[SlotDateTimeRangeRequest], default:None) –The time period for the first schedule to start.
-
max_results(Optional[DescribeScheduledInstanceAvailabilityMaxResults], default:None) –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
NextTokenvalue. -
max_slot_duration_in_hours(Optional[Integer], default:None) –The maximum available duration, in hours. This value must be greater than
MinSlotDurationInHoursand less than 1,720. -
min_slot_duration_in_hours(Optional[Integer], default:None) –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.
-
next_token(Optional[String], default:None) –The token for the next set of results.
-
recurrence(Optional[ScheduledInstanceRecurrenceRequest], default:None) –The schedule recurrence.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
32636 32637 32638 32639 32640 32641 32642 32643 32644 32645 32646 32647 32648 32649 32650 32651 32652 32653 32654 32655 32656 32657 32658 32659 32660 32661 32662 32663 32664 32665 32666 32667 32668 32669 32670 32671 32672 32673 32674 32675 32676 32677 32678 32679 32680 32681 32682 32683 32684 32685 32686 32687 32688 32689 32690 32691 32692 32693 32694 32695 32696 32697 32698 32699 32700 32701 32702 32703 32704 32705 32706 32707 32708 32709 32710 32711 32712 32713 | |