listPolicyV1NamespacedPodDisruptionBudget method

Future<PodDisruptionBudgetList> listPolicyV1NamespacedPodDisruptionBudget({
  1. required String namespace,
  2. bool? pretty,
})

List or watch objects of kind PodDisruptionBudget.

namespace Object name and auth scope, such as for teams and projects.

pretty If true, then the output is pretty printed.

Implementation

Future<api_policy_v1.PodDisruptionBudgetList>
    listPolicyV1NamespacedPodDisruptionBudget({
  required String namespace,
  bool? pretty,
}) async {
  final queryStrings = <String, Object>{};
  if (pretty != null) {
    queryStrings['pretty'] = pretty;
  }

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

  final result = await _getJsonMap(
      '/apis/policy/v1/namespaces/$namespace/poddisruptionbudgets$query');
  return api_policy_v1.PodDisruptionBudgetList.fromJson(result);
}