ibm_cloud_resource_controller 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +13 -0
  3. data/.gitignore +13 -0
  4. data/.openapi-generator-ignore +23 -0
  5. data/.openapi-generator/VERSION +1 -0
  6. data/.rspec +3 -0
  7. data/.travis.yml +49 -0
  8. data/CHANGELOG.md +2 -0
  9. data/CODE_OF_CONDUCT.md +76 -0
  10. data/CONTRIBUTING.md +13 -0
  11. data/Gemfile +4 -6
  12. data/LICENSE +201 -0
  13. data/README.md +56 -120
  14. data/Rakefile +3 -7
  15. data/bin/console +14 -0
  16. data/bin/setup +8 -0
  17. data/ibm_cloud_resource_controller.gemspec +34 -37
  18. data/lib/ibm_cloud_resource_controller.rb +9 -64
  19. data/lib/ibm_cloud_resource_controller/authenticators.rb +15 -0
  20. data/lib/ibm_cloud_resource_controller/common.rb +22 -0
  21. data/lib/ibm_cloud_resource_controller/resource_controller_v2.rb +982 -0
  22. data/lib/ibm_cloud_resource_controller/resource_manager_v2.rb +303 -0
  23. data/lib/ibm_cloud_resource_controller/version.rb +1 -13
  24. metadata +59 -145
  25. data/docs/Credentials.md +0 -25
  26. data/docs/ErrorReport.md +0 -23
  27. data/docs/PlanHistoryItem.md +0 -19
  28. data/docs/Reclamation.md +0 -45
  29. data/docs/ReclamationActionsPost.md +0 -19
  30. data/docs/ReclamationsList.md +0 -17
  31. data/docs/ResourceAlias.md +0 -57
  32. data/docs/ResourceAliasPatch.md +0 -17
  33. data/docs/ResourceAliasPost.md +0 -21
  34. data/docs/ResourceAliasesApi.md +0 -302
  35. data/docs/ResourceAliasesList.md +0 -21
  36. data/docs/ResourceBinding.md +0 -57
  37. data/docs/ResourceBindingPatch.md +0 -17
  38. data/docs/ResourceBindingPost.md +0 -25
  39. data/docs/ResourceBindingPostParameters.md +0 -17
  40. data/docs/ResourceBindingsApi.md +0 -300
  41. data/docs/ResourceBindingsList.md +0 -21
  42. data/docs/ResourceInstance.md +0 -81
  43. data/docs/ResourceInstancePatch.md +0 -23
  44. data/docs/ResourceInstancePost.md +0 -29
  45. data/docs/ResourceInstancesApi.md +0 -418
  46. data/docs/ResourceInstancesList.md +0 -21
  47. data/docs/ResourceKey.md +0 -53
  48. data/docs/ResourceKeyPatch.md +0 -17
  49. data/docs/ResourceKeyPost.md +0 -23
  50. data/docs/ResourceKeysApi.md +0 -298
  51. data/docs/ResourceKeysList.md +0 -21
  52. data/docs/ResourceReclamationsApi.md +0 -128
  53. data/git_push.sh +0 -58
  54. data/lib/ibm_cloud_resource_controller/api/resource_aliases_api.rb +0 -363
  55. data/lib/ibm_cloud_resource_controller/api/resource_bindings_api.rb +0 -360
  56. data/lib/ibm_cloud_resource_controller/api/resource_instances_api.rb +0 -493
  57. data/lib/ibm_cloud_resource_controller/api/resource_keys_api.rb +0 -357
  58. data/lib/ibm_cloud_resource_controller/api/resource_reclamations_api.rb +0 -156
  59. data/lib/ibm_cloud_resource_controller/api_client.rb +0 -388
  60. data/lib/ibm_cloud_resource_controller/api_error.rb +0 -57
  61. data/lib/ibm_cloud_resource_controller/configuration.rb +0 -248
  62. data/lib/ibm_cloud_resource_controller/models/credentials.rb +0 -250
  63. data/lib/ibm_cloud_resource_controller/models/error_report.rb +0 -240
  64. data/lib/ibm_cloud_resource_controller/models/plan_history_item.rb +0 -230
  65. data/lib/ibm_cloud_resource_controller/models/reclamation.rb +0 -352
  66. data/lib/ibm_cloud_resource_controller/models/reclamation_actions_post.rb +0 -220
  67. data/lib/ibm_cloud_resource_controller/models/reclamations_list.rb +0 -212
  68. data/lib/ibm_cloud_resource_controller/models/resource_alias.rb +0 -410
  69. data/lib/ibm_cloud_resource_controller/models/resource_alias_patch.rb +0 -236
  70. data/lib/ibm_cloud_resource_controller/models/resource_alias_post.rb +0 -266
  71. data/lib/ibm_cloud_resource_controller/models/resource_aliases_list.rb +0 -247
  72. data/lib/ibm_cloud_resource_controller/models/resource_binding.rb +0 -410
  73. data/lib/ibm_cloud_resource_controller/models/resource_binding_patch.rb +0 -236
  74. data/lib/ibm_cloud_resource_controller/models/resource_binding_post.rb +0 -278
  75. data/lib/ibm_cloud_resource_controller/models/resource_binding_post_parameters.rb +0 -210
  76. data/lib/ibm_cloud_resource_controller/models/resource_bindings_list.rb +0 -247
  77. data/lib/ibm_cloud_resource_controller/models/resource_instance.rb +0 -536
  78. data/lib/ibm_cloud_resource_controller/models/resource_instance_patch.rb +0 -259
  79. data/lib/ibm_cloud_resource_controller/models/resource_instance_post.rb +0 -317
  80. data/lib/ibm_cloud_resource_controller/models/resource_instances_list.rb +0 -247
  81. data/lib/ibm_cloud_resource_controller/models/resource_key.rb +0 -390
  82. data/lib/ibm_cloud_resource_controller/models/resource_key_patch.rb +0 -236
  83. data/lib/ibm_cloud_resource_controller/models/resource_key_post.rb +0 -251
  84. data/lib/ibm_cloud_resource_controller/models/resource_keys_list.rb +0 -247
  85. data/spec/api/resource_aliases_api_spec.rb +0 -104
  86. data/spec/api/resource_bindings_api_spec.rb +0 -103
  87. data/spec/api/resource_instances_api_spec.rb +0 -130
  88. data/spec/api/resource_keys_api_spec.rb +0 -102
  89. data/spec/api/resource_reclamations_api_spec.rb +0 -62
  90. data/spec/api_client_spec.rb +0 -226
  91. data/spec/configuration_spec.rb +0 -42
  92. data/spec/models/credentials_spec.rb +0 -65
  93. data/spec/models/error_report_spec.rb +0 -59
  94. data/spec/models/plan_history_item_spec.rb +0 -47
  95. data/spec/models/reclamation_actions_post_spec.rb +0 -47
  96. data/spec/models/reclamation_spec.rb +0 -125
  97. data/spec/models/reclamations_list_spec.rb +0 -41
  98. data/spec/models/resource_alias_patch_spec.rb +0 -41
  99. data/spec/models/resource_alias_post_spec.rb +0 -53
  100. data/spec/models/resource_alias_spec.rb +0 -143
  101. data/spec/models/resource_aliases_list_spec.rb +0 -53
  102. data/spec/models/resource_binding_patch_spec.rb +0 -41
  103. data/spec/models/resource_binding_post_parameters_spec.rb +0 -41
  104. data/spec/models/resource_binding_post_spec.rb +0 -65
  105. data/spec/models/resource_binding_spec.rb +0 -137
  106. data/spec/models/resource_bindings_list_spec.rb +0 -53
  107. data/spec/models/resource_instance_patch_spec.rb +0 -59
  108. data/spec/models/resource_instance_post_spec.rb +0 -77
  109. data/spec/models/resource_instance_spec.rb +0 -191
  110. data/spec/models/resource_instances_list_spec.rb +0 -53
  111. data/spec/models/resource_key_patch_spec.rb +0 -41
  112. data/spec/models/resource_key_post_spec.rb +0 -59
  113. data/spec/models/resource_key_spec.rb +0 -125
  114. data/spec/models/resource_keys_list_spec.rb +0 -53
  115. data/spec/spec_helper.rb +0 -111
