- 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.
DeletePromptCommand
Deletes a prompt or a version of it, depending on whether you include the promptVersion
field or not. For more information, see Delete prompts from the Prompt management tool and Delete a version of a prompt from the Prompt management tool in the Amazon Bedrock User Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { BedrockAgentClient, DeletePromptCommand } from "@aws-sdk/client-bedrock-agent"; // ES Modules import
// const { BedrockAgentClient, DeletePromptCommand } = require("@aws-sdk/client-bedrock-agent"); // CommonJS import
const client = new BedrockAgentClient(config);
const input = { // DeletePromptRequest
promptIdentifier: "STRING_VALUE", // required
promptVersion: "STRING_VALUE",
};
const command = new DeletePromptCommand(input);
const response = await client.send(command);
// { // DeletePromptResponse
// id: "STRING_VALUE", // required
// version: "STRING_VALUE",
// };
DeletePromptCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
promptIdentifier Required | string | undefined | The unique identifier of the prompt. |
promptVersion | string | undefined | The version of the prompt to delete. To delete the prompt, omit this field. |
DeletePromptCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
id Required | string | undefined | The unique identifier of the prompt that was deleted. |
version | string | undefined | The version of the prompt that was deleted. |
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. |