updateAgentSpace method

Future<UpdateAgentSpaceOutput> updateAgentSpace({
  1. required String agentSpaceId,
  2. String? description,
  3. String? locale,
  4. String? name,
})

Updates the information of an existing AgentSpace.

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

Parameter agentSpaceId : The unique identifier of the AgentSpace

Parameter description : The updated description of the AgentSpace.

Parameter locale : The updated locale for the AgentSpace, which determines the language used in agent responses.

Parameter name : The updated name of the AgentSpace.

Implementation

Future<UpdateAgentSpaceOutput> updateAgentSpace({
  required String agentSpaceId,
  String? description,
  String? locale,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (locale != null) 'locale': locale,
    if (name != null) 'name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/v1/agentspaces/${Uri.encodeComponent(agentSpaceId)}',
    hostPrefix: 'cp.',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAgentSpaceOutput.fromJson(response);
}