CmdID

CmdID / aws / aws ec2

aws ec2 describe-scheduled-instance-availability

Finds available schedules that meet the specified criteria. AWS CLI reference

1 example 8 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To describe an available schedule

The following describe-scheduled-instance-availability example describes a schedule that occurs every week on Sunday, starting on the specified date.

aws ec2 describe-scheduled-instance-availability --recurrence Frequency=Weekly,Interval=1,OccurrenceDays=[1] --first-slot-start-time-range EarliestTime=2016-01-31T00:00:00Z,LatestTime=2016-01-31T04:00:00ZIdentify
--recurrenceThe schedule recurrence.
--first-slot-start-time-rangeThe time period for the first schedule to start.
Its output
{
    "ScheduledInstanceAvailabilitySet": [
        {
            "AvailabilityZone": "us-west-2b",
            "TotalScheduledInstanceHours": 1219,
            "PurchaseToken": "eyJ2IjoiMSIsInMiOjEsImMiOi...",
            "MinTermDurationInDays": 366,
            "AvailableInstanceCount": 20,
            "Recurrence": {
                "OccurrenceDaySet": [
                    1
                ],
                "Interval": 1,
                "Frequency": "Weekly",
                "OccurrenceRelativeToEnd": false
            },
            "Platform": "Linux/UNIX",
            "FirstSlotStartTime": "2016-01-31T00:00:00Z",
            "MaxTermDurationInDays": 366,
            "SlotDurationInHours": 23,
            "NetworkPlatform": "EC2-VPC",
            "InstanceType": "c4.large",
            "HourlyPrice": "0.095"
        }
    ]
}

To narrow the results, you can add filters that specify the operating system, network, and instance type.

Command:

--filters Name=platform,Values=Linux/UNIX Name=network-platform,Values=EC2-VPC Name=instance-type,Values=c4.large

For more information, see Amazon EC2 billing and purchasing options in the Amazon EC2 User Guide.

Options

8 in the AWS CLI reference
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.
--filtersThe filters.
--first-slot-start-time-rangeThe time period for the first schedule to start.
--max-resultsThe maximum number of results to return in a single call.
--max-slot-duration-in-hoursThe maximum available duration, in hours.
--min-slot-duration-in-hoursThe minimum available duration, in hours.
--next-tokenThe token for the next set of results.
--recurrenceThe schedule recurrence.