updateAgentAlias method

Future<UpdateAgentAliasResponse> updateAgentAlias({
  1. required String agentAliasId,
  2. required String agentAliasName,
  3. required String agentId,
  4. AliasInvocationState? aliasInvocationState,
  5. String? description,
  6. List<AgentAliasRoutingConfigurationListItem>? routingConfiguration,
})

Updates configurations for an alias of an agent.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter agentAliasId : The unique identifier of the alias.

Parameter agentAliasName : Specifies a new name for the alias.

Parameter agentId : The unique identifier of the agent.

Parameter aliasInvocationState : The invocation state for the agent alias. To pause the agent alias, set the value to REJECT_INVOCATIONS. To start the agent alias running again, set the value to ACCEPT_INVOCATIONS. Use the GetAgentAlias, or ListAgentAliases, operation to get the invocation state of an agent alias.

Parameter description : Specifies a new description for the alias.

Parameter routingConfiguration : Contains details about the routing configuration of the alias.

Implementation

Future<UpdateAgentAliasResponse> updateAgentAlias({
  required String agentAliasId,
  required String agentAliasName,
  required String agentId,
  AliasInvocationState? aliasInvocationState,
  String? description,
  List<AgentAliasRoutingConfigurationListItem>? routingConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'agentAliasName': agentAliasName,
    if (aliasInvocationState != null)
      'aliasInvocationState': aliasInvocationState.value,
    if (description != null) 'description': description,
    if (routingConfiguration != null)
      'routingConfiguration': routingConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/agents/${Uri.encodeComponent(agentId)}/agentaliases/${Uri.encodeComponent(agentAliasId)}/',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAgentAliasResponse.fromJson(response);
}