data/git_push.sh DELETED
@@ -1,58 +0,0 @@
1
- #!/bin/sh
2
- # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
- #
4
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5
-
6
- git_user_id=$1
7
- git_repo_id=$2
8
- release_note=$3
9
- git_host=$4
10
-
11
- if [ "$git_host" = "" ]; then
12
- git_host="github.com"
13
- echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
- fi
15
-
16
- if [ "$git_user_id" = "" ]; then
17
- git_user_id="GIT_USER_ID"
18
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
- fi
20
-
21
- if [ "$git_repo_id" = "" ]; then
22
- git_repo_id="GIT_REPO_ID"
23
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
- fi
25
-
26
- if [ "$release_note" = "" ]; then
27
- release_note="Minor update"
28
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
- fi
30
-
31
- # Initialize the local directory as a Git repository
32
- git init
33
-
34
- # Adds the files in the local repository and stages them for commit.
35
- git add .
36
-
37
- # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
- git commit -m "$release_note"
39
-
40
- # Sets the new remote
41
- git_remote=`git remote`
42
- if [ "$git_remote" = "" ]; then # git remote not defined
43
-
44
- if [ "$GIT_TOKEN" = "" ]; then
45
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
- git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
- else
48
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49
- fi
50
-
51
- fi
52
-
53
- git pull origin master
54
-
55
- # Pushes (Forces) the changes in the local repository up to the remote repository
56
- echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
- git push origin master 2>&1 | grep -v 'To https'
58
-
@@ -1,363 +0,0 @@
1
- =begin
2
- #IBM Cloud Resource Controller API
3
-
4
- #Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a Cloud Foundry space in any region.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-beta2
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module IbmCloudResourceController
16
- class ResourceAliasesApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create a new resource alias
23
- # Alias a resource instance into a targeted environment's (name)space.
24
- # @param resource_alias_post [ResourceAliasPost]
25
- # @param [Hash] opts the optional parameters
26
- # @return [ResourceAlias]
27
- def create_resource_alias(resource_alias_post, opts = {})
28
- data, _status_code, _headers = create_resource_alias_with_http_info(resource_alias_post, opts)
29
- data
30
- end
31
-
32
- # Create a new resource alias
33
- # Alias a resource instance into a targeted environment's (name)space.
34
- # @param resource_alias_post [ResourceAliasPost]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(ResourceAlias, Integer, Hash)>] ResourceAlias data, response status code and response headers
37
- def create_resource_alias_with_http_info(resource_alias_post, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: ResourceAliasesApi.create_resource_alias ...'
40
- end
41
- # verify the required parameter 'resource_alias_post' is set
42
- if @api_client.config.client_side_validation && resource_alias_post.nil?
43
- fail ArgumentError, "Missing the required parameter 'resource_alias_post' when calling ResourceAliasesApi.create_resource_alias"
44
- end
45
- # resource path
46
- local_var_path = '/v2/resource_aliases'
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
- # HTTP header 'Content-Type'
56
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
-
58
- # form parameters
59
- form_params = opts[:form_params] || {}
60
-
61
- # http body (model)
62
- post_body = opts[:body] || @api_client.object_to_http_body(resource_alias_post)
63
-
64
- # return_type
65
- return_type = opts[:return_type] || 'ResourceAlias'
66
-
67
- # auth_names
68
- auth_names = opts[:auth_names] || ['IAM']
69
-
70
- new_options = opts.merge(
71
- :header_params => header_params,
72
- :query_params => query_params,
73
- :form_params => form_params,
74
- :body => post_body,
75
- :auth_names => auth_names,
76
- :return_type => return_type
77
- )
78
-
79
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
- if @api_client.config.debugging
81
- @api_client.config.logger.debug "API called: ResourceAliasesApi#create_resource_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- end
83
- return data, status_code, headers
84
- end
85
-
86
- # Delete a resource alias
87
- # Delete a resource alias by ID.
88
- # @param id [String] The short or long ID of the alias.
89
- # @param [Hash] opts the optional parameters
90
- # @return [nil]
91
- def delete_resource_alias(id, opts = {})
92
- delete_resource_alias_with_http_info(id, opts)
93
- nil
94
- end
95
-
96
- # Delete a resource alias
97
- # Delete a resource alias by ID.
98
- # @param id [String] The short or long ID of the alias.
99
- # @param [Hash] opts the optional parameters
100
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
- def delete_resource_alias_with_http_info(id, opts = {})
102
- if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: ResourceAliasesApi.delete_resource_alias ...'
104
- end
105
- # verify the required parameter 'id' is set
106
- if @api_client.config.client_side_validation && id.nil?
107
- fail ArgumentError, "Missing the required parameter 'id' when calling ResourceAliasesApi.delete_resource_alias"
108
- end
109
- # resource path
110
- local_var_path = '/v2/resource_aliases/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
111
-
112
- # query parameters
113
- query_params = opts[:query_params] || {}
114
-
115
- # header parameters
116
- header_params = opts[:header_params] || {}
117
- # HTTP header 'Accept' (if needed)
118
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
-
120
- # form parameters
121
- form_params = opts[:form_params] || {}
122
-
123
- # http body (model)
124
- post_body = opts[:body]
125
-
126
- # return_type
127
- return_type = opts[:return_type]
128
-
129
- # auth_names
130
- auth_names = opts[:auth_names] || ['IAM']
131
-
132
- new_options = opts.merge(
133
- :header_params => header_params,
134
- :query_params => query_params,
135
- :form_params => form_params,
136
- :body => post_body,
137
- :auth_names => auth_names,
138
- :return_type => return_type
139
- )
140
-
141
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
- if @api_client.config.debugging
143
- @api_client.config.logger.debug "API called: ResourceAliasesApi#delete_resource_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
- end
145
- return data, status_code, headers
146
- end
147
-
148
- # Get a resource alias
149
- # Retrieve a resource alias by ID.
150
- # @param id [String] The short or long ID of the alias.
151
- # @param [Hash] opts the optional parameters
152
- # @return [ResourceAlias]
153
- def get_resource_alias(id, opts = {})
154
- data, _status_code, _headers = get_resource_alias_with_http_info(id, opts)
155
- data
156
- end
157
-
158
- # Get a resource alias
159
- # Retrieve a resource alias by ID.
160
- # @param id [String] The short or long ID of the alias.
161
- # @param [Hash] opts the optional parameters
162
- # @return [Array<(ResourceAlias, Integer, Hash)>] ResourceAlias data, response status code and response headers
163
- def get_resource_alias_with_http_info(id, opts = {})
164
- if @api_client.config.debugging
165
- @api_client.config.logger.debug 'Calling API: ResourceAliasesApi.get_resource_alias ...'
166
- end
167
- # verify the required parameter 'id' is set
168
- if @api_client.config.client_side_validation && id.nil?
169
- fail ArgumentError, "Missing the required parameter 'id' when calling ResourceAliasesApi.get_resource_alias"
170
- end
171
- # resource path
172
- local_var_path = '/v2/resource_aliases/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
173
-
174
- # query parameters
175
- query_params = opts[:query_params] || {}
176
-
177
- # header parameters
178
- header_params = opts[:header_params] || {}
179
- # HTTP header 'Accept' (if needed)
180
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
-
182
- # form parameters
183
- form_params = opts[:form_params] || {}
184
-
185
- # http body (model)
186
- post_body = opts[:body]
187
-
188
- # return_type
189
- return_type = opts[:return_type] || 'ResourceAlias'
190
-
191
- # auth_names
192
- auth_names = opts[:auth_names] || ['IAM']
193
-
194
- new_options = opts.merge(
195
- :header_params => header_params,
196
- :query_params => query_params,
197
- :form_params => form_params,
198
- :body => post_body,
199
- :auth_names => auth_names,
200
- :return_type => return_type
201
- )
202
-
203
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
- if @api_client.config.debugging
205
- @api_client.config.logger.debug "API called: ResourceAliasesApi#get_resource_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
- end
207
- return data, status_code, headers
208
- end
209
-
210
- # Get a list of all resource aliases
211
- # Get a list of all resource aliases.
212
- # @param [Hash] opts the optional parameters
213
- # @option opts [String] :guid Short ID of the alias.
214
- # @option opts [String] :name The human-readable name of the alias.
215
- # @option opts [String] :resource_instance_id Resource instance short ID.
216
- # @option opts [String] :region_instance_id Short ID of the instance in a specific targeted environment. For example, &#x60;service_instance_id&#x60; in a given IBM Cloud environment.
217
- # @option opts [String] :resource_id The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
218
- # @option opts [String] :resource_group_id Short ID of Resource group.
219
- # @option opts [String] :limit Limit on how many items should be returned.
220
- # @option opts [String] :updated_from Start date inclusive filter.
221
- # @option opts [String] :updated_to End date inclusive filter.
222
- # @return [ResourceAliasesList]
223
- def list_resource_aliases(opts = {})
224
- data, _status_code, _headers = list_resource_aliases_with_http_info(opts)
225
- data
226
- end
227
-
228
- # Get a list of all resource aliases
229
- # Get a list of all resource aliases.
230
- # @param [Hash] opts the optional parameters
231
- # @option opts [String] :guid Short ID of the alias.
232
- # @option opts [String] :name The human-readable name of the alias.
233
- # @option opts [String] :resource_instance_id Resource instance short ID.
234
- # @option opts [String] :region_instance_id Short ID of the instance in a specific targeted environment. For example, &#x60;service_instance_id&#x60; in a given IBM Cloud environment.
235
- # @option opts [String] :resource_id The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
236
- # @option opts [String] :resource_group_id Short ID of Resource group.
237
- # @option opts [String] :limit Limit on how many items should be returned.
238
- # @option opts [String] :updated_from Start date inclusive filter.
239
- # @option opts [String] :updated_to End date inclusive filter.
240
- # @return [Array<(ResourceAliasesList, Integer, Hash)>] ResourceAliasesList data, response status code and response headers
241
- def list_resource_aliases_with_http_info(opts = {})
242
- if @api_client.config.debugging
243
- @api_client.config.logger.debug 'Calling API: ResourceAliasesApi.list_resource_aliases ...'
244
- end
245
- # resource path
246
- local_var_path = '/v2/resource_aliases'
247
-
248
- # query parameters
249
- query_params = opts[:query_params] || {}
250
- query_params[:'guid'] = opts[:'guid'] if !opts[:'guid'].nil?
251
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
252
- query_params[:'resource_instance_id'] = opts[:'resource_instance_id'] if !opts[:'resource_instance_id'].nil?
253
- query_params[:'region_instance_id'] = opts[:'region_instance_id'] if !opts[:'region_instance_id'].nil?
254
- query_params[:'resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil?
255
- query_params[:'resource_group_id'] = opts[:'resource_group_id'] if !opts[:'resource_group_id'].nil?
256
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
257
- query_params[:'updated_from'] = opts[:'updated_from'] if !opts[:'updated_from'].nil?
258
- query_params[:'updated_to'] = opts[:'updated_to'] if !opts[:'updated_to'].nil?
259
-
260
- # header parameters
261
- header_params = opts[:header_params] || {}
262
- # HTTP header 'Accept' (if needed)
263
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
264
-
265
- # form parameters
266
- form_params = opts[:form_params] || {}
267
-
268
- # http body (model)
269
- post_body = opts[:body]
270
-
271
- # return_type
272
- return_type = opts[:return_type] || 'ResourceAliasesList'
273
-
274
- # auth_names
275
- auth_names = opts[:auth_names] || ['IAM']
276
-
277
- new_options = opts.merge(
278
- :header_params => header_params,
279
- :query_params => query_params,
280
- :form_params => form_params,
281
- :body => post_body,
282
- :auth_names => auth_names,
283
- :return_type => return_type
284
- )
285
-
286
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
287
- if @api_client.config.debugging
288
- @api_client.config.logger.debug "API called: ResourceAliasesApi#list_resource_aliases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
- end
290
- return data, status_code, headers
291
- end
292
-
293
- # Update a resource alias
294
- # Update a resource alias by ID.
295
- # @param id [String] The short or long ID of the alias.
296
- # @param resource_alias_patch [ResourceAliasPatch]
297
- # @param [Hash] opts the optional parameters
298
- # @return [ResourceAlias]
299
- def update_resource_alias(id, resource_alias_patch, opts = {})
300
- data, _status_code, _headers = update_resource_alias_with_http_info(id, resource_alias_patch, opts)
301
- data
302
- end
303
-
304
- # Update a resource alias
305
- # Update a resource alias by ID.
306
- # @param id [String] The short or long ID of the alias.
307
- # @param resource_alias_patch [ResourceAliasPatch]
308
- # @param [Hash] opts the optional parameters
309
- # @return [Array<(ResourceAlias, Integer, Hash)>] ResourceAlias data, response status code and response headers
310
- def update_resource_alias_with_http_info(id, resource_alias_patch, opts = {})
311
- if @api_client.config.debugging
312
- @api_client.config.logger.debug 'Calling API: ResourceAliasesApi.update_resource_alias ...'
313
- end
314
- # verify the required parameter 'id' is set
315
- if @api_client.config.client_side_validation && id.nil?
316
- fail ArgumentError, "Missing the required parameter 'id' when calling ResourceAliasesApi.update_resource_alias"
317
- end
318
- # verify the required parameter 'resource_alias_patch' is set
319
- if @api_client.config.client_side_validation && resource_alias_patch.nil?
320
- fail ArgumentError, "Missing the required parameter 'resource_alias_patch' when calling ResourceAliasesApi.update_resource_alias"
321
- end
322
- # resource path
323
- local_var_path = '/v2/resource_aliases/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
324
-
325
- # query parameters
326
- query_params = opts[:query_params] || {}
327
-
328
- # header parameters
329
- header_params = opts[:header_params] || {}
330
- # HTTP header 'Accept' (if needed)
331
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
- # HTTP header 'Content-Type'
333
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
334
-
335
- # form parameters
336
- form_params = opts[:form_params] || {}
337
-
338
- # http body (model)
339
- post_body = opts[:body] || @api_client.object_to_http_body(resource_alias_patch)
340
-
341
- # return_type
342
- return_type = opts[:return_type] || 'ResourceAlias'
343
-
344
- # auth_names
345
- auth_names = opts[:auth_names] || ['IAM']
346
-
347
- new_options = opts.merge(
348
- :header_params => header_params,
349
- :query_params => query_params,
350
- :form_params => form_params,
351
- :body => post_body,
352
- :auth_names => auth_names,
353
- :return_type => return_type
354
- )
355
-
356
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
357
- if @api_client.config.debugging
358
- @api_client.config.logger.debug "API called: ResourceAliasesApi#update_resource_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
- end
360
- return data, status_code, headers
361
- end
362
- end
363
- end
@@ -1,360 +0,0 @@
1
- =begin
2
- #IBM Cloud Resource Controller API
3
-
4
- #Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a Cloud Foundry space in any region.
5
-
6
- The version of the OpenAPI document: 2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-beta2
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module IbmCloudResourceController
16
- class ResourceBindingsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create a new resource binding
23
- # Create a new resource binding.
24
- # @param resource_binding_post [ResourceBindingPost]
25
- # @param [Hash] opts the optional parameters
26
- # @return [ResourceBinding]
27
- def create_resource_binding(resource_binding_post, opts = {})
28
- data, _status_code, _headers = create_resource_binding_with_http_info(resource_binding_post, opts)
29
- data
30
- end
31
-
32
- # Create a new resource binding
33
- # Create a new resource binding.
34
- # @param resource_binding_post [ResourceBindingPost]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(ResourceBinding, Integer, Hash)>] ResourceBinding data, response status code and response headers
37
- def create_resource_binding_with_http_info(resource_binding_post, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: ResourceBindingsApi.create_resource_binding ...'
40
- end
41
- # verify the required parameter 'resource_binding_post' is set
42
- if @api_client.config.client_side_validation && resource_binding_post.nil?
43
- fail ArgumentError, "Missing the required parameter 'resource_binding_post' when calling ResourceBindingsApi.create_resource_binding"
44
- end
45
- # resource path
46
- local_var_path = '/v2/resource_bindings'
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
- # HTTP header 'Content-Type'
56
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
-
58
- # form parameters
59
- form_params = opts[:form_params] || {}
60
-
61
- # http body (model)
62
- post_body = opts[:body] || @api_client.object_to_http_body(resource_binding_post)
63
-
64
- # return_type
65
- return_type = opts[:return_type] || 'ResourceBinding'
66
-
67
- # auth_names
68
- auth_names = opts[:auth_names] || ['IAM']
69
-
70
- new_options = opts.merge(
71
- :header_params => header_params,
72
- :query_params => query_params,
73
- :form_params => form_params,
74
- :body => post_body,
75
- :auth_names => auth_names,
76
- :return_type => return_type
77
- )
78
-
79
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
- if @api_client.config.debugging
81
- @api_client.config.logger.debug "API called: ResourceBindingsApi#create_resource_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- end
83
- return data, status_code, headers
84
- end
85
-
86
- # Delete a resource binding
87
- # Delete a resource binding by ID
88
- # @param id [String] The short or long ID of the binding.
89
- # @param [Hash] opts the optional parameters
90
- # @return [nil]
91
- def delete_resource_binding(id, opts = {})
92
- delete_resource_binding_with_http_info(id, opts)
93
- nil
94
- end
95
-
96
- # Delete a resource binding
97
- # Delete a resource binding by ID
98
- # @param id [String] The short or long ID of the binding.
99
- # @param [Hash] opts the optional parameters
100
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
- def delete_resource_binding_with_http_info(id, opts = {})
102
- if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: ResourceBindingsApi.delete_resource_binding ...'
104
- end
105
- # verify the required parameter 'id' is set
106
- if @api_client.config.client_side_validation && id.nil?
107
- fail ArgumentError, "Missing the required parameter 'id' when calling ResourceBindingsApi.delete_resource_binding"
108
- end
109
- # resource path
110
- local_var_path = '/v2/resource_bindings/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
111
-
112
- # query parameters
113
- query_params = opts[:query_params] || {}
114
-
115
- # header parameters
116
- header_params = opts[:header_params] || {}
117
- # HTTP header 'Accept' (if needed)
118
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
-
120
- # form parameters
121
- form_params = opts[:form_params] || {}
122
-
123
- # http body (model)
124
- post_body = opts[:body]
125
-
126
- # return_type
127
- return_type = opts[:return_type]
128
-
129
- # auth_names
130
- auth_names = opts[:auth_names] || ['IAM']
131
-
132
- new_options = opts.merge(
133
- :header_params => header_params,
134
- :query_params => query_params,
135
- :form_params => form_params,
136
- :body => post_body,
137
- :auth_names => auth_names,
138
- :return_type => return_type
139
- )
140
-
141
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
- if @api_client.config.debugging
143
- @api_client.config.logger.debug "API called: ResourceBindingsApi#delete_resource_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
- end
145
- return data, status_code, headers
146
- end
147
-
148
- # Get a resource binding
149
- # Retrieve a resource binding by ID.
150
- # @param id [String] The short or long ID of the binding.
151
- # @param [Hash] opts the optional parameters
152
- # @return [ResourceBinding]
153
- def get_resource_binding(id, opts = {})
154
- data, _status_code, _headers = get_resource_binding_with_http_info(id, opts)
155
- data
156
- end
157
-
158
- # Get a resource binding
159
- # Retrieve a resource binding by ID.
160
- # @param id [String] The short or long ID of the binding.
161
- # @param [Hash] opts the optional parameters
162
- # @return [Array<(ResourceBinding, Integer, Hash)>] ResourceBinding data, response status code and response headers
163
- def get_resource_binding_with_http_info(id, opts = {})
164
- if @api_client.config.debugging
165
- @api_client.config.logger.debug 'Calling API: ResourceBindingsApi.get_resource_binding ...'
166
- end
167
- # verify the required parameter 'id' is set
168
- if @api_client.config.client_side_validation && id.nil?
169
- fail ArgumentError, "Missing the required parameter 'id' when calling ResourceBindingsApi.get_resource_binding"
170
- end
171
- # resource path
172
- local_var_path = '/v2/resource_bindings/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
173
-
174
- # query parameters
175
- query_params = opts[:query_params] || {}
176
-
177
- # header parameters
178
- header_params = opts[:header_params] || {}
179
- # HTTP header 'Accept' (if needed)
180
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
-
182
- # form parameters
183
- form_params = opts[:form_params] || {}
184
-
185
- # http body (model)
186
- post_body = opts[:body]
187
-
188
- # return_type
189
- return_type = opts[:return_type] || 'ResourceBinding'
190
-
191
- # auth_names
192
- auth_names = opts[:auth_names] || ['IAM']
193
-
194
- new_options = opts.merge(
195
- :header_params => header_params,
196
- :query_params => query_params,
197
- :form_params => form_params,
198
- :body => post_body,
199
- :auth_names => auth_names,
200
- :return_type => return_type
201
- )
202
-
203
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
- if @api_client.config.debugging
205
- @api_client.config.logger.debug "API called: ResourceBindingsApi#get_resource_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
- end
207
- return data, status_code, headers
208
- end
209
-
210
- # Get a list of all resource bindings
211
- # Get a list of all resource bindings.
212
- # @param [Hash] opts the optional parameters
213
- # @option opts [String] :guid The short ID of the binding.
214
- # @option opts [String] :name The human-readable name of the binding.
215
- # @option opts [String] :resource_group_id Short ID of the resource group.
216
- # @option opts [String] :resource_id The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
217
- # @option opts [String] :region_binding_id Short ID of the binding in the specific targeted environment, e.g. service_binding_id in a given IBM Cloud environment.
218
- # @option opts [String] :limit Limit on how many items should be returned
219
- # @option opts [String] :updated_from Start date inclusive filter.
220
- # @option opts [String] :updated_to End date inclusive filter.
221
- # @return [ResourceBindingsList]
222
- def list_resource_bindings(opts = {})
223
- data, _status_code, _headers = list_resource_bindings_with_http_info(opts)
224
- data
225
- end
226
-
227
- # Get a list of all resource bindings
228
- # Get a list of all resource bindings.
229
- # @param [Hash] opts the optional parameters
230
- # @option opts [String] :guid The short ID of the binding.
231
- # @option opts [String] :name The human-readable name of the binding.
232
- # @option opts [String] :resource_group_id Short ID of the resource group.
233
- # @option opts [String] :resource_id The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
234
- # @option opts [String] :region_binding_id Short ID of the binding in the specific targeted environment, e.g. service_binding_id in a given IBM Cloud environment.
235
- # @option opts [String] :limit Limit on how many items should be returned
236
- # @option opts [String] :updated_from Start date inclusive filter.
237
- # @option opts [String] :updated_to End date inclusive filter.
238
- # @return [Array<(ResourceBindingsList, Integer, Hash)>] ResourceBindingsList data, response status code and response headers
239
- def list_resource_bindings_with_http_info(opts = {})
240
- if @api_client.config.debugging
241
- @api_client.config.logger.debug 'Calling API: ResourceBindingsApi.list_resource_bindings ...'
242
- end
243
- # resource path
244
- local_var_path = '/v2/resource_bindings'
245
-
246
- # query parameters
247
- query_params = opts[:query_params] || {}
248
- query_params[:'guid'] = opts[:'guid'] if !opts[:'guid'].nil?
249
- query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
250
- query_params[:'resource_group_id'] = opts[:'resource_group_id'] if !opts[:'resource_group_id'].nil?
251
- query_params[:'resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil?
252
- query_params[:'region_binding_id'] = opts[:'region_binding_id'] if !opts[:'region_binding_id'].nil?
253
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
254
- query_params[:'updated_from'] = opts[:'updated_from'] if !opts[:'updated_from'].nil?
255
- query_params[:'updated_to'] = opts[:'updated_to'] if !opts[:'updated_to'].nil?
256
-
257
- # header parameters
258
- header_params = opts[:header_params] || {}
259
- # HTTP header 'Accept' (if needed)
260
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
261
-
262
- # form parameters
263
- form_params = opts[:form_params] || {}
264
-
265
- # http body (model)
266
- post_body = opts[:body]
267
-
268
- # return_type
269
- return_type = opts[:return_type] || 'ResourceBindingsList'
270
-
271
- # auth_names
272
- auth_names = opts[:auth_names] || ['IAM']
273
-
274
- new_options = opts.merge(
275
- :header_params => header_params,
276
- :query_params => query_params,
277
- :form_params => form_params,
278
- :body => post_body,
279
- :auth_names => auth_names,
280
- :return_type => return_type
281
- )
282
-
283
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
284
- if @api_client.config.debugging
285
- @api_client.config.logger.debug "API called: ResourceBindingsApi#list_resource_bindings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
- end
287
- return data, status_code, headers
288
- end
289
-
290
- # Update a resource binding
291
- # Update a resource binding by ID.
292
- # @param id [String] The short or long ID of the binding.
293
- # @param resource_binding_patch [ResourceBindingPatch]
294
- # @param [Hash] opts the optional parameters
295
- # @return [ResourceBinding]
296
- def update_resource_binding(id, resource_binding_patch, opts = {})
297
- data, _status_code, _headers = update_resource_binding_with_http_info(id, resource_binding_patch, opts)
298
- data
299
- end
300
-
301
- # Update a resource binding
302
- # Update a resource binding by ID.
303
- # @param id [String] The short or long ID of the binding.
304
- # @param resource_binding_patch [ResourceBindingPatch]
305
- # @param [Hash] opts the optional parameters
306
- # @return [Array<(ResourceBinding, Integer, Hash)>] ResourceBinding data, response status code and response headers
307
- def update_resource_binding_with_http_info(id, resource_binding_patch, opts = {})
308
- if @api_client.config.debugging
309
- @api_client.config.logger.debug 'Calling API: ResourceBindingsApi.update_resource_binding ...'
310
- end
311
- # verify the required parameter 'id' is set
312
- if @api_client.config.client_side_validation && id.nil?
313
- fail ArgumentError, "Missing the required parameter 'id' when calling ResourceBindingsApi.update_resource_binding"
314
- end
315
- # verify the required parameter 'resource_binding_patch' is set
316
- if @api_client.config.client_side_validation && resource_binding_patch.nil?
317
- fail ArgumentError, "Missing the required parameter 'resource_binding_patch' when calling ResourceBindingsApi.update_resource_binding"
318
- end
319
- # resource path
320
- local_var_path = '/v2/resource_bindings/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
321
-
322
- # query parameters
323
- query_params = opts[:query_params] || {}
324
-
325
- # header parameters
326
- header_params = opts[:header_params] || {}
327
- # HTTP header 'Accept' (if needed)
328
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
329
- # HTTP header 'Content-Type'
330
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
331
-
332
- # form parameters
333
- form_params = opts[:form_params] || {}
334
-
335
- # http body (model)
336
- post_body = opts[:body] || @api_client.object_to_http_body(resource_binding_patch)
337
-
338
- # return_type
339
- return_type = opts[:return_type] || 'ResourceBinding'
340
-
341
- # auth_names
342
- auth_names = opts[:auth_names] || ['IAM']
343
-
344
- new_options = opts.merge(
345
- :header_params => header_params,
346
- :query_params => query_params,
347
- :form_params => form_params,
348
- :body => post_body,
349
- :auth_names => auth_names,
350
- :return_type => return_type
351
- )
352
-
353
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
354
- if @api_client.config.debugging
355
- @api_client.config.logger.debug "API called: ResourceBindingsApi#update_resource_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
356
- end
357
- return data, status_code, headers
358
- end
359
- end
360
- end