ibm_cloud_resource_controller 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +13 -0
- data/.gitignore +13 -0
- data/.openapi-generator-ignore +23 -0
- data/.openapi-generator/VERSION +1 -0
- data/.rspec +3 -0
- data/.travis.yml +49 -0
- data/CHANGELOG.md +2 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +13 -0
- data/Gemfile +4 -6
- data/LICENSE +201 -0
- data/README.md +56 -120
- data/Rakefile +3 -7
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ibm_cloud_resource_controller.gemspec +34 -37
- data/lib/ibm_cloud_resource_controller.rb +9 -64
- data/lib/ibm_cloud_resource_controller/authenticators.rb +15 -0
- data/lib/ibm_cloud_resource_controller/common.rb +22 -0
- data/lib/ibm_cloud_resource_controller/resource_controller_v2.rb +982 -0
- data/lib/ibm_cloud_resource_controller/resource_manager_v2.rb +303 -0
- data/lib/ibm_cloud_resource_controller/version.rb +1 -13
- metadata +59 -145
- data/docs/Credentials.md +0 -25
- data/docs/ErrorReport.md +0 -23
- data/docs/PlanHistoryItem.md +0 -19
- data/docs/Reclamation.md +0 -45
- data/docs/ReclamationActionsPost.md +0 -19
- data/docs/ReclamationsList.md +0 -17
- data/docs/ResourceAlias.md +0 -57
- data/docs/ResourceAliasPatch.md +0 -17
- data/docs/ResourceAliasPost.md +0 -21
- data/docs/ResourceAliasesApi.md +0 -302
- data/docs/ResourceAliasesList.md +0 -21
- data/docs/ResourceBinding.md +0 -57
- data/docs/ResourceBindingPatch.md +0 -17
- data/docs/ResourceBindingPost.md +0 -25
- data/docs/ResourceBindingPostParameters.md +0 -17
- data/docs/ResourceBindingsApi.md +0 -300
- data/docs/ResourceBindingsList.md +0 -21
- data/docs/ResourceInstance.md +0 -81
- data/docs/ResourceInstancePatch.md +0 -23
- data/docs/ResourceInstancePost.md +0 -29
- data/docs/ResourceInstancesApi.md +0 -418
- data/docs/ResourceInstancesList.md +0 -21
- data/docs/ResourceKey.md +0 -53
- data/docs/ResourceKeyPatch.md +0 -17
- data/docs/ResourceKeyPost.md +0 -23
- data/docs/ResourceKeysApi.md +0 -298
- data/docs/ResourceKeysList.md +0 -21
- data/docs/ResourceReclamationsApi.md +0 -128
- data/git_push.sh +0 -58
- data/lib/ibm_cloud_resource_controller/api/resource_aliases_api.rb +0 -363
- data/lib/ibm_cloud_resource_controller/api/resource_bindings_api.rb +0 -360
- data/lib/ibm_cloud_resource_controller/api/resource_instances_api.rb +0 -493
- data/lib/ibm_cloud_resource_controller/api/resource_keys_api.rb +0 -357
- data/lib/ibm_cloud_resource_controller/api/resource_reclamations_api.rb +0 -156
- data/lib/ibm_cloud_resource_controller/api_client.rb +0 -388
- data/lib/ibm_cloud_resource_controller/api_error.rb +0 -57
- data/lib/ibm_cloud_resource_controller/configuration.rb +0 -248
- data/lib/ibm_cloud_resource_controller/models/credentials.rb +0 -250
- data/lib/ibm_cloud_resource_controller/models/error_report.rb +0 -240
- data/lib/ibm_cloud_resource_controller/models/plan_history_item.rb +0 -230
- data/lib/ibm_cloud_resource_controller/models/reclamation.rb +0 -352
- data/lib/ibm_cloud_resource_controller/models/reclamation_actions_post.rb +0 -220
- data/lib/ibm_cloud_resource_controller/models/reclamations_list.rb +0 -212
- data/lib/ibm_cloud_resource_controller/models/resource_alias.rb +0 -410
- data/lib/ibm_cloud_resource_controller/models/resource_alias_patch.rb +0 -236
- data/lib/ibm_cloud_resource_controller/models/resource_alias_post.rb +0 -266
- data/lib/ibm_cloud_resource_controller/models/resource_aliases_list.rb +0 -247
- data/lib/ibm_cloud_resource_controller/models/resource_binding.rb +0 -410
- data/lib/ibm_cloud_resource_controller/models/resource_binding_patch.rb +0 -236
- data/lib/ibm_cloud_resource_controller/models/resource_binding_post.rb +0 -278
- data/lib/ibm_cloud_resource_controller/models/resource_binding_post_parameters.rb +0 -210
- data/lib/ibm_cloud_resource_controller/models/resource_bindings_list.rb +0 -247
- data/lib/ibm_cloud_resource_controller/models/resource_instance.rb +0 -536
- data/lib/ibm_cloud_resource_controller/models/resource_instance_patch.rb +0 -259
- data/lib/ibm_cloud_resource_controller/models/resource_instance_post.rb +0 -317
- data/lib/ibm_cloud_resource_controller/models/resource_instances_list.rb +0 -247
- data/lib/ibm_cloud_resource_controller/models/resource_key.rb +0 -390
- data/lib/ibm_cloud_resource_controller/models/resource_key_patch.rb +0 -236
- data/lib/ibm_cloud_resource_controller/models/resource_key_post.rb +0 -251
- data/lib/ibm_cloud_resource_controller/models/resource_keys_list.rb +0 -247
- data/spec/api/resource_aliases_api_spec.rb +0 -104
- data/spec/api/resource_bindings_api_spec.rb +0 -103
- data/spec/api/resource_instances_api_spec.rb +0 -130
- data/spec/api/resource_keys_api_spec.rb +0 -102
- data/spec/api/resource_reclamations_api_spec.rb +0 -62
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/credentials_spec.rb +0 -65
- data/spec/models/error_report_spec.rb +0 -59
- data/spec/models/plan_history_item_spec.rb +0 -47
- data/spec/models/reclamation_actions_post_spec.rb +0 -47
- data/spec/models/reclamation_spec.rb +0 -125
- data/spec/models/reclamations_list_spec.rb +0 -41
- data/spec/models/resource_alias_patch_spec.rb +0 -41
- data/spec/models/resource_alias_post_spec.rb +0 -53
- data/spec/models/resource_alias_spec.rb +0 -143
- data/spec/models/resource_aliases_list_spec.rb +0 -53
- data/spec/models/resource_binding_patch_spec.rb +0 -41
- data/spec/models/resource_binding_post_parameters_spec.rb +0 -41
- data/spec/models/resource_binding_post_spec.rb +0 -65
- data/spec/models/resource_binding_spec.rb +0 -137
- data/spec/models/resource_bindings_list_spec.rb +0 -53
- data/spec/models/resource_instance_patch_spec.rb +0 -59
- data/spec/models/resource_instance_post_spec.rb +0 -77
- data/spec/models/resource_instance_spec.rb +0 -191
- data/spec/models/resource_instances_list_spec.rb +0 -53
- data/spec/models/resource_key_patch_spec.rb +0 -41
- data/spec/models/resource_key_post_spec.rb +0 -59
- data/spec/models/resource_key_spec.rb +0 -125
- data/spec/models/resource_keys_list_spec.rb +0 -53
- data/spec/spec_helper.rb +0 -111
@@ -1,493 +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 ResourceInstancesApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Create (provision) a new resource instance
|
23
|
-
# Provision a new resource in the specified location for the selected plan.
|
24
|
-
# @param resource_instance_post [ResourceInstancePost]
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [String] :entity_lock Indicates if the resource instance is locked for further update or delete operations. It does not affect actions performed on child resources like aliases, bindings or keys. False by default. (default to 'false')
|
27
|
-
# @return [ResourceInstance]
|
28
|
-
def create_resource_instance(resource_instance_post, opts = {})
|
29
|
-
data, _status_code, _headers = create_resource_instance_with_http_info(resource_instance_post, opts)
|
30
|
-
data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Create (provision) a new resource instance
|
34
|
-
# Provision a new resource in the specified location for the selected plan.
|
35
|
-
# @param resource_instance_post [ResourceInstancePost]
|
36
|
-
# @param [Hash] opts the optional parameters
|
37
|
-
# @option opts [String] :entity_lock Indicates if the resource instance is locked for further update or delete operations. It does not affect actions performed on child resources like aliases, bindings or keys. False by default.
|
38
|
-
# @return [Array<(ResourceInstance, Integer, Hash)>] ResourceInstance data, response status code and response headers
|
39
|
-
def create_resource_instance_with_http_info(resource_instance_post, opts = {})
|
40
|
-
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API: ResourceInstancesApi.create_resource_instance ...'
|
42
|
-
end
|
43
|
-
# verify the required parameter 'resource_instance_post' is set
|
44
|
-
if @api_client.config.client_side_validation && resource_instance_post.nil?
|
45
|
-
fail ArgumentError, "Missing the required parameter 'resource_instance_post' when calling ResourceInstancesApi.create_resource_instance"
|
46
|
-
end
|
47
|
-
# resource path
|
48
|
-
local_var_path = '/v2/resource_instances'
|
49
|
-
|
50
|
-
# query parameters
|
51
|
-
query_params = opts[:query_params] || {}
|
52
|
-
|
53
|
-
# header parameters
|
54
|
-
header_params = opts[:header_params] || {}
|
55
|
-
# HTTP header 'Accept' (if needed)
|
56
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
-
# HTTP header 'Content-Type'
|
58
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
59
|
-
header_params[:'Entity-Lock'] = opts[:'entity_lock'] if !opts[:'entity_lock'].nil?
|
60
|
-
|
61
|
-
# form parameters
|
62
|
-
form_params = opts[:form_params] || {}
|
63
|
-
|
64
|
-
# http body (model)
|
65
|
-
post_body = opts[:body] || @api_client.object_to_http_body(resource_instance_post)
|
66
|
-
|
67
|
-
# return_type
|
68
|
-
return_type = opts[:return_type] || 'ResourceInstance'
|
69
|
-
|
70
|
-
# auth_names
|
71
|
-
auth_names = opts[:auth_names] || ['IAM']
|
72
|
-
|
73
|
-
new_options = opts.merge(
|
74
|
-
:header_params => header_params,
|
75
|
-
:query_params => query_params,
|
76
|
-
:form_params => form_params,
|
77
|
-
:body => post_body,
|
78
|
-
:auth_names => auth_names,
|
79
|
-
:return_type => return_type
|
80
|
-
)
|
81
|
-
|
82
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
-
if @api_client.config.debugging
|
84
|
-
@api_client.config.logger.debug "API called: ResourceInstancesApi#create_resource_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
-
end
|
86
|
-
return data, status_code, headers
|
87
|
-
end
|
88
|
-
|
89
|
-
# Delete a resource instance
|
90
|
-
# Delete a resource instance by ID.
|
91
|
-
# @param id [String] The short or long ID of the instance.
|
92
|
-
# @param [Hash] opts the optional parameters
|
93
|
-
# @return [nil]
|
94
|
-
def delete_resource_instance(id, opts = {})
|
95
|
-
delete_resource_instance_with_http_info(id, opts)
|
96
|
-
nil
|
97
|
-
end
|
98
|
-
|
99
|
-
# Delete a resource instance
|
100
|
-
# Delete a resource instance by ID.
|
101
|
-
# @param id [String] The short or long ID of the instance.
|
102
|
-
# @param [Hash] opts the optional parameters
|
103
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
104
|
-
def delete_resource_instance_with_http_info(id, opts = {})
|
105
|
-
if @api_client.config.debugging
|
106
|
-
@api_client.config.logger.debug 'Calling API: ResourceInstancesApi.delete_resource_instance ...'
|
107
|
-
end
|
108
|
-
# verify the required parameter 'id' is set
|
109
|
-
if @api_client.config.client_side_validation && id.nil?
|
110
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceInstancesApi.delete_resource_instance"
|
111
|
-
end
|
112
|
-
# resource path
|
113
|
-
local_var_path = '/v2/resource_instances/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
114
|
-
|
115
|
-
# query parameters
|
116
|
-
query_params = opts[:query_params] || {}
|
117
|
-
|
118
|
-
# header parameters
|
119
|
-
header_params = opts[:header_params] || {}
|
120
|
-
# HTTP header 'Accept' (if needed)
|
121
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
|
-
|
123
|
-
# form parameters
|
124
|
-
form_params = opts[:form_params] || {}
|
125
|
-
|
126
|
-
# http body (model)
|
127
|
-
post_body = opts[:body]
|
128
|
-
|
129
|
-
# return_type
|
130
|
-
return_type = opts[:return_type]
|
131
|
-
|
132
|
-
# auth_names
|
133
|
-
auth_names = opts[:auth_names] || ['IAM']
|
134
|
-
|
135
|
-
new_options = opts.merge(
|
136
|
-
:header_params => header_params,
|
137
|
-
:query_params => query_params,
|
138
|
-
:form_params => form_params,
|
139
|
-
:body => post_body,
|
140
|
-
:auth_names => auth_names,
|
141
|
-
:return_type => return_type
|
142
|
-
)
|
143
|
-
|
144
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
145
|
-
if @api_client.config.debugging
|
146
|
-
@api_client.config.logger.debug "API called: ResourceInstancesApi#delete_resource_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
147
|
-
end
|
148
|
-
return data, status_code, headers
|
149
|
-
end
|
150
|
-
|
151
|
-
# Get a resource instance
|
152
|
-
# Retrieve a resource instance by ID.
|
153
|
-
# @param id [String] The short or long ID of the instance.
|
154
|
-
# @param [Hash] opts the optional parameters
|
155
|
-
# @return [ResourceInstance]
|
156
|
-
def get_resource_instance(id, opts = {})
|
157
|
-
data, _status_code, _headers = get_resource_instance_with_http_info(id, opts)
|
158
|
-
data
|
159
|
-
end
|
160
|
-
|
161
|
-
# Get a resource instance
|
162
|
-
# Retrieve a resource instance by ID.
|
163
|
-
# @param id [String] The short or long ID of the instance.
|
164
|
-
# @param [Hash] opts the optional parameters
|
165
|
-
# @return [Array<(ResourceInstance, Integer, Hash)>] ResourceInstance data, response status code and response headers
|
166
|
-
def get_resource_instance_with_http_info(id, opts = {})
|
167
|
-
if @api_client.config.debugging
|
168
|
-
@api_client.config.logger.debug 'Calling API: ResourceInstancesApi.get_resource_instance ...'
|
169
|
-
end
|
170
|
-
# verify the required parameter 'id' is set
|
171
|
-
if @api_client.config.client_side_validation && id.nil?
|
172
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceInstancesApi.get_resource_instance"
|
173
|
-
end
|
174
|
-
# resource path
|
175
|
-
local_var_path = '/v2/resource_instances/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
176
|
-
|
177
|
-
# query parameters
|
178
|
-
query_params = opts[:query_params] || {}
|
179
|
-
|
180
|
-
# header parameters
|
181
|
-
header_params = opts[:header_params] || {}
|
182
|
-
# HTTP header 'Accept' (if needed)
|
183
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
184
|
-
|
185
|
-
# form parameters
|
186
|
-
form_params = opts[:form_params] || {}
|
187
|
-
|
188
|
-
# http body (model)
|
189
|
-
post_body = opts[:body]
|
190
|
-
|
191
|
-
# return_type
|
192
|
-
return_type = opts[:return_type] || 'ResourceInstance'
|
193
|
-
|
194
|
-
# auth_names
|
195
|
-
auth_names = opts[:auth_names] || ['IAM']
|
196
|
-
|
197
|
-
new_options = opts.merge(
|
198
|
-
:header_params => header_params,
|
199
|
-
:query_params => query_params,
|
200
|
-
:form_params => form_params,
|
201
|
-
:body => post_body,
|
202
|
-
:auth_names => auth_names,
|
203
|
-
:return_type => return_type
|
204
|
-
)
|
205
|
-
|
206
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
207
|
-
if @api_client.config.debugging
|
208
|
-
@api_client.config.logger.debug "API called: ResourceInstancesApi#get_resource_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
209
|
-
end
|
210
|
-
return data, status_code, headers
|
211
|
-
end
|
212
|
-
|
213
|
-
# Get a list of all resource instances
|
214
|
-
# Get a list of all resource instances.
|
215
|
-
# @param [Hash] opts the optional parameters
|
216
|
-
# @option opts [String] :guid When you provision a new resource in the specified location for the selected plan, a GUID (globally unique identifier) is created. This is a unique internal GUID managed by Resource controller that corresponds to the instance.
|
217
|
-
# @option opts [String] :name The human-readable name of the instance.
|
218
|
-
# @option opts [String] :resource_group_id Short ID of a resource group.
|
219
|
-
# @option opts [String] :resource_id The unique ID of the offering. This value is provided by and stored in the global catalog.
|
220
|
-
# @option opts [String] :resource_plan_id The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog.
|
221
|
-
# @option opts [String] :type The type of the instance. For example, `service_instance`.
|
222
|
-
# @option opts [String] :sub_type The sub-type of instance, e.g. `cfaas`.
|
223
|
-
# @option opts [String] :limit Limit on how many items should be returned.
|
224
|
-
# @option opts [String] :updated_from Start date inclusive filter.
|
225
|
-
# @option opts [String] :updated_to End date inclusive filter.
|
226
|
-
# @return [ResourceInstancesList]
|
227
|
-
def list_resource_instances(opts = {})
|
228
|
-
data, _status_code, _headers = list_resource_instances_with_http_info(opts)
|
229
|
-
data
|
230
|
-
end
|
231
|
-
|
232
|
-
# Get a list of all resource instances
|
233
|
-
# Get a list of all resource instances.
|
234
|
-
# @param [Hash] opts the optional parameters
|
235
|
-
# @option opts [String] :guid When you provision a new resource in the specified location for the selected plan, a GUID (globally unique identifier) is created. This is a unique internal GUID managed by Resource controller that corresponds to the instance.
|
236
|
-
# @option opts [String] :name The human-readable name of the instance.
|
237
|
-
# @option opts [String] :resource_group_id Short ID of a resource group.
|
238
|
-
# @option opts [String] :resource_id The unique ID of the offering. This value is provided by and stored in the global catalog.
|
239
|
-
# @option opts [String] :resource_plan_id The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog.
|
240
|
-
# @option opts [String] :type The type of the instance. For example, `service_instance`.
|
241
|
-
# @option opts [String] :sub_type The sub-type of instance, e.g. `cfaas`.
|
242
|
-
# @option opts [String] :limit Limit on how many items should be returned.
|
243
|
-
# @option opts [String] :updated_from Start date inclusive filter.
|
244
|
-
# @option opts [String] :updated_to End date inclusive filter.
|
245
|
-
# @return [Array<(ResourceInstancesList, Integer, Hash)>] ResourceInstancesList data, response status code and response headers
|
246
|
-
def list_resource_instances_with_http_info(opts = {})
|
247
|
-
if @api_client.config.debugging
|
248
|
-
@api_client.config.logger.debug 'Calling API: ResourceInstancesApi.list_resource_instances ...'
|
249
|
-
end
|
250
|
-
# resource path
|
251
|
-
local_var_path = '/v2/resource_instances'
|
252
|
-
|
253
|
-
# query parameters
|
254
|
-
query_params = opts[:query_params] || {}
|
255
|
-
query_params[:'guid'] = opts[:'guid'] if !opts[:'guid'].nil?
|
256
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
257
|
-
query_params[:'resource_group_id'] = opts[:'resource_group_id'] if !opts[:'resource_group_id'].nil?
|
258
|
-
query_params[:'resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil?
|
259
|
-
query_params[:'resource_plan_id'] = opts[:'resource_plan_id'] if !opts[:'resource_plan_id'].nil?
|
260
|
-
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
261
|
-
query_params[:'sub_type'] = opts[:'sub_type'] if !opts[:'sub_type'].nil?
|
262
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
263
|
-
query_params[:'updated_from'] = opts[:'updated_from'] if !opts[:'updated_from'].nil?
|
264
|
-
query_params[:'updated_to'] = opts[:'updated_to'] if !opts[:'updated_to'].nil?
|
265
|
-
|
266
|
-
# header parameters
|
267
|
-
header_params = opts[:header_params] || {}
|
268
|
-
# HTTP header 'Accept' (if needed)
|
269
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
270
|
-
|
271
|
-
# form parameters
|
272
|
-
form_params = opts[:form_params] || {}
|
273
|
-
|
274
|
-
# http body (model)
|
275
|
-
post_body = opts[:body]
|
276
|
-
|
277
|
-
# return_type
|
278
|
-
return_type = opts[:return_type] || 'ResourceInstancesList'
|
279
|
-
|
280
|
-
# auth_names
|
281
|
-
auth_names = opts[:auth_names] || ['IAM']
|
282
|
-
|
283
|
-
new_options = opts.merge(
|
284
|
-
:header_params => header_params,
|
285
|
-
:query_params => query_params,
|
286
|
-
:form_params => form_params,
|
287
|
-
:body => post_body,
|
288
|
-
:auth_names => auth_names,
|
289
|
-
:return_type => return_type
|
290
|
-
)
|
291
|
-
|
292
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
293
|
-
if @api_client.config.debugging
|
294
|
-
@api_client.config.logger.debug "API called: ResourceInstancesApi#list_resource_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
295
|
-
end
|
296
|
-
return data, status_code, headers
|
297
|
-
end
|
298
|
-
|
299
|
-
# Lock a resource instance
|
300
|
-
# Locks a resource instance by ID. A locked instance can not be updated or deleted. It does not affect actions performed on child resources like aliases, bindings or keys.
|
301
|
-
# @param id [String] The short or long ID of the instance.
|
302
|
-
# @param [Hash] opts the optional parameters
|
303
|
-
# @return [ResourceInstance]
|
304
|
-
def lock_resource_instance(id, opts = {})
|
305
|
-
data, _status_code, _headers = lock_resource_instance_with_http_info(id, opts)
|
306
|
-
data
|
307
|
-
end
|
308
|
-
|
309
|
-
# Lock a resource instance
|
310
|
-
# Locks a resource instance by ID. A locked instance can not be updated or deleted. It does not affect actions performed on child resources like aliases, bindings or keys.
|
311
|
-
# @param id [String] The short or long ID of the instance.
|
312
|
-
# @param [Hash] opts the optional parameters
|
313
|
-
# @return [Array<(ResourceInstance, Integer, Hash)>] ResourceInstance data, response status code and response headers
|
314
|
-
def lock_resource_instance_with_http_info(id, opts = {})
|
315
|
-
if @api_client.config.debugging
|
316
|
-
@api_client.config.logger.debug 'Calling API: ResourceInstancesApi.lock_resource_instance ...'
|
317
|
-
end
|
318
|
-
# verify the required parameter 'id' is set
|
319
|
-
if @api_client.config.client_side_validation && id.nil?
|
320
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceInstancesApi.lock_resource_instance"
|
321
|
-
end
|
322
|
-
# resource path
|
323
|
-
local_var_path = '/v2/resource_instances/{id}/lock'.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
|
-
|
333
|
-
# form parameters
|
334
|
-
form_params = opts[:form_params] || {}
|
335
|
-
|
336
|
-
# http body (model)
|
337
|
-
post_body = opts[:body]
|
338
|
-
|
339
|
-
# return_type
|
340
|
-
return_type = opts[:return_type] || 'ResourceInstance'
|
341
|
-
|
342
|
-
# auth_names
|
343
|
-
auth_names = opts[:auth_names] || ['IAM']
|
344
|
-
|
345
|
-
new_options = opts.merge(
|
346
|
-
:header_params => header_params,
|
347
|
-
:query_params => query_params,
|
348
|
-
:form_params => form_params,
|
349
|
-
:body => post_body,
|
350
|
-
:auth_names => auth_names,
|
351
|
-
:return_type => return_type
|
352
|
-
)
|
353
|
-
|
354
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
355
|
-
if @api_client.config.debugging
|
356
|
-
@api_client.config.logger.debug "API called: ResourceInstancesApi#lock_resource_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
357
|
-
end
|
358
|
-
return data, status_code, headers
|
359
|
-
end
|
360
|
-
|
361
|
-
# Unlock a resource instance
|
362
|
-
# Unlocks a resource instance by ID.
|
363
|
-
# @param id [String] The short or long ID of the instance.
|
364
|
-
# @param [Hash] opts the optional parameters
|
365
|
-
# @return [ResourceInstance]
|
366
|
-
def unlock_resource_instance(id, opts = {})
|
367
|
-
data, _status_code, _headers = unlock_resource_instance_with_http_info(id, opts)
|
368
|
-
data
|
369
|
-
end
|
370
|
-
|
371
|
-
# Unlock a resource instance
|
372
|
-
# Unlocks a resource instance by ID.
|
373
|
-
# @param id [String] The short or long ID of the instance.
|
374
|
-
# @param [Hash] opts the optional parameters
|
375
|
-
# @return [Array<(ResourceInstance, Integer, Hash)>] ResourceInstance data, response status code and response headers
|
376
|
-
def unlock_resource_instance_with_http_info(id, opts = {})
|
377
|
-
if @api_client.config.debugging
|
378
|
-
@api_client.config.logger.debug 'Calling API: ResourceInstancesApi.unlock_resource_instance ...'
|
379
|
-
end
|
380
|
-
# verify the required parameter 'id' is set
|
381
|
-
if @api_client.config.client_side_validation && id.nil?
|
382
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceInstancesApi.unlock_resource_instance"
|
383
|
-
end
|
384
|
-
# resource path
|
385
|
-
local_var_path = '/v2/resource_instances/{id}/lock'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
386
|
-
|
387
|
-
# query parameters
|
388
|
-
query_params = opts[:query_params] || {}
|
389
|
-
|
390
|
-
# header parameters
|
391
|
-
header_params = opts[:header_params] || {}
|
392
|
-
# HTTP header 'Accept' (if needed)
|
393
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
394
|
-
|
395
|
-
# form parameters
|
396
|
-
form_params = opts[:form_params] || {}
|
397
|
-
|
398
|
-
# http body (model)
|
399
|
-
post_body = opts[:body]
|
400
|
-
|
401
|
-
# return_type
|
402
|
-
return_type = opts[:return_type] || 'ResourceInstance'
|
403
|
-
|
404
|
-
# auth_names
|
405
|
-
auth_names = opts[:auth_names] || ['IAM']
|
406
|
-
|
407
|
-
new_options = opts.merge(
|
408
|
-
:header_params => header_params,
|
409
|
-
:query_params => query_params,
|
410
|
-
:form_params => form_params,
|
411
|
-
:body => post_body,
|
412
|
-
:auth_names => auth_names,
|
413
|
-
:return_type => return_type
|
414
|
-
)
|
415
|
-
|
416
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
417
|
-
if @api_client.config.debugging
|
418
|
-
@api_client.config.logger.debug "API called: ResourceInstancesApi#unlock_resource_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
419
|
-
end
|
420
|
-
return data, status_code, headers
|
421
|
-
end
|
422
|
-
|
423
|
-
# Update a resource instance
|
424
|
-
# Update a resource instance by ID.
|
425
|
-
# @param id [String] The short or long ID of the instance.
|
426
|
-
# @param resource_instance_patch [ResourceInstancePatch]
|
427
|
-
# @param [Hash] opts the optional parameters
|
428
|
-
# @return [ResourceInstance]
|
429
|
-
def update_resource_instance(id, resource_instance_patch, opts = {})
|
430
|
-
data, _status_code, _headers = update_resource_instance_with_http_info(id, resource_instance_patch, opts)
|
431
|
-
data
|
432
|
-
end
|
433
|
-
|
434
|
-
# Update a resource instance
|
435
|
-
# Update a resource instance by ID.
|
436
|
-
# @param id [String] The short or long ID of the instance.
|
437
|
-
# @param resource_instance_patch [ResourceInstancePatch]
|
438
|
-
# @param [Hash] opts the optional parameters
|
439
|
-
# @return [Array<(ResourceInstance, Integer, Hash)>] ResourceInstance data, response status code and response headers
|
440
|
-
def update_resource_instance_with_http_info(id, resource_instance_patch, opts = {})
|
441
|
-
if @api_client.config.debugging
|
442
|
-
@api_client.config.logger.debug 'Calling API: ResourceInstancesApi.update_resource_instance ...'
|
443
|
-
end
|
444
|
-
# verify the required parameter 'id' is set
|
445
|
-
if @api_client.config.client_side_validation && id.nil?
|
446
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ResourceInstancesApi.update_resource_instance"
|
447
|
-
end
|
448
|
-
# verify the required parameter 'resource_instance_patch' is set
|
449
|
-
if @api_client.config.client_side_validation && resource_instance_patch.nil?
|
450
|
-
fail ArgumentError, "Missing the required parameter 'resource_instance_patch' when calling ResourceInstancesApi.update_resource_instance"
|
451
|
-
end
|
452
|
-
# resource path
|
453
|
-
local_var_path = '/v2/resource_instances/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
454
|
-
|
455
|
-
# query parameters
|
456
|
-
query_params = opts[:query_params] || {}
|
457
|
-
|
458
|
-
# header parameters
|
459
|
-
header_params = opts[:header_params] || {}
|
460
|
-
# HTTP header 'Accept' (if needed)
|
461
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
462
|
-
# HTTP header 'Content-Type'
|
463
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
464
|
-
|
465
|
-
# form parameters
|
466
|
-
form_params = opts[:form_params] || {}
|
467
|
-
|
468
|
-
# http body (model)
|
469
|
-
post_body = opts[:body] || @api_client.object_to_http_body(resource_instance_patch)
|
470
|
-
|
471
|
-
# return_type
|
472
|
-
return_type = opts[:return_type] || 'ResourceInstance'
|
473
|
-
|
474
|
-
# auth_names
|
475
|
-
auth_names = opts[:auth_names] || ['IAM']
|
476
|
-
|
477
|
-
new_options = opts.merge(
|
478
|
-
:header_params => header_params,
|
479
|
-
:query_params => query_params,
|
480
|
-
:form_params => form_params,
|
481
|
-
:body => post_body,
|
482
|
-
:auth_names => auth_names,
|
483
|
-
:return_type => return_type
|
484
|
-
)
|
485
|
-
|
486
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
487
|
-
if @api_client.config.debugging
|
488
|
-
@api_client.config.logger.debug "API called: ResourceInstancesApi#update_resource_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
489
|
-
end
|
490
|
-
return data, status_code, headers
|
491
|
-
end
|
492
|
-
end
|
493
|
-
end
|