deleteAgent method
Deletes 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 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<DeleteAgentResponse> deleteAgent({
required String agentId,
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)}/',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteAgentResponse.fromJson(response);
}