transferInputDevice method

Future<void> transferInputDevice({
  1. required String inputDeviceId,
  2. String? targetCustomerId,
  3. String? transferMessage,
})

Start an input device transfer to another AWS account. After you make the request, the other account must accept or reject the transfer.

May throw BadRequestException. May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw BadGatewayException. May throw NotFoundException. May throw GatewayTimeoutException. May throw TooManyRequestsException. May throw ConflictException.

Parameter inputDeviceId : The unique ID of this input device. For example, hd-123456789abcdef.

Parameter targetCustomerId : The AWS account ID (12 digits) for the recipient of the device transfer.

Parameter transferMessage : An optional message for the recipient. Maximum 280 characters.

Implementation

Future<void> transferInputDevice({
  required String inputDeviceId,
  String? targetCustomerId,
  String? transferMessage,
}) async {
  ArgumentError.checkNotNull(inputDeviceId, 'inputDeviceId');
  final $payload = <String, dynamic>{
    if (targetCustomerId != null) 'targetCustomerId': targetCustomerId,
    if (transferMessage != null) 'transferMessage': transferMessage,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/prod/inputDevices/${Uri.encodeComponent(inputDeviceId)}/transfer',
    exceptionFnMap: _exceptionFns,
  );
}