Class: VSphereAutomation::CIS::TaggingCategoryApi

Inherits:
Object
  • Object
show all
Defined in:
lib/vsphere-automation-cis/api/tagging_category_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TaggingCategoryApi

Returns a new instance of TaggingCategoryApi.



16
17
18
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 16

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#add_to_used_by(category_id, request_body, opts = {}) ⇒ |VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil

Adds the usedByEntity to the CategoryModel#usedBy subscribers set for the specified category. If the usedByEntity is already in the set, then this becomes an idempotent no-op. To invoke this operation, you need the modify CategoryModel#usedBy privilege on the category.

Parameters:

  • category_id

    The identifier of the input category.

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



24
25
26
27
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 24

def add_to_used_by(category_id, request_body, opts = {})
  add_to_used_by_with_http_info(category_id, request_body, opts)
  nil
end

#add_to_used_by_with_http_info(category_id, request_body, opts = {}) ⇒ Array<(|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Adds the usedByEntity to the CategoryModel#usedBy subscribers set for the specified category. If the usedByEntity is already in the set, then this becomes an idempotent no-op. To invoke this operation, you need the modify CategoryModel#usedBy privilege on the category.

Parameters:

  • category_id

    The identifier of the input category.

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



35
36
37
38
39
40
41
42
43
44
45
46
47
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
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 35

def add_to_used_by_with_http_info(category_id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.add_to_used_by ...'
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.add_to_used_by"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.add_to_used_by"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}?~action=add-to-used-by'.sub('{' + 'category_id' + '}', category_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_body)
  auth_names = ['api_key']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#add_to_used_by\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create(request_body, opts = {}) ⇒ CisTaggingCategoryCreateResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|

Creates a category. To invoke this operation, you need the create category privilege.

Parameters:

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



81
82
83
84
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 81

def create(request_body, opts = {})
  data, _status_code, _headers = create_with_http_info(request_body, opts)
  data
end

#create_with_http_info(request_body, opts = {}) ⇒ Array<(CisTaggingCategoryCreateResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates a category. To invoke this operation, you need the create category privilege.

Parameters:

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 91

def create_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.create ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.create"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category'

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_body)
  auth_names = ['api_key']
  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 => {
    '200' => 'CIS::CisTaggingCategoryCreateResult',
    '400' => 'CIS::VapiStdErrorsInvalidArgumentError',
    '403' => 'CIS::VapiStdErrorsUnauthorizedError',
  })
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete(category_id, opts = {}) ⇒ |VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil

Deletes an existing category. To invoke this operation, you need the delete privilege on the category.

Parameters:

  • category_id

    The identifier of category to be deleted.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



138
139
140
141
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 138

def delete(category_id, opts = {})
  delete_with_http_info(category_id, opts)
  nil
end

#delete_with_http_info(category_id, opts = {}) ⇒ Array<(|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deletes an existing category. To invoke this operation, you need the delete privilege on the category.

Parameters:

  • category_id

    The identifier of category to be deleted.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
175
176
177
178
179
180
181
182
183
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 148

def delete_with_http_info(category_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.delete ...'
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.delete"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}'.sub('{' + 'category_id' + '}', category_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get(category_id, opts = {}) ⇒ CisTaggingCategoryResult|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|

Fetches the category information for the given category identifier. In order to view the category information, you need the read privilege on the category.

Parameters:

  • category_id

    The identifier of the input category.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



188
189
190
191
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 188

def get(category_id, opts = {})
  data, _status_code, _headers = get_with_http_info(category_id, opts)
  data
end

#get_with_http_info(category_id, opts = {}) ⇒ Array<(CisTaggingCategoryResult|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Fetches the category information for the given category identifier. In order to view the category information, you need the read privilege on the category.

Parameters:

  • category_id

    The identifier of the input category.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 198

def get_with_http_info(category_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.get ...'
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.get"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}'.sub('{' + 'category_id' + '}', category_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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 => {
    '200' => 'CIS::CisTaggingCategoryResult',
    '403' => 'CIS::VapiStdErrorsUnauthorizedError',
    '404' => 'CIS::VapiStdErrorsNotFoundError',
  })
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list(opts = {}) ⇒ CisTaggingCategoryListResult|

Enumerates the categories in the system. To invoke this operation, you need the read privilege on the individual categories. The list will only contain those categories for which you have read privileges.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



242
243
244
245
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 242

def list(opts = {})
  data, _status_code, _headers = list_with_http_info(opts)
  data
end

#list_used_categories(request_body, opts = {}) ⇒ CisTaggingCategoryListUsedCategoriesResult|

