After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances.
You must specify whether the Spot Fleet should also terminate its Spot Instances. If you
terminate the instances, the Spot Fleet request enters the
cancelled_terminating state. Otherwise, the Spot Fleet request enters
the cancelled_running state and the instances continue to run until they
are interrupted or you terminate them manually.
example
Use a bare-bones client and the command you need to make an API call.
Cancels the specified Spot Fleet requests.
After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances. You must specify whether the Spot Fleet should also terminate its Spot Instances. If you terminate the instances, the Spot Fleet request enters the
cancelled_terminating
state. Otherwise, the Spot Fleet request enters thecancelled_running
state and the instances continue to run until they are interrupted or you terminate them manually.Use a bare-bones client and the command you need to make an API call.
import { EC2Client, CancelSpotFleetRequestsCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, CancelSpotFleetRequestsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new CancelSpotFleetRequestsCommand(input); const response = await client.send(command);
CancelSpotFleetRequestsCommandInput for command's
input
shape.CancelSpotFleetRequestsCommandOutput for command's
response
shape.config for EC2Client's
config
shape.