ibm_cloud_resource_controller 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +148 -0
  4. data/Rakefile +10 -0
  5. data/docs/Credentials.md +25 -0
  6. data/docs/ErrorReport.md +23 -0
  7. data/docs/PlanHistoryItem.md +19 -0
  8. data/docs/Reclamation.md +45 -0
  9. data/docs/ReclamationActionsPost.md +19 -0
  10. data/docs/ReclamationsList.md +17 -0
  11. data/docs/ResourceAlias.md +57 -0
  12. data/docs/ResourceAliasPatch.md +17 -0
  13. data/docs/ResourceAliasPost.md +21 -0
  14. data/docs/ResourceAliasesApi.md +302 -0
  15. data/docs/ResourceAliasesList.md +21 -0
  16. data/docs/ResourceBinding.md +57 -0
  17. data/docs/ResourceBindingPatch.md +17 -0
  18. data/docs/ResourceBindingPost.md +25 -0
  19. data/docs/ResourceBindingPostParameters.md +17 -0
  20. data/docs/ResourceBindingsApi.md +300 -0
  21. data/docs/ResourceBindingsList.md +21 -0
  22. data/docs/ResourceInstance.md +81 -0
  23. data/docs/ResourceInstancePatch.md +23 -0
  24. data/docs/ResourceInstancePost.md +29 -0
  25. data/docs/ResourceInstancesApi.md +418 -0
  26. data/docs/ResourceInstancesList.md +21 -0
  27. data/docs/ResourceKey.md +53 -0
  28. data/docs/ResourceKeyPatch.md +17 -0
  29. data/docs/ResourceKeyPost.md +23 -0
  30. data/docs/ResourceKeysApi.md +298 -0
  31. data/docs/ResourceKeysList.md +21 -0
  32. data/docs/ResourceReclamationsApi.md +128 -0
  33. data/git_push.sh +58 -0
  34. data/ibm_cloud_resource_controller.gemspec +38 -0
  35. data/lib/ibm_cloud_resource_controller.rb +67 -0
  36. data/lib/ibm_cloud_resource_controller/api/resource_aliases_api.rb +363 -0
  37. data/lib/ibm_cloud_resource_controller/api/resource_bindings_api.rb +360 -0
  38. data/lib/ibm_cloud_resource_controller/api/resource_instances_api.rb +493 -0
  39. data/lib/ibm_cloud_resource_controller/api/resource_keys_api.rb +357 -0
  40. data/lib/ibm_cloud_resource_controller/api/resource_reclamations_api.rb +156 -0
  41. data/lib/ibm_cloud_resource_controller/api_client.rb +388 -0
  42. data/lib/ibm_cloud_resource_controller/api_error.rb +57 -0
  43. data/lib/ibm_cloud_resource_controller/configuration.rb +248 -0
  44. data/lib/ibm_cloud_resource_controller/models/credentials.rb +250 -0
  45. data/lib/ibm_cloud_resource_controller/models/error_report.rb +240 -0
  46. data/lib/ibm_cloud_resource_controller/models/plan_history_item.rb +230 -0
  47. data/lib/ibm_cloud_resource_controller/models/reclamation.rb +352 -0
  48. data/lib/ibm_cloud_resource_controller/models/reclamation_actions_post.rb +220 -0
  49. data/lib/ibm_cloud_resource_controller/models/reclamations_list.rb +212 -0
  50. data/lib/ibm_cloud_resource_controller/models/resource_alias.rb +410 -0
  51. data/lib/ibm_cloud_resource_controller/models/resource_alias_patch.rb +236 -0
  52. data/lib/ibm_cloud_resource_controller/models/resource_alias_post.rb +266 -0
  53. data/lib/ibm_cloud_resource_controller/models/resource_aliases_list.rb +247 -0
  54. data/lib/ibm_cloud_resource_controller/models/resource_binding.rb +410 -0
  55. data/lib/ibm_cloud_resource_controller/models/resource_binding_patch.rb +236 -0
  56. data/lib/ibm_cloud_resource_controller/models/resource_binding_post.rb +278 -0
  57. data/lib/ibm_cloud_resource_controller/models/resource_binding_post_parameters.rb +210 -0
  58. data/lib/ibm_cloud_resource_controller/models/resource_bindings_list.rb +247 -0
  59. data/lib/ibm_cloud_resource_controller/models/resource_instance.rb +536 -0
  60. data/lib/ibm_cloud_resource_controller/models/resource_instance_patch.rb +259 -0
  61. data/lib/ibm_cloud_resource_controller/models/resource_instance_post.rb +317 -0
  62. data/lib/ibm_cloud_resource_controller/models/resource_instances_list.rb +247 -0
  63. data/lib/ibm_cloud_resource_controller/models/resource_key.rb +390 -0
  64. data/lib/ibm_cloud_resource_controller/models/resource_key_patch.rb +236 -0
  65. data/lib/ibm_cloud_resource_controller/models/resource_key_post.rb +251 -0
  66. data/lib/ibm_cloud_resource_controller/models/resource_keys_list.rb +247 -0
  67. data/lib/ibm_cloud_resource_controller/version.rb +15 -0
  68. data/spec/api/resource_aliases_api_spec.rb +104 -0
  69. data/spec/api/resource_bindings_api_spec.rb +103 -0
  70. data/spec/api/resource_instances_api_spec.rb +130 -0
  71. data/spec/api/resource_keys_api_spec.rb +102 -0
  72. data/spec/api/resource_reclamations_api_spec.rb +62 -0
  73. data/spec/api_client_spec.rb +226 -0
  74. data/spec/configuration_spec.rb +42 -0
  75. data/spec/models/credentials_spec.rb +65 -0
  76. data/spec/models/error_report_spec.rb +59 -0
  77. data/spec/models/plan_history_item_spec.rb +47 -0
  78. data/spec/models/reclamation_actions_post_spec.rb +47 -0
  79. data/spec/models/reclamation_spec.rb +125 -0
  80. data/spec/models/reclamations_list_spec.rb +41 -0
  81. data/spec/models/resource_alias_patch_spec.rb +41 -0
  82. data/spec/models/resource_alias_post_spec.rb +53 -0
  83. data/spec/models/resource_alias_spec.rb +143 -0
  84. data/spec/models/resource_aliases_list_spec.rb +53 -0
  85. data/spec/models/resource_binding_patch_spec.rb +41 -0
  86. data/spec/models/resource_binding_post_parameters_spec.rb +41 -0
  87. data/spec/models/resource_binding_post_spec.rb +65 -0
  88. data/spec/models/resource_binding_spec.rb +137 -0
  89. data/spec/models/resource_bindings_list_spec.rb +53 -0
  90. data/spec/models/resource_instance_patch_spec.rb +59 -0
  91. data/spec/models/resource_instance_post_spec.rb +77 -0
  92. data/spec/models/resource_instance_spec.rb +191 -0
  93. data/spec/models/resource_instances_list_spec.rb +53 -0
  94. data/spec/models/resource_key_patch_spec.rb +41 -0
  95. data/spec/models/resource_key_post_spec.rb +59 -0
  96. data/spec/models/resource_key_spec.rb +125 -0
  97. data/spec/models/resource_keys_list_spec.rb +53 -0
  98. data/spec/spec_helper.rb +111 -0
  99. metadata +211 -0
