vsphere-automation-cis 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +11 -1
- data/Gemfile.lock +39 -36
- data/README.md +14 -7
- data/Rakefile +8 -0
- data/docs/CisTaggingTagAssociationBatchResult.md +1 -1
- data/docs/CisTaskInfo.md +1 -1
- data/docs/CisTasksGetSpec.md +2 -2
- data/docs/CisTasksListResultValue.md +1 -1
- data/docs/FilterSpecTargets.md +1 -1
- data/docs/SessionApi.md +26 -6
- data/docs/TaggingCategoryApi.md +104 -39
- data/docs/TaggingTagApi.md +118 -44
- data/docs/TaggingTagAssociationApi.md +145 -64
- data/docs/TasksApi.md +40 -17
- data/lib/vsphere-automation-cis/api/session_api.rb +10 -12
- data/lib/vsphere-automation-cis/api/tagging_category_api.rb +79 -70
- data/lib/vsphere-automation-cis/api/tagging_tag_api.rb +96 -76
- data/lib/vsphere-automation-cis/api/tagging_tag_association_api.rb +140 -120
- data/lib/vsphere-automation-cis/api/tasks_api.rb +33 -24
- data/lib/vsphere-automation-cis/api_client.rb +9 -5
- data/lib/vsphere-automation-cis/api_error.rb +4 -6
- data/lib/vsphere-automation-cis/configuration.rb +18 -6
- data/lib/vsphere-automation-cis/models/cis_session_create_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_session_info.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_session_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_add_to_used_by.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create_spec.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_used_categories.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_used_categories_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_model.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_model_cardinality.rb +6 -8
- data/lib/vsphere-automation-cis/models/cis_tagging_category_remove_from_used_by.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_update.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_category_update_spec.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_add_to_used_by.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_multiple_tags_to_object.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_multiple_tags_to_object_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_tag_to_multiple_objects.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_batch_result.rb +5 -7
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_multiple_tags_from_object.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_multiple_tags_from_object_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_tag_from_multiple_objects.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attachable_tags.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attachable_tags_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_on_tags.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_on_tags_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_on_objects.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_on_objects_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_object_to_tags.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_tag_to_objects.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create_spec.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_tags_for_category_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_used_tags.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_used_tags_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_model.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_remove_from_used_by.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_update.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_update_spec.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_task_info.rb +5 -7
- data/lib/vsphere-automation-cis/models/cis_task_progress.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_task_status.rb +9 -11
- data/lib/vsphere-automation-cis/models/cis_tasks_filter_spec.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tasks_get_spec.rb +6 -8
- data/lib/vsphere-automation-cis/models/cis_tasks_list_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/cis_tasks_list_result_value.rb +17 -19
- data/lib/vsphere-automation-cis/models/cis_tasks_result.rb +4 -6
- data/lib/vsphere-automation-cis/models/filter_spec_targets.rb +23 -25
- data/lib/vsphere-automation-cis/models/vapi_std_dynamic_id.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_already_exists.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_already_exists_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_error_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_invalid_argument.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_invalid_argument_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_allowed_in_current_state.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_allowed_in_current_state_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_found.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_found_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_resource_inaccessible.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_resource_inaccessible_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_service_unavailable.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_service_unavailable_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthenticated.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthenticated_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthorized.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthorized_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unsupported.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unsupported_error.rb +4 -6
- data/lib/vsphere-automation-cis/models/vapi_std_localizable_message.rb +4 -6
- data/lib/vsphere-automation-cis/version.rb +5 -7
- data/lib/vsphere-automation-cis.rb +7 -9
- data/pkg/vsphere-automation-cis-0.2.0.gem +0 -0
- data/spec/api/session_api_spec.rb +4 -6
- data/spec/api/tagging_category_api_spec.rb +10 -11
- data/spec/api/tagging_tag_api_spec.rb +11 -11
- data/spec/api/tagging_tag_association_api_spec.rb +16 -16
- data/spec/api/tasks_api_spec.rb +9 -10
- data/spec/api_client_spec.rb +4 -6
- data/spec/configuration_spec.rb +4 -6
- data/spec/models/cis_session_create_result_spec.rb +4 -6
- data/spec/models/cis_session_info_spec.rb +4 -6
- data/spec/models/cis_session_result_spec.rb +4 -6
- data/spec/models/cis_tagging_category_add_to_used_by_spec.rb +4 -6
- data/spec/models/cis_tagging_category_create_result_spec.rb +4 -6
- data/spec/models/cis_tagging_category_create_spec.rb +4 -6
- data/spec/models/cis_tagging_category_create_spec_spec.rb +4 -6
- data/spec/models/cis_tagging_category_list_result_spec.rb +4 -6
- data/spec/models/cis_tagging_category_list_used_categories_result_spec.rb +4 -6
- data/spec/models/cis_tagging_category_list_used_categories_spec.rb +4 -6
- data/spec/models/cis_tagging_category_model_cardinality_spec.rb +4 -6
- data/spec/models/cis_tagging_category_model_spec.rb +4 -6
- data/spec/models/cis_tagging_category_remove_from_used_by_spec.rb +4 -6
- data/spec/models/cis_tagging_category_result_spec.rb +4 -6
- data/spec/models/cis_tagging_category_update_spec.rb +4 -6
- data/spec/models/cis_tagging_category_update_spec_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_add_to_used_by_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_attach_multiple_tags_to_object_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_attach_multiple_tags_to_object_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_attach_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_batch_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_detach_multiple_tags_from_object_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_detach_multiple_tags_from_object_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_detach_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attachable_tags_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attachable_tags_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attached_objects_on_tags_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attached_objects_on_tags_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attached_objects_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attached_tags_on_objects_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attached_tags_on_objects_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attached_tags_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_list_attached_tags_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_object_to_tags_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_association_tag_to_objects_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_create_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_create_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_create_spec_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_list_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_list_tags_for_category_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_list_used_tags_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_list_used_tags_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_model_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_remove_from_used_by_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_result_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_update_spec.rb +4 -6
- data/spec/models/cis_tagging_tag_update_spec_spec.rb +4 -6
- data/spec/models/cis_task_info_spec.rb +4 -6
- data/spec/models/cis_task_progress_spec.rb +4 -6
- data/spec/models/cis_task_status_spec.rb +4 -6
- data/spec/models/cis_tasks_filter_spec_spec.rb +4 -6
- data/spec/models/cis_tasks_get_spec_spec.rb +4 -6
- data/spec/models/cis_tasks_list_result_spec.rb +4 -6
- data/spec/models/cis_tasks_list_result_value_spec.rb +6 -8
- data/spec/models/cis_tasks_result_spec.rb +4 -6
- data/spec/models/filter_spec_targets_spec.rb +6 -8
- data/spec/models/vapi_std_dynamic_id_spec.rb +4 -6
- data/spec/models/vapi_std_errors_already_exists_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_already_exists_spec.rb +4 -6
- data/spec/models/vapi_std_errors_error_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_invalid_argument_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_invalid_argument_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_found_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_not_found_spec.rb +4 -6
- data/spec/models/vapi_std_errors_resource_inaccessible_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_resource_inaccessible_spec.rb +4 -6
- data/spec/models/vapi_std_errors_service_unavailable_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_service_unavailable_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unauthenticated_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unauthenticated_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unauthorized_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unauthorized_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unsupported_error_spec.rb +4 -6
- data/spec/models/vapi_std_errors_unsupported_spec.rb +4 -6
- data/spec/models/vapi_std_localizable_message_spec.rb +4 -6
- data/spec/spec_helper.rb +4 -6
- data/vsphere-automation-cis.gemspec +11 -14
- metadata +18 -32
data/docs/TasksApi.md
CHANGED
@@ -4,13 +4,13 @@ All URIs are relative to *https://<vcenter>/rest*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**cancel**](TasksApi.md#cancel) | **POST** /cis/tasks/{task}
|
7
|
+
[**cancel**](TasksApi.md#cancel) | **POST** /cis/tasks/{task} | Cancel a running operation associated with the task. This is the best effort attempt. Operation may not be cancelled anymore once it reaches certain stage.
|
8
8
|
[**get**](TasksApi.md#get) | **GET** /cis/tasks/{task} | Returns information about a task.
|
9
9
|
[**list**](TasksApi.md#list) | **GET** /cis/tasks | Returns information about at most 1000 visible (subject to permission checks) tasks matching the Tasks.FilterSpec. All tasks must be in the same provider.
|
10
10
|
|
11
11
|
|
12
12
|
# **cancel**
|
13
|
-
> cancel(task)
|
13
|
+
> cancel(task, action)
|
14
14
|
|
15
15
|
Cancel a running operation associated with the task. This is the best effort attempt. Operation may not be cancelled anymore once it reaches certain stage.
|
16
16
|
|
@@ -18,13 +18,21 @@ Cancel a running operation associated with the task. This is the best effort att
|
|
18
18
|
```ruby
|
19
19
|
# load the gem
|
20
20
|
require 'vsphere-automation-cis'
|
21
|
+
# setup authorization
|
22
|
+
VSphereAutomation::Configuration.new.tap do |config|
|
23
|
+
# Configure API key authorization: api_key
|
24
|
+
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
|
27
|
+
end
|
21
28
|
|
22
29
|
api_instance = VSphereAutomation::CIS::TasksApi.new
|
23
30
|
task = 'task_example' # String | Task identifier. The parameter must be an identifier for the resource type: cis.task.
|
31
|
+
action = 'action_example' # String | action=cancel
|
24
32
|
|
25
33
|
begin
|
26
34
|
#Cancel a running operation associated with the task. This is the best effort attempt. Operation may not be cancelled anymore once it reaches certain stage.
|
27
|
-
api_instance.cancel(task)
|
35
|
+
api_instance.cancel(task, action)
|
28
36
|
rescue VSphereAutomation::ApiError => e
|
29
37
|
puts "Exception when calling TasksApi->cancel: #{e}"
|
30
38
|
end
|
@@ -35,6 +43,7 @@ end
|
|
35
43
|
Name | Type | Description | Notes
|
36
44
|
------------- | ------------- | ------------- | -------------
|
37
45
|
**task** | **String**| Task identifier. The parameter must be an identifier for the resource type: cis.task. |
|
46
|
+
**action** | **String**| action=cancel |
|
38
47
|
|
39
48
|
### Return type
|
40
49
|
|
@@ -42,12 +51,12 @@ nil (empty response body)
|
|
42
51
|
|
43
52
|
### Authorization
|
44
53
|
|
45
|
-
|
54
|
+
[api_key](../README.md#api_key)
|
46
55
|
|
47
56
|
### HTTP request headers
|
48
57
|
|
49
58
|
- **Content-Type**: Not defined
|
50
|
-
- **Accept**:
|
59
|
+
- **Accept**: application/json
|
51
60
|
|
52
61
|
|
53
62
|
|
@@ -60,12 +69,19 @@ Returns information about a task.
|
|
60
69
|
```ruby
|
61
70
|
# load the gem
|
62
71
|
require 'vsphere-automation-cis'
|
72
|
+
# setup authorization
|
73
|
+
VSphereAutomation::Configuration.new.tap do |config|
|
74
|
+
# Configure API key authorization: api_key
|
75
|
+
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
|
76
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
77
|
+
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
|
78
|
+
end
|
63
79
|
|
64
80
|
api_instance = VSphereAutomation::CIS::TasksApi.new
|
65
81
|
task = 'task_example' # String | Task identifier. The parameter must be an identifier for the resource type: cis.task.
|
66
82
|
opts = {
|
67
|
-
spec_return_all: true, #
|
68
|
-
spec_exclude_result: true #
|
83
|
+
spec_return_all: true, # Boolean | If true, all data, including operation-specific data, will be returned, otherwise only the data described in Info will be returned. If unset, only the data described in Info will be returned.
|
84
|
+
spec_exclude_result: true # Boolean | If true, the result will not be included in the task information, otherwise it will be included. If unset, the result of the operation will be included in the task information.
|
69
85
|
}
|
70
86
|
|
71
87
|
begin
|
@@ -82,8 +98,8 @@ end
|
|
82
98
|
Name | Type | Description | Notes
|
83
99
|
------------- | ------------- | ------------- | -------------
|
84
100
|
**task** | **String**| Task identifier. The parameter must be an identifier for the resource type: cis.task. |
|
85
|
-
**spec_return_all** | **
|
86
|
-
**spec_exclude_result** | **
|
101
|
+
**spec_return_all** | **Boolean**| If true, all data, including operation-specific data, will be returned, otherwise only the data described in Info will be returned. If unset, only the data described in Info will be returned. | [optional]
|
102
|
+
**spec_exclude_result** | **Boolean**| If true, the result will not be included in the task information, otherwise it will be included. If unset, the result of the operation will be included in the task information. | [optional]
|
87
103
|
|
88
104
|
### Return type
|
89
105
|
|
@@ -91,12 +107,12 @@ Name | Type | Description | Notes
|
|
91
107
|
|
92
108
|
### Authorization
|
93
109
|
|
94
|
-
|
110
|
+
[api_key](../README.md#api_key)
|
95
111
|
|
96
112
|
### HTTP request headers
|
97
113
|
|
98
114
|
- **Content-Type**: Not defined
|
99
|
-
- **Accept**:
|
115
|
+
- **Accept**: application/json
|
100
116
|
|
101
117
|
|
102
118
|
|
@@ -109,12 +125,19 @@ Returns information about at most 1000 visible (subject to permission checks) ta
|
|
109
125
|
```ruby
|
110
126
|
# load the gem
|
111
127
|
require 'vsphere-automation-cis'
|
128
|
+
# setup authorization
|
129
|
+
VSphereAutomation::Configuration.new.tap do |config|
|
130
|
+
# Configure API key authorization: api_key
|
131
|
+
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
|
132
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
133
|
+
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
|
134
|
+
end
|
112
135
|
|
113
136
|
api_instance = VSphereAutomation::CIS::TasksApi.new
|
114
137
|
opts = {
|
115
138
|
filter_spec_tasks: ['filter_spec_tasks_example'], # Array<String> | Identifiers of tasks that can match the filter. This field may be unset if Tasks.FilterSpec.services is specified. Currently all tasks must be from the same provider. If unset or empty, tasks with any identifier will match the filter. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: cis.task. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: cis.task.
|
116
|
-
result_spec_return_all: true, #
|
117
|
-
result_spec_exclude_result: true, #
|
139
|
+
result_spec_return_all: true, # Boolean | If true, all data, including operation-specific data, will be returned, otherwise only the data described in Info will be returned. If unset, only the data described in Info will be returned.
|
140
|
+
result_spec_exclude_result: true, # Boolean | If true, the result will not be included in the task information, otherwise it will be included. If unset, the result of the operation will be included in the task information.
|
118
141
|
filter_spec_services: ['filter_spec_services_example'], # Array<String> | Identifiers of services. Tasks created by operations in these services match the filter (see CommonInfo.service). This field may be unset if Tasks.FilterSpec.tasks is specified. Currently all services must be from the same provider. If this field is unset or empty, tasks for all services will match the filter. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: vapi.service. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: vapi.service.
|
119
142
|
filter_spec_status: ['filter_spec_status_example'], # Array<String> | Status that a task must have to match the filter (see CommonInfo.status). If unset or empty, tasks with any status match the filter.
|
120
143
|
filter_spec_targets: nil, # Array<Object> | Identifiers of the targets the operation for the associated task created or was performed on (see CommonInfo.target). If unset or empty, tasks associated with operations on any target match the filter.
|
@@ -135,8 +158,8 @@ end
|
|
135
158
|
Name | Type | Description | Notes
|
136
159
|
------------- | ------------- | ------------- | -------------
|
137
160
|
**filter_spec_tasks** | [**Array<String>**](String.md)| Identifiers of tasks that can match the filter. This field may be unset if Tasks.FilterSpec.services is specified. Currently all tasks must be from the same provider. If unset or empty, tasks with any identifier will match the filter. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: cis.task. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: cis.task. | [optional]
|
138
|
-
**result_spec_return_all** | **
|
139
|
-
**result_spec_exclude_result** | **
|
161
|
+
**result_spec_return_all** | **Boolean**| If true, all data, including operation-specific data, will be returned, otherwise only the data described in Info will be returned. If unset, only the data described in Info will be returned. | [optional]
|
162
|
+
**result_spec_exclude_result** | **Boolean**| If true, the result will not be included in the task information, otherwise it will be included. If unset, the result of the operation will be included in the task information. | [optional]
|
140
163
|
**filter_spec_services** | [**Array<String>**](String.md)| Identifiers of services. Tasks created by operations in these services match the filter (see CommonInfo.service). This field may be unset if Tasks.FilterSpec.tasks is specified. Currently all services must be from the same provider. If this field is unset or empty, tasks for all services will match the filter. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: vapi.service. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: vapi.service. | [optional]
|
141
164
|
**filter_spec_status** | [**Array<String>**](String.md)| Status that a task must have to match the filter (see CommonInfo.status). If unset or empty, tasks with any status match the filter. | [optional]
|
142
165
|
**filter_spec_targets** | [**Array<Object>**](Object.md)| Identifiers of the targets the operation for the associated task created or was performed on (see CommonInfo.target). If unset or empty, tasks associated with operations on any target match the filter. | [optional]
|
@@ -148,12 +171,12 @@ Name | Type | Description | Notes
|
|
148
171
|
|
149
172
|
### Authorization
|
150
173
|
|
151
|
-
|
174
|
+
[api_key](../README.md#api_key)
|
152
175
|
|
153
176
|
### HTTP request headers
|
154
177
|
|
155
178
|
- **Content-Type**: Not defined
|
156
|
-
- **Accept**:
|
179
|
+
- **Accept**: application/json
|
157
180
|
|
158
181
|
|
159
182
|
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
# cis
|
1
|
+
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
|
2
|
+
# SPDX-License-Identifier: MIT
|
5
3
|
|
6
|
-
#
|
4
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
7
5
|
|
6
|
+
# cis - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
8
7
|
|
9
|
-
=end
|
10
8
|
|
11
9
|
require 'uri'
|
12
10
|
|
@@ -49,7 +47,7 @@ module VSphereAutomation
|
|
49
47
|
# header parameters
|
50
48
|
header_params = {}
|
51
49
|
# HTTP header 'Accept' (if needed)
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
51
|
header_params[:'vmware-use-header-authn'] = vmware_use_header_authn
|
54
52
|
|
55
53
|
# form parameters
|
@@ -57,7 +55,7 @@ module VSphereAutomation
|
|
57
55
|
|
58
56
|
# http body (model)
|
59
57
|
post_body = nil
|
60
|
-
auth_names = []
|
58
|
+
auth_names = ['basic_auth']
|
61
59
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
62
60
|
:header_params => header_params,
|
63
61
|
:query_params => query_params,
|
@@ -99,14 +97,14 @@ module VSphereAutomation
|
|
99
97
|
# header parameters
|
100
98
|
header_params = {}
|
101
99
|
# HTTP header 'Accept' (if needed)
|
102
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
100
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
103
101
|
|
104
102
|
# form parameters
|
105
103
|
form_params = {}
|
106
104
|
|
107
105
|
# http body (model)
|
108
106
|
post_body = nil
|
109
|
-
auth_names = []
|
107
|
+
auth_names = ['api_key']
|
110
108
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
111
109
|
:header_params => header_params,
|
112
110
|
:query_params => query_params,
|
@@ -143,14 +141,14 @@ module VSphereAutomation
|
|
143
141
|
# header parameters
|
144
142
|
header_params = {}
|
145
143
|
# HTTP header 'Accept' (if needed)
|
146
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
144
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
147
145
|
|
148
146
|
# form parameters
|
149
147
|
form_params = {}
|
150
148
|
|
151
149
|
# http body (model)
|
152
150
|
post_body = nil
|
153
|
-
auth_names = []
|
151
|
+
auth_names = ['api_key']
|
154
152
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
155
153
|
:header_params => header_params,
|
156
154
|
:query_params => query_params,
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
# cis
|
1
|
+
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
|
2
|
+
# SPDX-License-Identifier: MIT
|
5
3
|
|
6
|
-
#
|
4
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
7
5
|
|
6
|
+
# cis - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
8
7
|
|
9
|
-
=end
|
10
8
|
|
11
9
|
require 'uri'
|
12
10
|
|
@@ -20,21 +18,21 @@ module VSphereAutomation
|
|
20
18
|
end
|
21
19
|
# Adds the {@param.name usedByEntity} to the {@link CategoryModel#usedBy} subscribers {@term set} for the specified category. If the {@param.name usedByEntity} is already in the {@term set}, then this becomes an idempotent no-op. To invoke this {@term operation}, you need the modify {@link CategoryModel#usedBy} privilege on the category.
|
22
20
|
# @param category_id The identifier of the input category.
|
23
|
-
# @param
|
21
|
+
# @param request_body
|
24
22
|
# @param [Hash] opts the optional parameters
|
25
23
|
# @return [|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil]
|
26
|
-
def add_to_used_by(category_id,
|
27
|
-
add_to_used_by_with_http_info(category_id,
|
24
|
+
def add_to_used_by(category_id, request_body, opts = {})
|
25
|
+
add_to_used_by_with_http_info(category_id, request_body, opts)
|
28
26
|
nil
|
29
27
|
end
|
30
28
|
|
31
29
|
# Adds the {@param.name usedByEntity} to the {@link CategoryModel#usedBy} subscribers {@term set} for the specified category. If the {@param.name usedByEntity} is already in the {@term set}, then this becomes an idempotent no-op. To invoke this {@term operation}, you need the modify {@link CategoryModel#usedBy} privilege on the category.
|
32
30
|
# @api private
|
33
31
|
# @param category_id The identifier of the input category.
|
34
|
-
# @param
|
32
|
+
# @param request_body
|
35
33
|
# @param [Hash] opts the optional parameters
|
36
34
|
# @return [Array<(|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
37
|
-
def add_to_used_by_with_http_info(category_id,
|
35
|
+
def add_to_used_by_with_http_info(category_id, request_body, opts = {})
|
38
36
|
if @api_client.config.debugging
|
39
37
|
@api_client.config.logger.debug 'Calling API: TaggingCategoryApi.add_to_used_by ...'
|
40
38
|
end
|
@@ -42,9 +40,9 @@ module VSphereAutomation
|
|
42
40
|
if @api_client.config.client_side_validation && category_id.nil?
|
43
41
|
fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.add_to_used_by"
|
44
42
|
end
|
45
|
-
# verify the required parameter '
|
46
|
-
if @api_client.config.client_side_validation &&
|
47
|
-
fail ArgumentError, "Missing the required parameter '
|
43
|
+
# verify the required parameter 'request_body' is set
|
44
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.add_to_used_by"
|
48
46
|
end
|
49
47
|
# resource path
|
50
48
|
local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}?~action=add-to-used-by'.sub('{' + 'category_id' + '}', category_id.to_s)
|
@@ -55,7 +53,7 @@ module VSphereAutomation
|
|
55
53
|
# header parameters
|
56
54
|
header_params = {}
|
57
55
|
# HTTP header 'Accept' (if needed)
|
58
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
57
|
# HTTP header 'Content-Type'
|
60
58
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
61
59
|
|
@@ -63,8 +61,8 @@ module VSphereAutomation
|
|
63
61
|
form_params = {}
|
64
62
|
|
65
63
|
# http body (model)
|
66
|
-
post_body = @api_client.object_to_http_body(
|
67
|
-
auth_names = []
|
64
|
+
post_body = @api_client.object_to_http_body(request_body)
|
65
|
+
auth_names = ['api_key']
|
68
66
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
69
67
|
:header_params => header_params,
|
70
68
|
:query_params => query_params,
|
@@ -77,26 +75,26 @@ module VSphereAutomation
|
|
77
75
|
return data, status_code, headers
|
78
76
|
end
|
79
77
|
# Creates a category. To invoke this {@term operation}, you need the create category privilege.
|
80
|
-
# @param
|
78
|
+
# @param request_body
|
81
79
|
# @param [Hash] opts the optional parameters
|
82
80
|
# @return [CisTaggingCategoryCreateResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|]
|
83
|
-
def create(
|
84
|
-
data, _status_code, _headers = create_with_http_info(
|
81
|
+
def create(request_body, opts = {})
|
82
|
+
data, _status_code, _headers = create_with_http_info(request_body, opts)
|
85
83
|
data
|
86
84
|
end
|
87
85
|
|
88
86
|
# Creates a category. To invoke this {@term operation}, you need the create category privilege.
|
89
87
|
# @api private
|
90
|
-
# @param
|
88
|
+
# @param request_body
|
91
89
|
# @param [Hash] opts the optional parameters
|
92
90
|
# @return [Array<(CisTaggingCategoryCreateResult|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>] data, response status code and response headers
|
93
|
-
def create_with_http_info(
|
91
|
+
def create_with_http_info(request_body, opts = {})
|
94
92
|
if @api_client.config.debugging
|
95
93
|
@api_client.config.logger.debug 'Calling API: TaggingCategoryApi.create ...'
|
96
94
|
end
|
97
|
-
# verify the required parameter '
|
98
|
-
if @api_client.config.client_side_validation &&
|
99
|
-
fail ArgumentError, "Missing the required parameter '
|
95
|
+
# verify the required parameter 'request_body' is set
|
96
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
97
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.create"
|
100
98
|
end
|
101
99
|
# resource path
|
102
100
|
local_var_path = '/com/vmware/cis/tagging/category'
|
@@ -107,7 +105,7 @@ module VSphereAutomation
|
|
107
105
|
# header parameters
|
108
106
|
header_params = {}
|
109
107
|
# HTTP header 'Accept' (if needed)
|
110
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
108
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
111
109
|
# HTTP header 'Content-Type'
|
112
110
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
113
111
|
|
@@ -115,8 +113,8 @@ module VSphereAutomation
|
|
115
113
|
form_params = {}
|
116
114
|
|
117
115
|
# http body (model)
|
118
|
-
post_body = @api_client.object_to_http_body(
|
119
|
-
auth_names = []
|
116
|
+
post_body = @api_client.object_to_http_body(request_body)
|
117
|
+
auth_names = ['api_key']
|
120
118
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
121
119
|
:header_params => header_params,
|
122
120
|
:query_params => query_params,
|
@@ -164,14 +162,14 @@ module VSphereAutomation
|
|
164
162
|
# header parameters
|
165
163
|
header_params = {}
|
166
164
|
# HTTP header 'Accept' (if needed)
|
167
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
168
166
|
|
169
167
|
# form parameters
|
170
168
|
form_params = {}
|
171
169
|
|
172
170
|
# http body (model)
|
173
171
|
post_body = nil
|
174
|
-
auth_names = []
|
172
|
+
auth_names = ['api_key']
|
175
173
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
176
174
|
:header_params => header_params,
|
177
175
|
:query_params => query_params,
|
@@ -214,14 +212,14 @@ module VSphereAutomation
|
|
214
212
|
# header parameters
|
215
213
|
header_params = {}
|
216
214
|
# HTTP header 'Accept' (if needed)
|
217
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
215
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
218
216
|
|
219
217
|
# form parameters
|
220
218
|
form_params = {}
|
221
219
|
|
222
220
|
# http body (model)
|
223
221
|
post_body = nil
|
224
|
-
auth_names = []
|
222
|
+
auth_names = ['api_key']
|
225
223
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
226
224
|
:header_params => header_params,
|
227
225
|
:query_params => query_params,
|
@@ -263,14 +261,14 @@ module VSphereAutomation
|
|
263
261
|
# header parameters
|
264
262
|
header_params = {}
|
265
263
|
# HTTP header 'Accept' (if needed)
|
266
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
264
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
267
265
|
|
268
266
|
# form parameters
|
269
267
|
form_params = {}
|
270
268
|
|
271
269
|
# http body (model)
|
272
270
|
post_body = nil
|
273
|
-
auth_names = []
|
271
|
+
auth_names = ['api_key']
|
274
272
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
275
273
|
:header_params => header_params,
|
276
274
|
:query_params => query_params,
|
@@ -286,26 +284,26 @@ module VSphereAutomation
|
|
286
284
|
return data, status_code, headers
|
287
285
|
end
|
288
286
|
# Enumerates all categories for which the {@param.name usedByEntity} is part of the {@link CategoryModel#usedBy} subscribers {@term set}. To invoke this {@term operation}, you need the read privilege on the individual categories.
|
289
|
-
# @param
|
287
|
+
# @param request_body
|
290
288
|
# @param [Hash] opts the optional parameters
|
291
289
|
# @return [CisTaggingCategoryListUsedCategoriesResult|]
|
292
|
-
def list_used_categories(
|
293
|
-
data, _status_code, _headers = list_used_categories_with_http_info(
|
290
|
+
def list_used_categories(request_body, opts = {})
|
291
|
+
data, _status_code, _headers = list_used_categories_with_http_info(request_body, opts)
|
294
292
|
data
|
295
293
|
end
|
296
294
|
|
297
295
|
# Enumerates all categories for which the {@param.name usedByEntity} is part of the {@link CategoryModel#usedBy} subscribers {@term set}. To invoke this {@term operation}, you need the read privilege on the individual categories.
|
298
296
|
# @api private
|
299
|
-
# @param
|
297
|
+
# @param request_body
|
300
298
|
# @param [Hash] opts the optional parameters
|
301
299
|
# @return [Array<(CisTaggingCategoryListUsedCategoriesResult|, Fixnum, Hash)>] data, response status code and response headers
|
302
|
-
def list_used_categories_with_http_info(
|
300
|
+
def list_used_categories_with_http_info(request_body, opts = {})
|
303
301
|
if @api_client.config.debugging
|
304
302
|
@api_client.config.logger.debug 'Calling API: TaggingCategoryApi.list_used_categories ...'
|
305
303
|
end
|
306
|
-
# verify the required parameter '
|
307
|
-
if @api_client.config.client_side_validation &&
|
308
|
-
fail ArgumentError, "Missing the required parameter '
|
304
|
+
# verify the required parameter 'request_body' is set
|
305
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
306
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.list_used_categories"
|
309
307
|
end
|
310
308
|
# resource path
|
311
309
|
local_var_path = '/com/vmware/cis/tagging/category?~action=list-used-categories'
|
@@ -316,7 +314,7 @@ module VSphereAutomation
|
|
316
314
|
# header parameters
|
317
315
|
header_params = {}
|
318
316
|
# HTTP header 'Accept' (if needed)
|
319
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
320
318
|
# HTTP header 'Content-Type'
|
321
319
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
322
320
|
|
@@ -324,8 +322,8 @@ module VSphereAutomation
|
|
324
322
|
form_params = {}
|
325
323
|
|
326
324
|
# http body (model)
|
327
|
-
post_body = @api_client.object_to_http_body(
|
328
|
-
auth_names = []
|
325
|
+
post_body = @api_client.object_to_http_body(request_body)
|
326
|
+
auth_names = ['api_key']
|
329
327
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
330
328
|
:header_params => header_params,
|
331
329
|
:query_params => query_params,
|
@@ -342,21 +340,23 @@ module VSphereAutomation
|
|
342
340
|
end
|
343
341
|
# Removes the {@param.name usedByEntity} from the {@link CategoryModel#usedBy} subscribers {@term set}. If the {@param.name usedByEntity} is not using this category, then this becomes a no-op. To invoke this {@term operation}, you need the modify {@link CategoryModel#usedBy} privilege on the category.
|
344
342
|
# @param category_id The identifier of the input category.
|
345
|
-
# @param
|
343
|
+
# @param action ~action=remove-from-used-by
|
344
|
+
# @param request_body
|
346
345
|
# @param [Hash] opts the optional parameters
|
347
346
|
# @return [|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil]
|
348
|
-
def remove_from_used_by(category_id,
|
349
|
-
remove_from_used_by_with_http_info(category_id,
|
347
|
+
def remove_from_used_by(category_id, action, request_body, opts = {})
|
348
|
+
remove_from_used_by_with_http_info(category_id, action, request_body, opts)
|
350
349
|
nil
|
351
350
|
end
|
352
351
|
|
353
352
|
# Removes the {@param.name usedByEntity} from the {@link CategoryModel#usedBy} subscribers {@term set}. If the {@param.name usedByEntity} is not using this category, then this becomes a no-op. To invoke this {@term operation}, you need the modify {@link CategoryModel#usedBy} privilege on the category.
|
354
353
|
# @api private
|
355
354
|
# @param category_id The identifier of the input category.
|
356
|
-
# @param
|
355
|
+
# @param action ~action=remove-from-used-by
|
356
|
+
# @param request_body
|
357
357
|
# @param [Hash] opts the optional parameters
|
358
358
|
# @return [Array<(|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
359
|
-
def remove_from_used_by_with_http_info(category_id,
|
359
|
+
def remove_from_used_by_with_http_info(category_id, action, request_body, opts = {})
|
360
360
|
if @api_client.config.debugging
|
361
361
|
@api_client.config.logger.debug 'Calling API: TaggingCategoryApi.remove_from_used_by ...'
|
362
362
|
end
|
@@ -364,20 +364,29 @@ module VSphereAutomation
|
|
364
364
|
if @api_client.config.client_side_validation && category_id.nil?
|
365
365
|
fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.remove_from_used_by"
|
366
366
|
end
|
367
|
-
# verify the required parameter '
|
368
|
-
if @api_client.config.client_side_validation &&
|
369
|
-
fail ArgumentError, "Missing the required parameter '
|
367
|
+
# verify the required parameter 'action' is set
|
368
|
+
if @api_client.config.client_side_validation && action.nil?
|
369
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling TaggingCategoryApi.remove_from_used_by"
|
370
|
+
end
|
371
|
+
# verify enum value
|
372
|
+
if @api_client.config.client_side_validation && !['remove-from-used-by'].include?(action)
|
373
|
+
fail ArgumentError, "invalid value for 'action', must be one of remove-from-used-by"
|
374
|
+
end
|
375
|
+
# verify the required parameter 'request_body' is set
|
376
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
377
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.remove_from_used_by"
|
370
378
|
end
|
371
379
|
# resource path
|
372
|
-
local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}
|
380
|
+
local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}'.sub('{' + 'category_id' + '}', category_id.to_s)
|
373
381
|
|
374
382
|
# query parameters
|
375
383
|
query_params = {}
|
384
|
+
query_params[:'~action'] = action
|
376
385
|
|
377
386
|
# header parameters
|
378
387
|
header_params = {}
|
379
388
|
# HTTP header 'Accept' (if needed)
|
380
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
389
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
381
390
|
# HTTP header 'Content-Type'
|
382
391
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
383
392
|
|
@@ -385,8 +394,8 @@ module VSphereAutomation
|
|
385
394
|
form_params = {}
|
386
395
|
|
387
396
|
# http body (model)
|
388
|
-
post_body = @api_client.object_to_http_body(
|
389
|
-
auth_names = []
|
397
|
+
post_body = @api_client.object_to_http_body(request_body)
|
398
|
+
auth_names = ['api_key']
|
390
399
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
391
400
|
:header_params => header_params,
|
392
401
|
:query_params => query_params,
|
@@ -429,14 +438,14 @@ module VSphereAutomation
|
|
429
438
|
# header parameters
|
430
439
|
header_params = {}
|
431
440
|
# HTTP header 'Accept' (if needed)
|
432
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
441
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
433
442
|
|
434
443
|
# form parameters
|
435
444
|
form_params = {}
|
436
445
|
|
437
446
|
# http body (model)
|
438
447
|
post_body = nil
|
439
|
-
auth_names = []
|
448
|
+
auth_names = ['api_key']
|
440
449
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
441
450
|
:header_params => header_params,
|
442
451
|
:query_params => query_params,
|
@@ -450,21 +459,21 @@ module VSphereAutomation
|
|
450
459
|
end
|
451
460
|
# Updates an existing category. To invoke this {@term operation}, you need the edit privilege on the category.
|
452
461
|
# @param category_id The identifier of the category to be updated.
|
453
|
-
# @param
|
462
|
+
# @param request_body
|
454
463
|
# @param [Hash] opts the optional parameters
|
455
464
|
# @return [|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil]
|
456
|
-
def update(category_id,
|
457
|
-
update_with_http_info(category_id,
|
465
|
+
def update(category_id, request_body, opts = {})
|
466
|
+
update_with_http_info(category_id, request_body, opts)
|
458
467
|
nil
|
459
468
|
end
|
460
469
|
|
461
470
|
# Updates an existing category. To invoke this {@term operation}, you need the edit privilege on the category.
|
462
471
|
# @api private
|
463
472
|
# @param category_id The identifier of the category to be updated.
|
464
|
-
# @param
|
473
|
+
# @param request_body
|
465
474
|
# @param [Hash] opts the optional parameters
|
466
475
|
# @return [Array<(|VapiStdErrorsInvalidArgumentError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
467
|
-
def update_with_http_info(category_id,
|
476
|
+
def update_with_http_info(category_id, request_body, opts = {})
|
468
477
|
if @api_client.config.debugging
|
469
478
|
@api_client.config.logger.debug 'Calling API: TaggingCategoryApi.update ...'
|
470
479
|
end
|
@@ -472,9 +481,9 @@ module VSphereAutomation
|
|
472
481
|
if @api_client.config.client_side_validation && category_id.nil?
|
473
482
|
fail ArgumentError, "Missing the required parameter 'category_id' when calling TaggingCategoryApi.update"
|
474
483
|
end
|
475
|
-
# verify the required parameter '
|
476
|
-
if @api_client.config.client_side_validation &&
|
477
|
-
fail ArgumentError, "Missing the required parameter '
|
484
|
+
# verify the required parameter 'request_body' is set
|
485
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
486
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling TaggingCategoryApi.update"
|
478
487
|
end
|
479
488
|
# resource path
|
480
489
|
local_var_path = '/com/vmware/cis/tagging/category/id:{category_id}'.sub('{' + 'category_id' + '}', category_id.to_s)
|
@@ -485,7 +494,7 @@ module VSphereAutomation
|
|
485
494
|
# header parameters
|
486
495
|
header_params = {}
|
487
496
|
# HTTP header 'Accept' (if needed)
|
488
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
497
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
489
498
|
# HTTP header 'Content-Type'
|
490
499
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
491
500
|
|
@@ -493,8 +502,8 @@ module VSphereAutomation
|
|
493
502
|
form_params = {}
|
494
503
|
|
495
504
|
# http body (model)
|
496
|
-
post_body = @api_client.object_to_http_body(
|
497
|
-
auth_names = []
|
505
|
+
post_body = @api_client.object_to_http_body(request_body)
|
506
|
+
auth_names = ['api_key']
|
498
507
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
499
508
|
:header_params => header_params,
|
500
509
|
:query_params => query_params,
|