updateAIAgent method
Updates an AI Agent.
May throw AccessDeniedException.
May throw ConflictException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter aiAgentId :
The identifier of the Amazon Q in Connect AI Agent.
Parameter assistantId :
The identifier of the Amazon Q in Connect assistant. Can be either the ID
or the ARN. URLs cannot contain the ARN.
Parameter visibilityStatus :
The visbility status of the Amazon Q in Connect AI Agent.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. If not provided, the Amazon Web Services SDK
populates this field. For more information about idempotency, see Making
retries safe with idempotent APIs..
Parameter configuration :
The configuration of the Amazon Q in Connect AI Agent.
Parameter description :
The description of the Amazon Q in Connect AI Agent.
Implementation
Future<UpdateAIAgentResponse> updateAIAgent({
required String aiAgentId,
required String assistantId,
required VisibilityStatus visibilityStatus,
String? clientToken,
AIAgentConfiguration? configuration,
String? description,
}) async {
final $payload = <String, dynamic>{
'visibilityStatus': visibilityStatus.value,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (configuration != null) 'configuration': configuration,
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/assistants/${Uri.encodeComponent(assistantId)}/aiagents/${Uri.encodeComponent(aiAgentId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateAIAgentResponse.fromJson(response);
}