Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CancelCapacityReservationCommand

Cancels the specified Capacity Reservation, releases the reserved capacity, and changes the Capacity Reservation's state to cancelled.

Instances running in the reserved capacity continue running until you stop them. Stopped instances that target the Capacity Reservation can no longer launch. Modify these instances to either target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation that has matching attributes and sufficient capacity.

example

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

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

CancelCapacityReservationCommandInput for command's input shape.

see

CancelCapacityReservationCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: CancelCapacityReservationCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions