- 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.
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 |
---|
Parameter | Type | Description |
---|---|---|
ConnectionId Required | string | undefined |
DeleteConnectionCommand Output
See DeleteConnectionCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
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. |