disassociateDeviceFromPlacement method

Future<void> disassociateDeviceFromPlacement({
  1. required String deviceTemplateName,
  2. required String placementName,
  3. required String projectName,
})

Removes a physical device from a placement.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw TooManyRequestsException.

Parameter deviceTemplateName : The device ID that should be removed from the placement.

Parameter placementName : The name of the placement that the device should be removed from.

Parameter projectName : The name of the project that contains the placement.

Implementation

Future<void> disassociateDeviceFromPlacement({
  required String deviceTemplateName,
  required String placementName,
  required String projectName,
}) async {
  ArgumentError.checkNotNull(deviceTemplateName, 'deviceTemplateName');
  _s.validateStringLength(
    'deviceTemplateName',
    deviceTemplateName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(placementName, 'placementName');
  _s.validateStringLength(
    'placementName',
    placementName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(projectName, 'projectName');
  _s.validateStringLength(
    'projectName',
    projectName,
    1,
    128,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/projects/${Uri.encodeComponent(projectName)}/placements/${Uri.encodeComponent(placementName)}/devices/${Uri.encodeComponent(deviceTemplateName)}',
    exceptionFnMap: _exceptionFns,
  );
}