activateContactChannel method

Future<void> activateContactChannel({
  1. required String activationCode,
  2. required String contactChannelId,
})

Activates a contact's contact channel. Incident Manager can't engage a contact until the contact channel has been activated.

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

Parameter activationCode : The code sent to the contact channel when it was created in the contact.

Parameter contactChannelId : The Amazon Resource Name (ARN) of the contact channel.

Implementation

Future<void> activateContactChannel({
  required String activationCode,
  required String contactChannelId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SSMContacts.ActivateContactChannel'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ActivationCode': activationCode,
      'ContactChannelId': contactChannelId,
    },
  );
}