Class: NutanixVmm::ImagesApi
- Inherits:
-
Object
- Object
- NutanixVmm::ImagesApi
- Defined in:
- lib/nutanix_vmm/api/images_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_image(ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ CreateImage202Response
Create an image Creates an image using the provided request body.
-
#create_image_with_http_info(ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ Array<(CreateImage202Response, Integer, Hash)>
Create an image Creates an image using the provided request body.
-
#delete_image_by_id(ext_id, opts = {}) ⇒ DeleteImageById202Response
Delete an image Deletes the image with the given external identifier.
-
#delete_image_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(DeleteImageById202Response, Integer, Hash)>
Delete an image Deletes the image with the given external identifier.
-
#get_file_by_image_id(image_ext_id, opts = {}) ⇒ nil
Download an image Downloads the image with the given external identifier.
-
#get_file_by_image_id_with_http_info(image_ext_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Download an image Downloads the image with the given external identifier.
-
#get_image_by_id(ext_id, opts = {}) ⇒ GetImageById200Response
Get an image Retrieves the image details for the provided external identifier.
-
#get_image_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetImageById200Response, Integer, Hash)>
Get an image Retrieves the image details for the provided external identifier.
-
#import_image(ntnx_request_id, vmm_v40_content_image_import_config, opts = {}) ⇒ ImportImage202Response
Import images from Prism Element Imports images owned by a registered Prism Element cluster into the current Prism Central.
-
#import_image_with_http_info(ntnx_request_id, vmm_v40_content_image_import_config, opts = {}) ⇒ Array<(ImportImage202Response, Integer, Hash)>
Import images from Prism Element Imports images owned by a registered Prism Element cluster into the current Prism Central.
-
#initialize(api_client = ApiClient.default) ⇒ ImagesApi
constructor
A new instance of ImagesApi.
-
#list_images(opts = {}) ⇒ ListImages200Response
List images Lists images owned by Prism Central, along with image details such as name, description, type, and so on.
-
#list_images_with_http_info(opts = {}) ⇒ Array<(ListImages200Response, Integer, Hash)>
List images Lists images owned by Prism Central, along with image details such as name, description, type, and so on.
-
#update_image_by_id(ext_id, if_match, ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ UpdateImageById202Response
Update an image Updates the image with the given external identifier.
-
#update_image_by_id_with_http_info(ext_id, if_match, ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ Array<(UpdateImageById202Response, Integer, Hash)>
Update an image Updates the image with the given external identifier.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_image(ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ CreateImage202Response
Create an image Creates an image using the provided request body. The name, type and source are mandatory fields to create an image.
28 29 30 31 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 28 def create_image(ntnx_request_id, vmm_v40_content_image, opts = {}) data, _status_code, _headers = create_image_with_http_info(ntnx_request_id, vmm_v40_content_image, opts) data end |
#create_image_with_http_info(ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ Array<(CreateImage202Response, Integer, Hash)>
Create an image Creates an image using the provided request body. The name, type and source are mandatory fields to create an image.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 39 def create_image_with_http_info(ntnx_request_id, vmm_v40_content_image, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ImagesApi.create_image ...' end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ImagesApi.create_image" end # verify the required parameter 'vmm_v40_content_image' is set if @api_client.config.client_side_validation && vmm_v40_content_image.nil? fail ArgumentError, "Missing the required parameter 'vmm_v40_content_image' when calling ImagesApi.create_image" end # resource path local_var_path = '/vmm/v4.0/content/images' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(vmm_v40_content_image) # return_type return_type = opts[:debug_return_type] || 'CreateImage202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ImagesApi.create_image", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#create_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_image_by_id(ext_id, opts = {}) ⇒ DeleteImageById202Response
Delete an image Deletes the image with the given external identifier.
102 103 104 105 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 102 def delete_image_by_id(ext_id, opts = {}) data, _status_code, _headers = delete_image_by_id_with_http_info(ext_id, opts) data end |
#delete_image_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(DeleteImageById202Response, Integer, Hash)>
Delete an image Deletes the image with the given external identifier.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 112 def delete_image_by_id_with_http_info(ext_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ImagesApi.delete_image_by_id ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ImagesApi.delete_image_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ImagesApi.delete_image_by_id, must conform to the pattern #{pattern}." end # resource path local_var_path = '/vmm/v4.0/content/images/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteImageById202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ImagesApi.delete_image_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#delete_image_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_file_by_image_id(image_ext_id, opts = {}) ⇒ nil
Download an image Downloads the image with the given external identifier.
170 171 172 173 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 170 def get_file_by_image_id(image_ext_id, opts = {}) get_file_by_image_id_with_http_info(image_ext_id, opts) nil end |
#get_file_by_image_id_with_http_info(image_ext_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Download an image Downloads the image with the given external identifier.
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 180 def get_file_by_image_id_with_http_info(image_ext_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ImagesApi.get_file_by_image_id ...' end # verify the required parameter 'image_ext_id' is set if @api_client.config.client_side_validation && image_ext_id.nil? fail ArgumentError, "Missing the required parameter 'image_ext_id' when calling ImagesApi.get_file_by_image_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && image_ext_id !~ pattern fail ArgumentError, "invalid value for 'image_ext_id' when calling ImagesApi.get_file_by_image_id, must conform to the pattern #{pattern}." end # resource path local_var_path = '/vmm/v4.0/content/images/{imageExtId}/file'.sub('{' + 'imageExtId' + '}', CGI.escape(image_ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ImagesApi.get_file_by_image_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#get_file_by_image_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_image_by_id(ext_id, opts = {}) ⇒ GetImageById200Response
Get an image Retrieves the image details for the provided external identifier.
238 239 240 241 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 238 def get_image_by_id(ext_id, opts = {}) data, _status_code, _headers = get_image_by_id_with_http_info(ext_id, opts) data end |
#get_image_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetImageById200Response, Integer, Hash)>
Get an image Retrieves the image details for the provided external identifier.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 248 def get_image_by_id_with_http_info(ext_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ImagesApi.get_image_by_id ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ImagesApi.get_image_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ImagesApi.get_image_by_id, must conform to the pattern #{pattern}." end # resource path local_var_path = '/vmm/v4.0/content/images/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetImageById200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ImagesApi.get_image_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#get_image_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#import_image(ntnx_request_id, vmm_v40_content_image_import_config, opts = {}) ⇒ ImportImage202Response
Import images from Prism Element Imports images owned by a registered Prism Element cluster into the current Prism Central.
307 308 309 310 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 307 def import_image(ntnx_request_id, vmm_v40_content_image_import_config, opts = {}) data, _status_code, _headers = import_image_with_http_info(ntnx_request_id, vmm_v40_content_image_import_config, opts) data end |
#import_image_with_http_info(ntnx_request_id, vmm_v40_content_image_import_config, opts = {}) ⇒ Array<(ImportImage202Response, Integer, Hash)>
Import images from Prism Element Imports images owned by a registered Prism Element cluster into the current Prism Central.
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 318 def import_image_with_http_info(ntnx_request_id, vmm_v40_content_image_import_config, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ImagesApi.import_image ...' end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ImagesApi.import_image" end # verify the required parameter 'vmm_v40_content_image_import_config' is set if @api_client.config.client_side_validation && vmm_v40_content_image_import_config.nil? fail ArgumentError, "Missing the required parameter 'vmm_v40_content_image_import_config' when calling ImagesApi.import_image" end # resource path local_var_path = '/vmm/v4.0/content/images/$actions/import' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(vmm_v40_content_image_import_config) # return_type return_type = opts[:debug_return_type] || 'ImportImage202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ImagesApi.import_image", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#import_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_images(opts = {}) ⇒ ListImages200Response
List images Lists images owned by Prism Central, along with image details such as name, description, type, and so on. This API supports operation such as filtering, sorting, selection, and pagination.
385 386 387 388 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 385 def list_images(opts = {}) data, _status_code, _headers = list_images_with_http_info(opts) data end |
#list_images_with_http_info(opts = {}) ⇒ Array<(ListImages200Response, Integer, Hash)>
List images Lists images owned by Prism Central, along with image details such as name, description, type, and so on. This API supports operation such as filtering, sorting, selection, and pagination.
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 399 def list_images_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ImagesApi.list_images ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ImagesApi.list_images, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ImagesApi.list_images, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ImagesApi.list_images, must be greater than or equal to 1.' end # resource path local_var_path = '/vmm/v4.0/content/images' # query parameters query_params = opts[:query_params] || {} query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil? query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListImages200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ImagesApi.list_images", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#list_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_image_by_id(ext_id, if_match, ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ UpdateImageById202Response
Update an image Updates the image with the given external identifier. It is always recommended to perform a GET operation on a resource before performing a PUT operation to ensure that the correct ETag is used.
468 469 470 471 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 468 def update_image_by_id(ext_id, if_match, ntnx_request_id, vmm_v40_content_image, opts = {}) data, _status_code, _headers = update_image_by_id_with_http_info(ext_id, if_match, ntnx_request_id, vmm_v40_content_image, opts) data end |
#update_image_by_id_with_http_info(ext_id, if_match, ntnx_request_id, vmm_v40_content_image, opts = {}) ⇒ Array<(UpdateImageById202Response, Integer, Hash)>
Update an image Updates the image with the given external identifier. It is always recommended to perform a GET operation on a resource before performing a PUT operation to ensure that the correct ETag is used.
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 |
# File 'lib/nutanix_vmm/api/images_api.rb', line 481 def update_image_by_id_with_http_info(ext_id, if_match, ntnx_request_id, vmm_v40_content_image, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ImagesApi.update_image_by_id ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ImagesApi.update_image_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ImagesApi.update_image_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'if_match' is set if @api_client.config.client_side_validation && if_match.nil? fail ArgumentError, "Missing the required parameter 'if_match' when calling ImagesApi.update_image_by_id" end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ImagesApi.update_image_by_id" end # verify the required parameter 'vmm_v40_content_image' is set if @api_client.config.client_side_validation && vmm_v40_content_image.nil? fail ArgumentError, "Missing the required parameter 'vmm_v40_content_image' when calling ImagesApi.update_image_by_id" end # resource path local_var_path = '/vmm/v4.0/content/images/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'If-Match'] = if_match header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(vmm_v40_content_image) # return_type return_type = opts[:debug_return_type] || 'UpdateImageById202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ImagesApi.update_image_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ImagesApi#update_image_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |