Class: Kubernetes::AuthorizationV1beta1Api

Inherits:
Object
  • Object
show all
Defined in:
lib/kubernetes/api/authorization_v1beta1_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AuthorizationV1beta1Api



19
20
21
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_namespaced_local_subject_access_review(namespace, body, opts = {}) ⇒ V1beta1LocalSubjectAccessReview

create a LocalSubjectAccessReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If 'true', then the output is pretty printed.



32
33
34
35
36
37
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 32

def create_namespaced_local_subject_access_review(namespace, body, opts = {})
  data, _status_code, _headers = create_namespaced_local_subject_access_review_with_http_info(
    namespace, body, opts
  )
  data
end

#create_namespaced_local_subject_access_review_with_http_info(namespace, body, opts = {}) ⇒ Array<(V1beta1LocalSubjectAccessReview, Fixnum, Hash)>

create a LocalSubjectAccessReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If &#39;true&#39;, then the output is pretty printed.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 48

def create_namespaced_local_subject_access_review_with_http_info(namespace, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthorizationV1beta1Api.create_namespaced_local_subject_access_review ...'
  end
  # verify the required parameter 'namespace' is set
  if @api_client.config.client_side_validation && namespace.nil?
    raise ArgumentError,
          "Missing the required parameter 'namespace' when calling AuthorizationV1beta1Api.create_namespaced_local_subject_access_review"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    raise ArgumentError,
          "Missing the required parameter 'body' when calling AuthorizationV1beta1Api.create_namespaced_local_subject_access_review"
  end

  # resource path
  local_var_path = '/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews'.sub(
    '{namespace}', namespace.to_s
  )

  # query parameters
  query_params = {}
  query_params[:dryRun] = opts[:dry_run] unless opts[:dry_run].nil?
  unless opts[:include_uninitialized].nil?
    query_params[:includeUninitialized] =
      opts[:include_uninitialized]
  end
  query_params[:pretty] = opts[:pretty] unless opts[:pretty].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] =
    @api_client.select_header_accept(['application/json', 'application/yaml',
                                      'application/vnd.kubernetes.protobuf'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['*/*'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['BearerToken']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: 'V1beta1LocalSubjectAccessReview')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthorizationV1beta1Api#create_namespaced_local_subject_access_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#create_self_subject_access_review(body, opts = {}) ⇒ V1beta1SelfSubjectAccessReview

create a SelfSubjectAccessReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If &#39;true&#39;, then the output is pretty printed.



113
114
115
116
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 113

def create_self_subject_access_review(body, opts = {})
  data, _status_code, _headers = create_self_subject_access_review_with_http_info(body, opts)
  data
end

#create_self_subject_access_review_with_http_info(body, opts = {}) ⇒ Array<(V1beta1SelfSubjectAccessReview, Fixnum, Hash)>

create a SelfSubjectAccessReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If &#39;true&#39;, then the output is pretty printed.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 126

def create_self_subject_access_review_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthorizationV1beta1Api.create_self_subject_access_review ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    raise ArgumentError,
          "Missing the required parameter 'body' when calling AuthorizationV1beta1Api.create_self_subject_access_review"
  end

  # resource path
  local_var_path = '/apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews'

  # query parameters
  query_params = {}
  query_params[:dryRun] = opts[:dry_run] unless opts[:dry_run].nil?
  unless opts[:include_uninitialized].nil?
    query_params[:includeUninitialized] =
      opts[:include_uninitialized]
  end
  query_params[:pretty] = opts[:pretty] unless opts[:pretty].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] =
    @api_client.select_header_accept(['application/json', 'application/yaml',
                                      'application/vnd.kubernetes.protobuf'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['*/*'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['BearerToken']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: 'V1beta1SelfSubjectAccessReview')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthorizationV1beta1Api#create_self_subject_access_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#create_self_subject_rules_review(body, opts = {}) ⇒ V1beta1SelfSubjectRulesReview

create a SelfSubjectRulesReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If &#39;true&#39;, then the output is pretty printed.



184
185
186
187
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 184

def create_self_subject_rules_review(body, opts = {})
  data, _status_code, _headers = create_self_subject_rules_review_with_http_info(body, opts)
  data
end

#create_self_subject_rules_review_with_http_info(body, opts = {}) ⇒ Array<(V1beta1SelfSubjectRulesReview, Fixnum, Hash)>

create a SelfSubjectRulesReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If &#39;true&#39;, then the output is pretty printed.



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 197

def create_self_subject_rules_review_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthorizationV1beta1Api.create_self_subject_rules_review ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    raise ArgumentError,
          "Missing the required parameter 'body' when calling AuthorizationV1beta1Api.create_self_subject_rules_review"
  end

  # resource path
  local_var_path = '/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews'

  # query parameters
  query_params = {}
  query_params[:dryRun] = opts[:dry_run] unless opts[:dry_run].nil?
  unless opts[:include_uninitialized].nil?
    query_params[:includeUninitialized] =
      opts[:include_uninitialized]
  end
  query_params[:pretty] = opts[:pretty] unless opts[:pretty].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] =
    @api_client.select_header_accept(['application/json', 'application/yaml',
                                      'application/vnd.kubernetes.protobuf'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['*/*'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['BearerToken']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: 'V1beta1SelfSubjectRulesReview')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthorizationV1beta1Api#create_self_subject_rules_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#create_subject_access_review(body, opts = {}) ⇒ V1beta1SubjectAccessReview

create a SubjectAccessReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If &#39;true&#39;, then the output is pretty printed.



255
256
257
258
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 255

def create_subject_access_review(body, opts = {})
  data, _status_code, _headers = create_subject_access_review_with_http_info(body, opts)
  data
end

#create_subject_access_review_with_http_info(body, opts = {}) ⇒ Array<(V1beta1SubjectAccessReview, Fixnum, Hash)>

create a SubjectAccessReview

Options Hash (opts):

  • :dry_run (String)

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

  • :include_uninitialized (BOOLEAN)

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

  • :pretty (String)

    If &#39;true&#39;, then the output is pretty printed.



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 268

def create_subject_access_review_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthorizationV1beta1Api.create_subject_access_review ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    raise ArgumentError,
          "Missing the required parameter 'body' when calling AuthorizationV1beta1Api.create_subject_access_review"
  end

  # resource path
  local_var_path = '/apis/authorization.k8s.io/v1beta1/subjectaccessreviews'

  # query parameters
  query_params = {}
  query_params[:dryRun] = opts[:dry_run] unless opts[:dry_run].nil?
  unless opts[:include_uninitialized].nil?
    query_params[:includeUninitialized] =
      opts[:include_uninitialized]
  end
  query_params[:pretty] = opts[:pretty] unless opts[:pretty].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] =
    @api_client.select_header_accept(['application/json', 'application/yaml',
                                      'application/vnd.kubernetes.protobuf'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['*/*'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['BearerToken']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: 'V1beta1SubjectAccessReview')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthorizationV1beta1Api#create_subject_access_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end

#get_api_resources(opts = {}) ⇒ V1APIResourceList

get available resources



322
323
324
325
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 322

def get_api_resources(opts = {})
  data, _status_code, _headers = get_api_resources_with_http_info(opts)
  data
end

#get_api_resources_with_http_info(_opts = {}) ⇒ Array<(V1APIResourceList, Fixnum, Hash)>

get available resources



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# File 'lib/kubernetes/api/authorization_v1beta1_api.rb', line 331

def get_api_resources_with_http_info(_opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthorizationV1beta1Api.get_api_resources ...'
  end
  # resource path
  local_var_path = '/apis/authorization.k8s.io/v1beta1/'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] =
    @api_client.select_header_accept(['application/json', 'application/yaml',
                                      'application/vnd.kubernetes.protobuf'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] =
    @api_client.select_header_content_type(['application/json', 'application/yaml',
                                            'application/vnd.kubernetes.protobuf'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BearerToken']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: 'V1APIResourceList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthorizationV1beta1Api#get_api_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end