- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteFleetCommand
Deletes all resources and information related to a fleet and shuts down any currently running fleet instances, including those in remote locations.
If the fleet being deleted has a VPC peering connection, you first need to get a valid authorization (good for 24 hours) by calling CreateVpcPeeringAuthorization . You don't need to explicitly delete the VPC peering connection.
To delete a fleet, specify the fleet ID to be terminated. During the deletion process, the fleet status is changed to DELETING
. When completed, the status switches to TERMINATED
and the fleet event FLEET_DELETED
is emitted.
Learn more
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GameLiftClient, DeleteFleetCommand } from "@aws-sdk/client-gamelift"; // ES Modules import
// const { GameLiftClient, DeleteFleetCommand } = require("@aws-sdk/client-gamelift"); // CommonJS import
const client = new GameLiftClient(config);
const input = { // DeleteFleetInput
FleetId: "STRING_VALUE", // required
};
const command = new DeleteFleetCommand(input);
const response = await client.send(command);
// {};
DeleteFleetCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
FleetId Required | string | undefined | A unique identifier for the fleet to be deleted. You can use either the fleet ID or ARN value. |
DeleteFleetCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceException | server | The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period. |
InvalidFleetStatusException | client | The requested operation would cause a conflict with the current state of a resource associated with the request and/or the fleet. Resolve the conflict before retrying. |
InvalidRequestException | client | One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying. |
NotFoundException | client | The requested resources was not found. The resource was either not created yet or deleted. |
TaggingFailedException | client | The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying. |
UnauthorizedException | client | The client failed authentication. Clients should not retry such requests. |
GameLiftServiceException | Base exception class for all service exceptions from GameLift service. |