deleteDeviceUsageData method

Future<void> deleteDeviceUsageData({
  1. required String deviceArn,
  2. required DeviceUsageType deviceUsageType,
})

When this action is called for a specified shared device, it allows authorized users to delete the device's entire previous history of voice input data and associated response data. This action can be called once every 24 hours for a specific shared device.

May throw NotFoundException. May throw DeviceNotRegisteredException. May throw LimitExceededException.

Parameter deviceArn : The ARN of the device.

Parameter deviceUsageType : The type of usage data to delete.

Implementation

Future<void> deleteDeviceUsageData({
  required String deviceArn,
  required DeviceUsageType deviceUsageType,
}) async {
  ArgumentError.checkNotNull(deviceArn, 'deviceArn');
  ArgumentError.checkNotNull(deviceUsageType, 'deviceUsageType');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.DeleteDeviceUsageData'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DeviceArn': deviceArn,
      'DeviceUsageType': deviceUsageType.toValue(),
    },
  );
}