Enumerates all categories for which the usedByEntity is part of the CategoryModel#usedBy subscribers set. To invoke this operation, you need the read privilege on the individual categories.

Parameters:

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



290
291
292
293
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 290

def list_used_categories(request_body, opts = {})
  data, _status_code, _headers = list_used_categories_with_http_info(request_body, opts)
  data
end

#list_used_categories_with_http_info(request_body, opts = {}) ⇒ Array<(CisTaggingCategoryListUsedCategoriesResult|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Enumerates all categories for which the usedByEntity is part of the CategoryModel#usedBy subscribers set. To invoke this operation, you need the read privilege on the individual categories.

Parameters:

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 300

def list_used_categories_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.list_used_categories ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.list_used_categories"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category?~action=list-used-categories'

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_body)
  auth_names = ['api_key']
  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 => {
    '200' => 'CIS::CisTaggingCategoryListUsedCategoriesResult',
  })
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#list_used_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_with_http_info(opts = {}) ⇒ Array<(CisTaggingCategoryListResult|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Enumerates the categories in the system. To invoke this operation, you need the read privilege on the individual categories. The list will only contain those categories for which you have read privileges.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 251

def list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.list ...'
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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 => {
    '200' => 'CIS::CisTaggingCategoryListResult',
  })
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_from_used_by(category_id, request_body, opts = {}) ⇒ |VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil

Removes the usedByEntity from the CategoryModel#usedBy subscribers set. If the usedByEntity is not using this category, then this becomes a no-op. To invoke this operation, you need the modify CategoryModel#usedBy privilege on the category.

Parameters:

  • category_id

    The identifier of the input category.

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



346
347
348
349
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 346

def remove_from_used_by(category_id, request_body, opts = {})
  remove_from_used_by_with_http_info(category_id, request_body, opts)
  nil
end

#remove_from_used_by_with_http_info(category_id, request_body, opts = {}) ⇒ Array<(|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Removes the usedByEntity from the CategoryModel#usedBy subscribers set. If the usedByEntity is not using this category, then this becomes a no-op. To invoke this operation, you need the modify CategoryModel#usedBy privilege on the category.

Parameters:

  • category_id

    The identifier of the input category.

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 357

def remove_from_used_by_with_http_info(category_id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.remove_from_used_by ...'
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.remove_from_used_by"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.remove_from_used_by"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}?~action=remove-from-used-by'.sub('{' + 'category_id' + '}', category_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_body)
  auth_names = ['api_key']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#remove_from_used_by\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_propagating_permissions(category_id, opts = {}) ⇒ |VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil

Revokes all propagating permissions on the given category. You should then attach a direct permission with tagging privileges on the given category. To invoke this operation, you need category related privileges (direct or propagating) on the concerned category.

Parameters:

  • category_id

    The identifier of the input category.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



403
404
405
406
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 403

def revoke_propagating_permissions(category_id, opts = {})
  revoke_propagating_permissions_with_http_info(category_id, opts)
  nil
end

#revoke_propagating_permissions_with_http_info(category_id, opts = {}) ⇒ Array<(|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Revokes all propagating permissions on the given category. You should then attach a direct permission with tagging privileges on the given category. To invoke this operation, you need category related privileges (direct or propagating) on the concerned category.

Parameters:

  • category_id

    The identifier of the input category.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 413

def revoke_propagating_permissions_with_http_info(category_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.revoke_propagating_permissions ...'
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.revoke_propagating_permissions"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}?~action=revoke-propagating-permissions'.sub('{' + 'category_id' + '}', category_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#revoke_propagating_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update(category_id, request_body, opts = {}) ⇒ |VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil

Updates an existing category. To invoke this operation, you need the edit privilege on the category.

Parameters:

  • category_id

    The identifier of the category to be updated.

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



454
455
456
457
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 454

def update(category_id, request_body, opts = {})
  update_with_http_info(category_id, request_body, opts)
  nil
end

#update_with_http_info(category_id, request_body, opts = {}) ⇒ Array<(|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Updates an existing category. To invoke this operation, you need the edit privilege on the category.

Parameters:

  • category_id

    The identifier of the category to be updated.

  • request_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/vsphere-automation-cis/api/tagging_category_api.rb', line 465

def update_with_http_info(category_id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingCategoryApi.update ...'
  end
  # verify the required parameter 'category_id' is set
  if @api_client.config.client_side_validation && category_id.nil?
    fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.update"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.update"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}'.sub('{' + 'category_id' + '}', category_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_body)
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingCategoryApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end