DeleteConnectionCommand

Delete the connection with the provided id.

Example Syntax

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

import { ApiGatewayManagementApiClient, DeleteConnectionCommand } from "@aws-sdk/client-apigatewaymanagementapi"; // ES Modules import
// const { ApiGatewayManagementApiClient, DeleteConnectionCommand } = require("@aws-sdk/client-apigatewaymanagementapi"); // CommonJS import
const client = new ApiGatewayManagementApiClient(config);
const input = { // DeleteConnectionRequest
  ConnectionId: "STRING_VALUE", // required
};
const command = new DeleteConnectionCommand(input);
const response = await client.send(command);
// {};

DeleteConnectionCommand Input

See DeleteConnectionCommandInput for more details

Parameter
Type
Description
ConnectionId
Required
string | undefined

DeleteConnectionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
ForbiddenException
client

The caller is not authorized to invoke this operation.

GoneException
client

The connection with the provided id no longer exists.

LimitExceededException
client

The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.

ApiGatewayManagementApiServiceException
Base exception class for all service exceptions from ApiGatewayManagementApi service.