class IbmCloudPower::PCloudVolumesApi
Attributes
Public Class Methods
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete a cloud instance volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Object]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 27 def pcloud_cloudinstances_volumes_delete(cloud_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts) data end
Delete a cloud instance volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 37 def pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_delete ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_delete" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_delete" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Detailed information of a volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Volume]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 93 def pcloud_cloudinstances_volumes_get(cloud_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts) data end
Detailed information of a volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Array<(Volume
, Integer, Hash)>] Volume
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 103 def pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_get" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_get" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List all volumes for this cloud instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @option opts [String] :affinity A pvmInstance (id or name), limits a volumes list response to only volumes that have affinity to the pvmInstance @return [Volumes]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 159 def pcloud_cloudinstances_volumes_getall(cloud_instance_id, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts) data end
List all volumes for this cloud instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @option opts [String] :affinity A pvmInstance (id or name), limits a volumes list response to only volumes that have affinity to the pvmInstance @return [Array<(Volumes
, Integer, Hash)>] Volumes
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 169 def pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_getall" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'affinity'] = opts[:'affinity'] if !opts[:'affinity'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volumes' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new data volume All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [CreateDataVolume] Parameters for the creation of a new data volume @param [Hash] opts the optional parameters @return [Volume]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 223 def pcloud_cloudinstances_volumes_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts) data end
Create a new data volume All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [CreateDataVolume] Parameters for the creation of a new data volume @param [Hash] opts the optional parameters @return [Array<(Volume
, Integer, Hash)>] Volume
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 234 def pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a cloud instance volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volume_id [String] Volume
ID @param body [UpdateVolume] Parameters to update a cloud instance volume @param [Hash] opts the optional parameters @return [Volume]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 293 def pcloud_cloudinstances_volumes_put(cloud_instance_id, volume_id, body, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts) data end
Update a cloud instance volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volume_id [String] Volume
ID @param body [UpdateVolume] Parameters to update a cloud instance volume @param [Hash] opts the optional parameters @return [Array<(Volume
, Integer, Hash)>] Volume
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 304 def pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Detach a volume from a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Object]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 367 def pcloud_pvminstances_volumes_delete(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end
Detach a volume from a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 378 def pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_delete ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Detailed information of a volume attached to a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Volume]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 439 def pcloud_pvminstances_volumes_get(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end
Detailed information of a volume attached to a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Array<(Volume
, Integer, Hash)>] Volume
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 450 def pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List all volumes attached to a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param [Hash] opts the optional parameters @return [Volumes]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 510 def pcloud_pvminstances_volumes_getall(cloud_instance_id, pvm_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts) data end
List all volumes attached to a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param [Hash] opts the optional parameters @return [Array<(Volumes
, Integer, Hash)>] Volumes
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 520 def pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_getall" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_getall" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volumes' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Attach a volume to a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Object]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 577 def pcloud_pvminstances_volumes_post(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end
Attach a volume to a PVM Instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 588 def pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a volume attached to a PVMInstance
@param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param body [PVMInstanceVolumeUpdate] Parameters to update a volume attached to a PVMInstance
@param [Hash] opts the optional parameters @return [Object]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 650 def pcloud_pvminstances_volumes_put(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts) data end
Update a volume attached to a PVMInstance
@param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param body [PVMInstanceVolumeUpdate] Parameters to update a volume attached to a PVMInstance
@param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 662 def pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Set the PVMInstance
volume as the boot volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Object]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 729 def pcloud_pvminstances_volumes_setboot_put(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end
Set the PVMInstance
volume as the boot volume @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param pvm_instance_id [String] PCloud PVM Instance ID @param volume_id [String] Volume
ID @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 740 def pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_setboot_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a volume clone for specified volumes (version 2) @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [VolumesCloneAsyncRequest] Parameters for the cloning of volumes @param [Hash] opts the optional parameters @return [CloneTaskReference]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 800 def pcloud_v2_volumes_clone_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts) data end
Create a volume clone for specified volumes (version 2) @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [VolumesCloneAsyncRequest] Parameters for the cloning of volumes @param [Hash] opts the optional parameters @return [Array<(CloneTaskReference
, Integer, Hash)>] CloneTaskReference
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 810 def pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_clone_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clone_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumes_clone_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'CloneTaskReference' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumes_clone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the status of a volume clone request for the specified clone task ID @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param clone_task_id [String] Volumes
Clone Task
ID @param [Hash] opts the optional parameters @return [CloneTaskStatus]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 868 def pcloud_v2_volumes_clonetasks_get(cloud_instance_id, clone_task_id, opts = {}) data, _status_code, _headers = pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts) data end
Get the status of a volume clone request for the specified clone task ID @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param clone_task_id [String] Volumes
Clone Task
ID @param [Hash] opts the optional parameters @return [Array<(CloneTaskStatus
, Integer, Hash)>] CloneTaskStatus
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 878 def pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get" end # verify the required parameter 'clone_task_id' is set if @api_client.config.client_side_validation && clone_task_id.nil? fail ArgumentError, "Missing the required parameter 'clone_task_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'clone_task_id' + '}', CGI.escape(clone_task_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CloneTaskStatus' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumes_clonetasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create multiple data volumes from a single definition @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [MultiVolumesCreate] Parameters for creating multiple volumes @param [Hash] opts the optional parameters @return [Volumes]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 934 def pcloud_v2_volumes_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts) data end
Create multiple data volumes from a single definition @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [MultiVolumesCreate] Parameters for creating multiple volumes @param [Hash] opts the optional parameters @return [Array<(Volumes
, Integer, Hash)>] Volumes
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 944 def pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumes_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Volumes' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Cancel a volume-clone request, initiates the Cleanup action. The Cleanup action performs the cleanup of the preparatory clones and snapshot volumes. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @option opts [VolumesCloneCancel] :body Parameters for cancelling a volumes-clone request @return [VolumesClone]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1003 def pcloud_v2_volumesclone_cancel_post(cloud_instance_id, volumes_clone_id, opts = {}) data, _status_code, _headers = pcloud_v2_volumesclone_cancel_post_with_http_info(cloud_instance_id, volumes_clone_id, opts) data end
Cancel a volume-clone request, initiates the Cleanup action. The Cleanup action performs the cleanup of the preparatory clones and snapshot volumes. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @option opts [VolumesCloneCancel] :body Parameters for cancelling a volumes-clone request @return [Array<(VolumesClone
, Integer, Hash)>] VolumesClone
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1014 def pcloud_v2_volumesclone_cancel_post_with_http_info(cloud_instance_id, volumes_clone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_cancel_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_cancel_post" end # verify the required parameter 'volumes_clone_id' is set if @api_client.config.client_side_validation && volumes_clone_id.nil? fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_cancel_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'VolumesClone' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_cancel_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a volumes-clone request @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @return [Object]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1072 def pcloud_v2_volumesclone_delete(cloud_instance_id, volumes_clone_id, opts = {}) data, _status_code, _headers = pcloud_v2_volumesclone_delete_with_http_info(cloud_instance_id, volumes_clone_id, opts) data end
Delete a volumes-clone request @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1082 def pcloud_v2_volumesclone_delete_with_http_info(cloud_instance_id, volumes_clone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_delete ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_delete" end # verify the required parameter 'volumes_clone_id' is set if @api_client.config.client_side_validation && volumes_clone_id.nil? fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_delete" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Initiate the Execute action for a volumes-clone request. The Execute action creates the cloned volumes using the volume snapshots. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param body [VolumesCloneExecute] Parameters for the cloning of volumes @param [Hash] opts the optional parameters @return [VolumesClone]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1139 def pcloud_v2_volumesclone_execute_post(cloud_instance_id, volumes_clone_id, body, opts = {}) data, _status_code, _headers = pcloud_v2_volumesclone_execute_post_with_http_info(cloud_instance_id, volumes_clone_id, body, opts) data end
Initiate the Execute action for a volumes-clone request. The Execute action creates the cloned volumes using the volume snapshots. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param body [VolumesCloneExecute] Parameters for the cloning of volumes @param [Hash] opts the optional parameters @return [Array<(VolumesClone
, Integer, Hash)>] VolumesClone
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1150 def pcloud_v2_volumesclone_execute_post_with_http_info(cloud_instance_id, volumes_clone_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_execute_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_execute_post" end # verify the required parameter 'volumes_clone_id' is set if @api_client.config.client_side_validation && volumes_clone_id.nil? fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_execute_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumesclone_execute_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'VolumesClone' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_execute_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the details for a volumes-clone request @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @return [VolumesCloneDetail]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1212 def pcloud_v2_volumesclone_get(cloud_instance_id, volumes_clone_id, opts = {}) data, _status_code, _headers = pcloud_v2_volumesclone_get_with_http_info(cloud_instance_id, volumes_clone_id, opts) data end
Get the details for a volumes-clone request @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @return [Array<(VolumesCloneDetail
, Integer, Hash)>] VolumesCloneDetail
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1222 def pcloud_v2_volumesclone_get_with_http_info(cloud_instance_id, volumes_clone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_get" end # verify the required parameter 'volumes_clone_id' is set if @api_client.config.client_side_validation && volumes_clone_id.nil? fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_get" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'VolumesCloneDetail' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the list of volumes-clone request for a cloud instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @option opts [String] :filter volumes-clone filter to limit list items: prepare - includes status values (preparing, prepared) start - includes status values (starting, available) execute - includes status values (executing, available-rollback) cancel - includes status values (cancelling) completed - includes status values (completed) failed - includes status values (failed) cancelled - includes status values (cancelled) finalized - included status values (completed, failed, cancelled) @return [VolumesClones]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1278 def pcloud_v2_volumesclone_getall(cloud_instance_id, opts = {}) data, _status_code, _headers = pcloud_v2_volumesclone_getall_with_http_info(cloud_instance_id, opts) data end
Get the list of volumes-clone request for a cloud instance @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @option opts [String] :filter volumes-clone filter to limit list items: prepare - includes status values (preparing, prepared) start - includes status values (starting, available) execute - includes status values (executing, available-rollback) cancel - includes status values (cancelling) completed - includes status values (completed) failed - includes status values (failed) cancelled - includes status values (cancelled) finalized - included status values (completed, failed, cancelled) @return [Array<(VolumesClones
, Integer, Hash)>] VolumesClones
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1288 def pcloud_v2_volumesclone_getall_with_http_info(cloud_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_getall" end allowable_values = ["prepare", "start", "execute", "cancel", "completed", "failed", "cancelled", "finalized"] if @api_client.config.client_side_validation && opts[:'filter'] && !allowable_values.include?(opts[:'filter']) fail ArgumentError, "invalid value for \"filter\", must be one of #{allowable_values}" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'VolumesClones' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new volumes clone request and initiate the Prepare action @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [VolumesCloneCreate] Parameters for preparing a set of volumes to be cloned (This API requires a minimum of two volumes, a minimum of one volume to be in the 'in-use' state, and a unique volume clone name. The Prepare action does the preparatory work for creating the snapshot volumes.) @param [Hash] opts the optional parameters @return [VolumesClone]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1345 def pcloud_v2_volumesclone_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_v2_volumesclone_post_with_http_info(cloud_instance_id, body, opts) data end
Create a new volumes clone request and initiate the Prepare action @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [VolumesCloneCreate] Parameters for preparing a set of volumes to be cloned (This API requires a minimum of two volumes, a minimum of one volume to be in the 'in-use' state, and a unique volume clone name. The Prepare action does the preparatory work for creating the snapshot volumes.) @param [Hash] opts the optional parameters @return [Array<(VolumesClone
, Integer, Hash)>] VolumesClone
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1355 def pcloud_v2_volumesclone_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumesclone_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'VolumesClone' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Initiate the Start action for a volume-clone request. The Start action starts the consistency group to initiate the flash copy. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @return [VolumesClone]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1413 def pcloud_v2_volumesclone_start_post(cloud_instance_id, volumes_clone_id, opts = {}) data, _status_code, _headers = pcloud_v2_volumesclone_start_post_with_http_info(cloud_instance_id, volumes_clone_id, opts) data end
Initiate the Start action for a volume-clone request. The Start action starts the consistency group to initiate the flash copy. @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param volumes_clone_id [String] Volumes
Clone ID, can be identified by the volumes-clone id or the volumes-clone name @param [Hash] opts the optional parameters @return [Array<(VolumesClone
, Integer, Hash)>] VolumesClone
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1423 def pcloud_v2_volumesclone_start_post_with_http_info(cloud_instance_id, volumes_clone_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_start_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_start_post" end # verify the required parameter 'volumes_clone_id' is set if @api_client.config.client_side_validation && volumes_clone_id.nil? fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_start_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'VolumesClone' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_start_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a volume clone for specified volumes (version 1 - depricated) @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [VolumesCloneRequest] Parameters for the cloning of volumes @param [Hash] opts the optional parameters @return [VolumesCloneResponse]
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1479 def pcloud_volumes_clone_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts) data end
Create a volume clone for specified volumes (version 1 - depricated) @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param body [VolumesCloneRequest] Parameters for the cloning of volumes @param [Hash] opts the optional parameters @return [Array<(VolumesCloneResponse
, Integer, Hash)>] VolumesCloneResponse
data, response status code and response headers
# File lib/ibm_cloud_power/api/p_cloud_volumes_api.rb, line 1489 def pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_volumes_clone_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_volumes_clone_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_volumes_clone_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'VolumesCloneResponse' # auth_names auth_names = opts[:auth_names] || [] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_volumes_clone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end