updateAgentStatus method
Updates agent status.
May throw DuplicateResourceException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter agentStatusId :
The identifier of the agent status.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter description :
The description of the agent status.
Parameter displayOrder :
The display order of the agent status.
Parameter name :
The name of the agent status.
Parameter resetOrderNumber :
A number indicating the reset order of the agent status.
Parameter state :
The state of the agent status.
Implementation
Future<void> updateAgentStatus({
required String agentStatusId,
required String instanceId,
String? description,
int? displayOrder,
String? name,
bool? resetOrderNumber,
AgentStatusState? state,
}) async {
_s.validateNumRange(
'displayOrder',
displayOrder,
1,
50,
);
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (displayOrder != null) 'DisplayOrder': displayOrder,
if (name != null) 'Name': name,
if (resetOrderNumber != null) 'ResetOrderNumber': resetOrderNumber,
if (state != null) 'State': state.value,
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/agent-status/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(agentStatusId)}',
exceptionFnMap: _exceptionFns,
);
}