deletePrompt method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter promptIdentifier :
The unique identifier of the prompt.
Parameter promptVersion :
The version of the prompt to delete. To delete the prompt, omit this
field.
Implementation
Future<DeletePromptResponse> deletePrompt({
required String promptIdentifier,
String? promptVersion,
}) async {
final $query = <String, List<String>>{
if (promptVersion != null) 'promptVersion': [promptVersion],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/prompts/${Uri.encodeComponent(promptIdentifier)}/',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeletePromptResponse.fromJson(response);
}