Class: VSphereAutomation::CIS::TaggingTagApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TaggingTagApi

Returns a new instance of TaggingTagApi.



16
17
18
# File 'lib/vsphere-automation-cis/api/tagging_tag_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_tag_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

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

Adds the usedByEntity to the TagModel#usedBy subscribers set. If the usedByEntity is already in the set, then this becomes a no-op. To invoke this operation, you need the modify TagModel#usedBy privilege on the tag.

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



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

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

#add_to_used_by_with_http_info(tag_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 TagModel#usedBy subscribers set. If the usedByEntity is already in the set, then this becomes a no-op. To invoke this operation, you need the modify TagModel#usedBy privilege on the tag.

Parameters:

  • tag_id

    The identifier of the input tag.

  • 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_tag_api.rb', line 35

def add_to_used_by_with_http_info(tag_id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.add_to_used_by ...'
  end
  # verify the required parameter 'tag_id' is set
  if @api_client.config.client_side_validation && tag_id.nil?
    fail ArgumentError, "Missing the required parameter 'tag_id' when calling TaggingTagApi.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 TaggingTagApi.add_to_used_by"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag/id:{tag_id}?~action=add-to-used-by'.sub('{' + 'tag_id' + '}', tag_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: TaggingTagApi#add_to_used_by\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

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

Parameters:

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

    the optional parameters

Returns:



81
82
83
84
# File 'lib/vsphere-automation-cis/api/tagging_tag_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<(CisTaggingTagCreateResult|VapiStdErrorsInvalidArgumentError|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.

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

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

def create_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.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 TaggingTagApi.create"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag'

  # 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::CisTaggingTagCreateResult',
	  '400' => 'CIS::VapiStdErrorsInvalidArgumentError',
	  '403' => 'CIS::VapiStdErrorsUnauthorizedError',
	  '404' => 'CIS::VapiStdErrorsNotFoundError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingTagApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

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

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



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

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

#delete_with_http_info(tag_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 tag. To invoke this operation, you need the delete privilege on the tag.

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



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

def delete_with_http_info(tag_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.delete ...'
  end
  # verify the required parameter 'tag_id' is set
  if @api_client.config.client_side_validation && tag_id.nil?
    fail ArgumentError, "Missing the required parameter 'tag_id' when calling TaggingTagApi.delete"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag/id:{tag_id}'.sub('{' + 'tag_id' + '}', tag_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: TaggingTagApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get(tag_id, opts = {}) ⇒ CisTaggingTagResult|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|

Fetches the tag information for the given tag identifier. To invoke this operation, you need the read privilege on the tag in order to view the tag info.

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



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

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

#get_with_http_info(tag_id, opts = {}) ⇒ Array<(CisTaggingTagResult|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 tag information for the given tag identifier. To invoke this operation, you need the read privilege on the tag in order to view the tag info.

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



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

def get_with_http_info(tag_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.get ...'
  end
  # verify the required parameter 'tag_id' is set
  if @api_client.config.client_side_validation && tag_id.nil?
    fail ArgumentError, "Missing the required parameter 'tag_id' when calling TaggingTagApi.get"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag/id:{tag_id}'.sub('{' + 'tag_id' + '}', tag_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::CisTaggingTagResult',
	  '403' => 'CIS::VapiStdErrorsUnauthorizedError',
	  '404' => 'CIS::VapiStdErrorsNotFoundError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingTagApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list(opts = {}) ⇒ CisTaggingTagListResult|

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

Parameters:

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

    the optional parameters

Returns:



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

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

#list_tags_for_category(category_id, opts = {}) ⇒ CisTaggingTagListTagsForCategoryResult|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|

Enumerates all tags for the given category. To invoke this operation, you need the read privilege on the given category and the individual tags in that category.

Parameters:

  • category_id

    The identifier of the input category.

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

    the optional parameters

Returns:



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

def list_tags_for_category(category_id, opts = {})
  data, _status_code, _headers = list_tags_for_category_with_http_info(category_id, opts)
  data
end

#list_tags_for_category_with_http_info(category_id, opts = {}) ⇒ Array<(CisTaggingTagListTagsForCategoryResult|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.

Enumerates all tags for the given category. To invoke this operation, you need the read privilege on the given category and the individual tags in that category.

Parameters:

  • category_id

    The identifier of the input category.

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

    the optional parameters

Returns:



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

def list_tags_for_category_with_http_info(category_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.list_tags_for_category ...'
  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 TaggingTagApi.list_tags_for_category"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag/id:{category_id}?~action=list-tags-for-category'.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,
	:return_type => {
	  '200' => 'CIS::CisTaggingTagListTagsForCategoryResult',
	  '403' => 'CIS::VapiStdErrorsUnauthorizedError',
	  '404' => 'CIS::VapiStdErrorsNotFoundError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingTagApi#list_tags_for_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_used_tags(request_body, opts = {}) ⇒ CisTaggingTagListUsedTagsResult|

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

Parameters:

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

    the optional parameters

Returns:



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

def list_used_tags(request_body, opts = {})
  data, _status_code, _headers = list_used_tags_with_http_info(request_body, opts)
  data
end

#list_used_tags_with_http_info(request_body, opts = {}) ⇒ Array<(CisTaggingTagListUsedTagsResult|, 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 tags for which the usedByEntity is part of the TagModel#usedBy subscribers set. To invoke this operation, you need the read privilege on the individual tags.

Parameters:

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

    the optional parameters

Returns:



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

def list_used_tags_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.list_used_tags ...'
  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 TaggingTagApi.list_used_tags"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag?~action=list-used-tags'

  # 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::CisTaggingTagListUsedTagsResult',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingTagApi#list_used_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_with_http_info(opts = {}) ⇒ Array<(CisTaggingTagListResult|, 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 tags in the system. To invoke this operation, you need read privilege on the individual tags. The list will only contain tags for which you have read privileges.

Parameters:

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

    the optional parameters

Returns:



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

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

  # 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::CisTaggingTagListResult',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaggingTagApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

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

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



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

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

#remove_from_used_by_with_http_info(tag_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 TagModel#usedBy subscribers set. If the usedByEntity is not using this tag, then this becomes a no-op. To invoke this operation, you need modify TagModel#usedBy privilege on the tag.

Parameters:

  • tag_id

    The identifier of the input tag.

  • request_body
  • 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
449
450
451
452
453
454
# File 'lib/vsphere-automation-cis/api/tagging_tag_api.rb', line 413

def remove_from_used_by_with_http_info(tag_id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.remove_from_used_by ...'
  end
  # verify the required parameter 'tag_id' is set
  if @api_client.config.client_side_validation && tag_id.nil?
    fail ArgumentError, "Missing the required parameter 'tag_id' when calling TaggingTagApi.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 TaggingTagApi.remove_from_used_by"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag/id:{tag_id}?~action=remove-from-used-by'.sub('{' + 'tag_id' + '}', tag_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: TaggingTagApi#remove_from_used_by\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

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

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



459
460
461
462
# File 'lib/vsphere-automation-cis/api/tagging_tag_api.rb', line 459

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

#revoke_propagating_permissions_with_http_info(tag_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 tag. You should then attach a direct permission with tagging privileges on the given tag. To invoke this operation, you need tag related privileges (direct or propagating) on the concerned tag.

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



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

def revoke_propagating_permissions_with_http_info(tag_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.revoke_propagating_permissions ...'
  end
  # verify the required parameter 'tag_id' is set
  if @api_client.config.client_side_validation && tag_id.nil?
    fail ArgumentError, "Missing the required parameter 'tag_id' when calling TaggingTagApi.revoke_propagating_permissions"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag/id:{tag_id}?~action=revoke-propagating-permissions'.sub('{' + 'tag_id' + '}', tag_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: TaggingTagApi#revoke_propagating_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

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

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



510
511
512
513
# File 'lib/vsphere-automation-cis/api/tagging_tag_api.rb', line 510

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

#update_with_http_info(tag_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 tag. To invoke this operation, you need the edit privilege on the tag.

Parameters:

  • tag_id

    The identifier of the input tag.

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

    the optional parameters

Returns:



521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/vsphere-automation-cis/api/tagging_tag_api.rb', line 521

def update_with_http_info(tag_id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TaggingTagApi.update ...'
  end
  # verify the required parameter 'tag_id' is set
  if @api_client.config.client_side_validation && tag_id.nil?
    fail ArgumentError, "Missing the required parameter 'tag_id' when calling TaggingTagApi.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 TaggingTagApi.update"
  end
  # resource path
  local_var_path = '/com/vmware/cis/tagging/tag/id:{tag_id}'.sub('{' + 'tag_id' + '}', tag_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: TaggingTagApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end