deleteAgentVersion method
Deletes a version of an agent.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agentId :
The unique identifier of the agent that the version belongs to.
Parameter agentVersion :
The version of the agent to delete.
Parameter skipResourceInUseCheck :
By default, this value is false and deletion is stopped if
the resource is in use. If you set it to true, the resource
will be deleted even if the resource is in use.
Implementation
Future<DeleteAgentVersionResponse> deleteAgentVersion({
required String agentId,
required String agentVersion,
bool? skipResourceInUseCheck,
}) async {
final $query = <String, List<String>>{
if (skipResourceInUseCheck != null)
'skipResourceInUseCheck': [skipResourceInUseCheck.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/agents/${Uri.encodeComponent(agentId)}/agentversions/${Uri.encodeComponent(agentVersion)}/',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteAgentVersionResponse.fromJson(response);
}