disassociateDeviceFromRoom method

Future<void> disassociateDeviceFromRoom({
  1. String? deviceArn,
})

Disassociates a device from its current room. The device continues to be connected to the Wi-Fi network and is still registered to the account. The device settings and skills are removed from the room.

May throw ConcurrentModificationException. May throw DeviceNotRegisteredException.

Parameter deviceArn : The ARN of the device to disassociate from a room. Required.

Implementation

Future<void> disassociateDeviceFromRoom({
  String? deviceArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.DisassociateDeviceFromRoom'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (deviceArn != null) 'DeviceArn': deviceArn,
    },
  );
}