@@ -0,0 +1,357 @@
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 ResourceKeysApi
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 key
23
+ # Create a new resource key.
24
+ # @param resource_key_post [ResourceKeyPost]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ResourceKey]
27
+ def create_resource_key(resource_key_post, opts = {})
28
+ data, _status_code, _headers = create_resource_key_with_http_info(resource_key_post, opts)
29
+ data
30
+ end
31
+
32
+ # Create a new resource key
33
+ # Create a new resource key.
34
+ # @param resource_key_post [ResourceKeyPost]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ResourceKey, Integer, Hash)>] ResourceKey data, response status code and response headers
37
+ def create_resource_key_with_http_info(resource_key_post, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ResourceKeysApi.create_resource_key ...'
40
+ end
41
+ # verify the required parameter 'resource_key_post' is set
42
+ if @api_client.config.client_side_validation && resource_key_post.nil?
43
+ fail ArgumentError, "Missing the required parameter 'resource_key_post' when calling ResourceKeysApi.create_resource_key"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v2/resource_keys'
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_key_post)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'ResourceKey'
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: ResourceKeysApi#create_resource_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a resource key by ID
87
+ # Delete a resource key by ID.
88
+ # @param id [String] The short or long ID of the key.
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [nil]
91
+ def delete_resource_key(id, opts = {})
92
+ delete_resource_key_with_http_info(id, opts)
93
+ nil
94
+ end
95
+
96
+ # Delete a resource key by ID
97
+ # Delete a resource key by ID.
98
+ # @param id [String] The short or long ID of the key.
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
+ def delete_resource_key_with_http_info(id, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: ResourceKeysApi.delete_resource_key ...'
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 ResourceKeysApi.delete_resource_key"
108
+ end
109
+ # resource path
110
+ local_var_path = '/v2/resource_keys/{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: ResourceKeysApi#delete_resource_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Get resource key by ID
149
+ # Get resource key by ID.
150
+ # @param id [String] The short or long ID of the key.
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [ResourceKey]
153
+ def get_resource_key(id, opts = {})
154
+ data, _status_code, _headers = get_resource_key_with_http_info(id, opts)
155
+ data
156
+ end
157
+
158
+ # Get resource key by ID
159
+ # Get resource key by ID.
160
+ # @param id [String] The short or long ID of the key.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(ResourceKey, Integer, Hash)>] ResourceKey data, response status code and response headers
163
+ def get_resource_key_with_http_info(id, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: ResourceKeysApi.get_resource_key ...'
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 ResourceKeysApi.get_resource_key"
170
+ end
171
+ # resource path
172
+ local_var_path = '/v2/resource_keys/{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] || 'ResourceKey'
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: ResourceKeysApi#get_resource_key\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 of the resource keys.
211
+ # List all resource keys.
212
+ # @param [Hash] opts the optional parameters
213
+ # @option opts [String] :guid When you create a new key, a GUID (globally unique identifier) is assigned. This is a unique internal GUID managed by Resource controller that corresponds to the key.
214
+ # @option opts [String] :name The human-readable name of the key.
215
+ # @option opts [String] :resource_group_id The short ID of the resource group.
216
+ # @option opts [String] :resource_id The unique ID of the offering. This value is provided by and stored in the global catalog.
217
+ # @option opts [String] :limit Limit on how many items should be returned.
218
+ # @option opts [String] :updated_from Start date inclusive filter.
219
+ # @option opts [String] :updated_to End date inclusive filter.
220
+ # @return [ResourceKeysList]
221
+ def list_resource_keys(opts = {})
222
+ data, _status_code, _headers = list_resource_keys_with_http_info(opts)
223
+ data
224
+ end
225
+
226
+ # Get a list of all of the resource keys.
227
+ # List all resource keys.
228
+ # @param [Hash] opts the optional parameters
229
+ # @option opts [String] :guid When you create a new key, a GUID (globally unique identifier) is assigned. This is a unique internal GUID managed by Resource controller that corresponds to the key.
230
+ # @option opts [String] :name The human-readable name of the key.
231
+ # @option opts [String] :resource_group_id The short ID of the resource group.
232
+ # @option opts [String] :resource_id The unique ID of the offering. This value is provided by and stored in the global catalog.
233
+ # @option opts [String] :limit Limit on how many items should be returned.
234
+ # @option opts [String] :updated_from Start date inclusive filter.
235
+ # @option opts [String] :updated_to End date inclusive filter.
236
+ # @return [Array<(ResourceKeysList, Integer, Hash)>] ResourceKeysList data, response status code and response headers
237
+ def list_resource_keys_with_http_info(opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: ResourceKeysApi.list_resource_keys ...'
240
+ end
241
+ # resource path
242
+ local_var_path = '/v2/resource_keys'
243
+
244
+ # query parameters
245
+ query_params = opts[:query_params] || {}
246
+ query_params[:'guid'] = opts[:'guid'] if !opts[:'guid'].nil?
247
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
248
+ query_params[:'resource_group_id'] = opts[:'resource_group_id'] if !opts[:'resource_group_id'].nil?
249
+ query_params[:'resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil?
250
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
251
+ query_params[:'updated_from'] = opts[:'updated_from'] if !opts[:'updated_from'].nil?
252
+ query_params[:'updated_to'] = opts[:'updated_to'] if !opts[:'updated_to'].nil?
253
+
254
+ # header parameters
255
+ header_params = opts[:header_params] || {}
256
+ # HTTP header 'Accept' (if needed)
257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
258
+
259
+ # form parameters
260
+ form_params = opts[:form_params] || {}
261
+
262
+ # http body (model)
263
+ post_body = opts[:body]
264
+
265
+ # return_type
266
+ return_type = opts[:return_type] || 'ResourceKeysList'
267
+
268
+ # auth_names
269
+ auth_names = opts[:auth_names] || ['IAM']
270
+
271
+ new_options = opts.merge(
272
+ :header_params => header_params,
273
+ :query_params => query_params,
274
+ :form_params => form_params,
275
+ :body => post_body,
276
+ :auth_names => auth_names,
277
+ :return_type => return_type
278
+ )
279
+
280
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
281
+ if @api_client.config.debugging
282
+ @api_client.config.logger.debug "API called: ResourceKeysApi#list_resource_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
283
+ end
284
+ return data, status_code, headers
285
+ end
286
+
287
+ # Update a resource key
288
+ # Update a resource key by ID.
289
+ # @param id [String] The short or long ID of the key.
290
+ # @param resource_key_patch [ResourceKeyPatch]
291
+ # @param [Hash] opts the optional parameters
292
+ # @return [ResourceKey]
293
+ def update_resource_key(id, resource_key_patch, opts = {})
294
+ data, _status_code, _headers = update_resource_key_with_http_info(id, resource_key_patch, opts)
295
+ data
296
+ end
297
+
298
+ # Update a resource key
299
+ # Update a resource key by ID.
300
+ # @param id [String] The short or long ID of the key.
301
+ # @param resource_key_patch [ResourceKeyPatch]
302
+ # @param [Hash] opts the optional parameters
303
+ # @return [Array<(ResourceKey, Integer, Hash)>] ResourceKey data, response status code and response headers
304
+ def update_resource_key_with_http_info(id, resource_key_patch, opts = {})
305
+ if @api_client.config.debugging
306
+ @api_client.config.logger.debug 'Calling API: ResourceKeysApi.update_resource_key ...'
307
+ end
308
+ # verify the required parameter 'id' is set
309
+ if @api_client.config.client_side_validation && id.nil?
310
+ fail ArgumentError, "Missing the required parameter 'id' when calling ResourceKeysApi.update_resource_key"
311
+ end
312
+ # verify the required parameter 'resource_key_patch' is set
313
+ if @api_client.config.client_side_validation && resource_key_patch.nil?
314
+ fail ArgumentError, "Missing the required parameter 'resource_key_patch' when calling ResourceKeysApi.update_resource_key"
315
+ end
316
+ # resource path
317
+ local_var_path = '/v2/resource_keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
318
+
319
+ # query parameters
320
+ query_params = opts[:query_params] || {}
321
+
322
+ # header parameters
323
+ header_params = opts[:header_params] || {}
324
+ # HTTP header 'Accept' (if needed)
325
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
326
+ # HTTP header 'Content-Type'
327
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
328
+
329
+ # form parameters
330
+ form_params = opts[:form_params] || {}
331
+
332
+ # http body (model)
333
+ post_body = opts[:body] || @api_client.object_to_http_body(resource_key_patch)
334
+
335
+ # return_type
336
+ return_type = opts[:return_type] || 'ResourceKey'
337
+
338
+ # auth_names
339
+ auth_names = opts[:auth_names] || ['IAM']
340
+
341
+ new_options = opts.merge(
342
+ :header_params => header_params,
343
+ :query_params => query_params,
344
+ :form_params => form_params,
345
+ :body => post_body,
346
+ :auth_names => auth_names,
347
+ :return_type => return_type
348
+ )
349
+
350
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
351
+ if @api_client.config.debugging
352
+ @api_client.config.logger.debug "API called: ResourceKeysApi#update_resource_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
353
+ end
354
+ return data, status_code, headers
355
+ end
356
+ end
357
+ end
@@ -0,0 +1,156 @@
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 ResourceReclamationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get a list of all reclamations
23
+ # Get a list of all reclamations.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :account_id An alpha-numeric value identifying the account ID.
26
+ # @option opts [String] :resource_instance_id The short ID of the resource instance.
27
+ # @return [ReclamationsList]
28
+ def list_reclamations(opts = {})
29
+ data, _status_code, _headers = list_reclamations_with_http_info(opts)
30
+ data
31
+ end
32
+
33
+ # Get a list of all reclamations
34
+ # Get a list of all reclamations.
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [String] :account_id An alpha-numeric value identifying the account ID.
37
+ # @option opts [String] :resource_instance_id The short ID of the resource instance.
38
+ # @return [Array<(ReclamationsList, Integer, Hash)>] ReclamationsList data, response status code and response headers
39
+ def list_reclamations_with_http_info(opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ResourceReclamationsApi.list_reclamations ...'
42
+ end
43
+ # resource path
44
+ local_var_path = '/v1/reclamations'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+ query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
49
+ query_params[:'resource_instance_id'] = opts[:'resource_instance_id'] if !opts[:'resource_instance_id'].nil?
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
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:body]
61
+
62
+ # return_type
63
+ return_type = opts[:return_type] || 'ReclamationsList'
64
+
65
+ # auth_names
66
+ auth_names = opts[:auth_names] || ['IAM']
67
+
68
+ new_options = opts.merge(
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: ResourceReclamationsApi#list_reclamations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Perform a reclamation action
85
+ # Reclaim (provisionally delete) a resource so that it can no longer be used, or restore a resource so that it's usable again.
86
+ # @param id [String] The ID associated with the reclamation.
87
+ # @param action_name [String] The reclamation action name. Specify &#x60;reclaim&#x60; to delete a resource, or &#x60;restore&#x60; to restore a resource.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [ReclamationActionsPost] :reclamation_actions_post
90
+ # @return [Reclamation]
91
+ def run_reclamation_action(id, action_name, opts = {})
92
+ data, _status_code, _headers = run_reclamation_action_with_http_info(id, action_name, opts)
93
+ data
94
+ end
95
+
96
+ # Perform a reclamation action
97
+ # Reclaim (provisionally delete) a resource so that it can no longer be used, or restore a resource so that it&#39;s usable again.
98
+ # @param id [String] The ID associated with the reclamation.
99
+ # @param action_name [String] The reclamation action name. Specify &#x60;reclaim&#x60; to delete a resource, or &#x60;restore&#x60; to restore a resource.
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [ReclamationActionsPost] :reclamation_actions_post
102
+ # @return [Array<(Reclamation, Integer, Hash)>] Reclamation data, response status code and response headers
103
+ def run_reclamation_action_with_http_info(id, action_name, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: ResourceReclamationsApi.run_reclamation_action ...'
106
+ end
107
+ # verify the required parameter 'id' is set
108
+ if @api_client.config.client_side_validation && id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'id' when calling ResourceReclamationsApi.run_reclamation_action"
110
+ end
111
+ # verify the required parameter 'action_name' is set
112
+ if @api_client.config.client_side_validation && action_name.nil?
113
+ fail ArgumentError, "Missing the required parameter 'action_name' when calling ResourceReclamationsApi.run_reclamation_action"
114
+ end
115
+ # resource path
116
+ local_var_path = '/v1/reclamations/{id}/actions/{action_name}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'action_name' + '}', CGI.escape(action_name.to_s))
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+ # HTTP header 'Content-Type'
126
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'reclamation_actions_post'])
133
+
134
+ # return_type
135
+ return_type = opts[:return_type] || 'Reclamation'
136
+
137
+ # auth_names
138
+ auth_names = opts[:auth_names] || ['IAM']
139
+
140
+ new_options = opts.merge(
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: ResourceReclamationsApi#run_reclamation_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+ end
156
+ end