deleteAgentRuntime method
Deletes an Amazon Bedrock AgentCore Runtime, or a single version of an AgentCore Runtime when you provide the version qualifier.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter agentRuntimeId :
The unique identifier of the AgentCore Runtime to delete.
Parameter agentRuntimeVersion :
The version of the AgentCore Runtime to delete. When you provide this
value, only that version is deleted. When you omit it, the entire
AgentCore Runtime and all of its versions are deleted.
Parameter clientToken :
A unique, case-sensitive identifier to ensure that the operation completes
no more than one time. If this token matches a previous request, the
service ignores the request but does not return an error.
Implementation
Future<DeleteAgentRuntimeResponse> deleteAgentRuntime({
required String agentRuntimeId,
String? agentRuntimeVersion,
String? clientToken,
}) async {
final $query = <String, List<String>>{
if (agentRuntimeVersion != null) 'version': [agentRuntimeVersion],
if (clientToken != null) 'clientToken': [clientToken],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/runtimes/${Uri.encodeComponent(agentRuntimeId)}/',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteAgentRuntimeResponse.fromJson(response);
}