Describes the Spot price history. For more information, see Spot Instance pricing history in the
Amazon EC2 User Guide for Linux Instances.
When you specify a start and end time, the operation returns the prices of the
instance types within that time range. It also returns the last price change before the
start time, which is the effective price as of the start time.
example
Use a bare-bones client and the command you need to make an API call.
Describes the Spot price history. For more information, see Spot Instance pricing history in the Amazon EC2 User Guide for Linux Instances.
When you specify a start and end time, the operation returns the prices of the instance types within that time range. It also returns the last price change before the start time, which is the effective price as of the start time.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DescribeSpotPriceHistoryCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DescribeSpotPriceHistoryCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DescribeSpotPriceHistoryCommand(input); const response = await client.send(command);
DescribeSpotPriceHistoryCommandInput for command's
input
shape.DescribeSpotPriceHistoryCommandOutput for command's
response
shape.config for EC2Client's
config
shape.