- 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.
DeleteAgentCommand
Deletes an agent.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { BedrockAgentClient, DeleteAgentCommand } from "@aws-sdk/client-bedrock-agent"; // ES Modules import
// const { BedrockAgentClient, DeleteAgentCommand } = require("@aws-sdk/client-bedrock-agent"); // CommonJS import
const client = new BedrockAgentClient(config);
const input = { // DeleteAgentRequest
agentId: "STRING_VALUE", // required
skipResourceInUseCheck: true || false,
};
const command = new DeleteAgentCommand(input);
const response = await client.send(command);
// { // DeleteAgentResponse
// agentId: "STRING_VALUE", // required
// agentStatus: "CREATING" || "PREPARING" || "PREPARED" || "NOT_PREPARED" || "DELETING" || "FAILED" || "VERSIONING" || "UPDATING", // required
// };
DeleteAgentCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
agentId Required | string | undefined | The unique identifier of the agent to delete. |
skipResourceInUseCheck | boolean | undefined | By default, this value is |
DeleteAgentCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
agentId Required | string | undefined | The unique identifier of the agent that was deleted. |
agentStatus Required | AgentStatus | undefined | The status of the agent. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | The request is denied because of missing access permissions. |
ConflictException | client | There was a conflict performing an operation. |
InternalServerException | server | An internal server error occurred. Retry your request. |
ResourceNotFoundException | client | The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again. |
ThrottlingException | client | The number of requests exceeds the limit. Resubmit your request later. |
ValidationException | client | Input validation failed. Check your request parameters and retry the request. |
BedrockAgentServiceException | Base exception class for all service exceptions from BedrockAgent service. |