deletePlacement method

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

Deletes a placement. To delete a placement, it must not have any devices associated with it.

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

Parameter placementName : The name of the empty placement to delete.

Parameter projectName : The project containing the empty placement to delete.

Implementation

Future<void> deletePlacement({
  required String placementName,
  required String projectName,
}) async {
  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)}',
    exceptionFnMap: _exceptionFns,
  );
}