associateDeviceWithRoom method
Associates a device with a given room. This applies all the settings from the room profile to the device, and all the skills in any skill groups added to that room. This operation requires the device to be online, or else a manual sync is required.
May throw LimitExceededException. May throw ConcurrentModificationException. May throw DeviceNotRegisteredException.
Parameter deviceArn
:
The ARN of the device to associate to a room. Required.
Parameter roomArn
:
The ARN of the room with which to associate the device. Required.
Implementation
Future<void> associateDeviceWithRoom({
String? deviceArn,
String? roomArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AlexaForBusiness.AssociateDeviceWithRoom'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (deviceArn != null) 'DeviceArn': deviceArn,
if (roomArn != null) 'RoomArn': roomArn,
},
);
}