Skip to main content

approveTerminationRequest

client.swarm.approveTerminationRequest(swarmId: string, requestId: string, data?: TerminationRequestActionBody): Promise<void>

Approve a termination request.

Approves a pending termination request, authorizing the removal of specified agent instances. The agents will be terminated gracefully.

Parameters

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
requestIdstringYesThe unique identifier of the termination request
dataTerminationRequestActionBodyNoOptional approval information

Returns

Promise<void> — A promise that resolves when the request is approved

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.swarm.approveTerminationRequest('swarmId', 'requestId');
console.log(result);