updateContact method

Future<UpdateContactResponse> updateContact({
  1. required String contactId,
  2. String? clientToken,
  3. String? satelliteArn,
  4. TrackingOverrides? trackingOverrides,
})

Updates a specific contact.

May throw DependencyException. May throw InvalidParameterException. May throw ResourceLimitExceededException. May throw ResourceNotFoundException.

Parameter contactId : UUID of a contact.

Parameter clientToken : A client token is a unique, case-sensitive string of up to 64 ASCII characters. It is generated by the client to ensure idempotent operations, allowing safe retries without unintended side effects.

Parameter satelliteArn : ARN of a satellite.

Implementation

Future<UpdateContactResponse> updateContact({
  required String contactId,
  String? clientToken,
  String? satelliteArn,
  TrackingOverrides? trackingOverrides,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (satelliteArn != null) 'satelliteArn': satelliteArn,
    if (trackingOverrides != null) 'trackingOverrides': trackingOverrides,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/contact/${Uri.encodeComponent(contactId)}/versions',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateContactResponse.fromJson(response);
}