Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PurchaseScheduledInstancesCommand

You can no longer purchase Scheduled Instances.

Purchases the Scheduled Instances with the specified schedule.

Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call RunScheduledInstances during each scheduled time period.

After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.

example

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, PurchaseScheduledInstancesCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, PurchaseScheduledInstancesCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const command = new PurchaseScheduledInstancesCommand(input);
const response = await client.send(command);
see

PurchaseScheduledInstancesCommandInput for command's input shape.

see

PurchaseScheduledInstancesCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: PurchaseScheduledInstancesCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions