updateAddressBook method
Updates address book details by the address book ARN.
May throw NotFoundException. May throw NameInUseException. May throw ConcurrentModificationException.
Parameter addressBookArn
:
The ARN of the room to update.
Parameter description
:
The updated description of the room.
Parameter name
:
The updated name of the room.
Implementation
Future<void> updateAddressBook({
required String addressBookArn,
String? description,
String? name,
}) async {
ArgumentError.checkNotNull(addressBookArn, 'addressBookArn');
_s.validateStringLength(
'description',
description,
1,
200,
);
_s.validateStringLength(
'name',
name,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AlexaForBusiness.UpdateAddressBook'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AddressBookArn': addressBookArn,
if (description != null) 'Description': description,
if (name != null) 'Name': name,
},
);
}