updateContact method

Future<void> updateContact({
  1. required String contactId,
  2. String? displayName,
  3. Plan? plan,
})

Updates the contact or escalation plan specified.

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

Parameter contactId : The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.

Parameter displayName : The full name of the contact or escalation plan.

Parameter plan : A list of stages. A contact has an engagement plan with stages for specified contact channels. An escalation plan uses these stages to contact specified contacts.

Implementation

Future<void> updateContact({
  required String contactId,
  String? displayName,
  Plan? plan,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SSMContacts.UpdateContact'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ContactId': contactId,
      if (displayName != null) 'DisplayName': displayName,
      if (plan != null) 'Plan': plan,
    },
  );
}