patchCoreV1PersistentVolumeStatus method

Future<PersistentVolume> patchCoreV1PersistentVolumeStatus({
  1. required PersistentVolume body,
  2. required String name,
  3. bool? pretty,
  4. PatchType patchType = PatchType.mergePatch,
})

Partially update status of the specified PersistentVolume.

name Name of the PersistentVolume.

pretty If true, then the output is pretty printed.

Implementation

Future<api_core_v1.PersistentVolume> patchCoreV1PersistentVolumeStatus({
  required api_core_v1.PersistentVolume body,
  required String name,
  bool? pretty,
  PatchType patchType = PatchType.mergePatch,
}) async {
  final queryStrings = <String, Object>{};
  if (pretty != null) {
    queryStrings['pretty'] = pretty;
  }

  final query =
      queryStrings.isEmpty ? '' : '?${_joinQueryStrings(queryStrings)}';

  final jsonBody = jsonEncode(body.toJson());
  final result = await _patchJsonMap(
      '/api/v1/persistentvolumes/$name/status$query', jsonBody, patchType);
  return api_core_v1.PersistentVolume.fromJson(result);
}