updateAssociation method

Future<UpdateAssociationOutput> updateAssociation({
  1. required String agentSpaceId,
  2. required String associationId,
  3. required ServiceConfiguration configuration,
})

Partially updates the configuration of an existing service association for an AgentSpace. Present fields are fully replaced; absent fields are left unchanged. Returns 200 OK on success.

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

Parameter agentSpaceId : The unique identifier of the AgentSpace

Parameter associationId : The unique identifier of the given association.

Parameter configuration : The configuration that directs how AgentSpace interacts with the given service. The entire configuration is replaced on update.

Implementation

Future<UpdateAssociationOutput> updateAssociation({
  required String agentSpaceId,
  required String associationId,
  required ServiceConfiguration configuration,
}) async {
  final $payload = <String, dynamic>{
    'configuration': configuration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/v1/agentspaces/${Uri.encodeComponent(agentSpaceId)}/associations/${Uri.encodeComponent(associationId)}',
    hostPrefix: 'cp.',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAssociationOutput.fromJson(response);
}