readRbacAuthorizationV1ClusterRole method

Future<ClusterRole> readRbacAuthorizationV1ClusterRole({
  1. required String name,
  2. bool? pretty,
})

Read the specified ClusterRole.

name Name of the ClusterRole.

pretty If true, then the output is pretty printed.

Implementation

Future<api_rbac_v1.ClusterRole> readRbacAuthorizationV1ClusterRole({
  required String name,
  bool? pretty,
}) async {
  final queryStrings = <String, Object>{};
  if (pretty != null) {
    queryStrings['pretty'] = pretty;
  }

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

  final result = await _getJsonMap(
      '/apis/rbac.authorization.k8s.io/v1/clusterroles/$name$query');
  return api_rbac_v1.ClusterRole.fromJson(result);
}