associateContactWithAddressBook method

Future<void> associateContactWithAddressBook({
  1. required String addressBookArn,
  2. required String contactArn,
})

Associates a contact with a given address book.

May throw LimitExceededException.

Parameter addressBookArn : The ARN of the address book with which to associate the contact.

Parameter contactArn : The ARN of the contact to associate with an address book.

Implementation

Future<void> associateContactWithAddressBook({
  required String addressBookArn,
  required String contactArn,
}) async {
  ArgumentError.checkNotNull(addressBookArn, 'addressBookArn');
  ArgumentError.checkNotNull(contactArn, 'contactArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.AssociateContactWithAddressBook'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AddressBookArn': addressBookArn,
      'ContactArn': contactArn,
    },
  );
}