patchAutoscalingV2NamespacedHorizontalPodAutoscalerStatus method
Future<HorizontalPodAutoscaler>
patchAutoscalingV2NamespacedHorizontalPodAutoscalerStatus({
- required HorizontalPodAutoscaler body,
- required String name,
- required String namespace,
- bool? pretty,
- PatchType patchType = PatchType.mergePatch,
Partially update status of the specified HorizontalPodAutoscaler.
name
Name of the HorizontalPodAutoscaler.
namespace
Object name and auth scope, such as for teams and projects.
pretty
If true, then the output is pretty printed.
Implementation
Future<api_autoscaling_v2.HorizontalPodAutoscaler>
patchAutoscalingV2NamespacedHorizontalPodAutoscalerStatus({
required api_autoscaling_v2.HorizontalPodAutoscaler body,
required String name,
required String namespace,
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(
'/apis/autoscaling/v2/namespaces/$namespace/horizontalpodautoscalers/$name/status$query',
jsonBody,
patchType);
return api_autoscaling_v2.HorizontalPodAutoscaler.fromJson(result);
}