Class: LinodeOpenapiClient::VolumesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/linode_openapi_client/api/volumes_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VolumesApi

Returns a new instance of VolumesApi.



19
20
21
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_volume(api_version, volume_id, opts = {}) ⇒ Object

Delete a volume Deletes a Volume you have permission to ‘read_write`. - __Deleting a Volume is a destructive action and cannot be undone.__ - Deleting stops billing for the Volume. You will be billed for time used within the billing period the Volume was active. - Volumes that are migrating cannot be deleted until the migration is finished. <<LB>> — - __CLI__. “` linode-cli volumes delete 12345 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to look up.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


28
29
30
31
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 28

def delete_volume(api_version, volume_id, opts = {})
  data, _status_code, _headers = delete_volume_with_http_info(api_version, volume_id, opts)
  data
end

#delete_volume_with_http_info(api_version, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete a volume Deletes a Volume you have permission to &#x60;read_write&#x60;. - __Deleting a Volume is a destructive action and cannot be undone.__ - Deleting stops billing for the Volume. You will be billed for time used within the billing period the Volume was active. - Volumes that are migrating cannot be deleted until the migration is finished. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes delete 12345 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to look up.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



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
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 39

def delete_volume_with_http_info(api_version, volume_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.delete_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.delete_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  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 VolumesApi.delete_volume"
  end
  # resource path
  local_var_path = '/{apiVersion}/volumes/{volumeId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'volumeId' + '}', 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']) 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] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.delete_volume",
    :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: VolumesApi#delete_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_volume(api_version, volume_id, opts = {}) ⇒ Volume

Get a volume Get information about a single Volume. <<LB>> — - __CLI__. “‘ linode-cli volumes view 12345 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to look up.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



104
105
106
107
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 104

def get_volume(api_version, volume_id, opts = {})
  data, _status_code, _headers = get_volume_with_http_info(api_version, volume_id, opts)
  data
end

#get_volume_with_http_info(api_version, volume_id, opts = {}) ⇒ Array<(Volume, Integer, Hash)>

Get a volume Get information about a single Volume. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes view 12345 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to look up.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:

  • (Array<(Volume, Integer, Hash)>)

    Volume data, response status code and response headers



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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 117

def get_volume_with_http_info(api_version, volume_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.get_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.get_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  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 VolumesApi.get_volume"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VolumesApi.get_volume, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling VolumesApi.get_volume, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 25
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling VolumesApi.get_volume, must be greater than or equal to 25.'
  end

  # resource path
  local_var_path = '/{apiVersion}/volumes/{volumeId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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] || 'Volume'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.get_volume",
    :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: VolumesApi#get_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_volumes(api_version, opts = {}) ⇒ GetVolumes200Response

List volumes Returns a paginated list of Volumes you have permission to view. <<LB>> — - __CLI__. “‘ linode-cli volumes list “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_only “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:



195
196
197
198
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 195

def get_volumes(api_version, opts = {})
  data, _status_code, _headers = get_volumes_with_http_info(api_version, opts)
  data
end

#get_volumes_with_http_info(api_version, opts = {}) ⇒ Array<(GetVolumes200Response, Integer, Hash)>

List volumes Returns a paginated list of Volumes you have permission to view. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes list &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_only &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of a collection to return. (default to 1)

  • :page_size (Integer)

    The number of items to return per page. (default to 100)

Returns:

  • (Array<(GetVolumes200Response, Integer, Hash)>)

    GetVolumes200Response data, response status code and response headers



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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
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
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 207

def get_volumes_with_http_info(api_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.get_volumes ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.get_volumes"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VolumesApi.get_volumes, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling VolumesApi.get_volumes, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 25
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling VolumesApi.get_volumes, must be greater than or equal to 25.'
  end

  # resource path
  local_var_path = '/{apiVersion}/volumes'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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] || 'GetVolumes200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.get_volumes",
    :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: VolumesApi#get_volumes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_attach_volume(api_version, volume_id, post_attach_volume_request, opts = {}) ⇒ Volume7

Attach a volume Attaches a Volume on your Account to an existing Linode on your Account. In order for this request to complete successfully, your User must have ‘read_write` permission to the Volume and `read_write` permission to the Linode. Additionally, the Volume and Linode must be located in the same Region. <<LB>> — - __CLI__. “` linode-cli volumes attach 12345 \ –linode_id 12346 \ –config_id 23456 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to attach.

  • post_attach_volume_request (PostAttachVolumeRequest)

    Volume to attach to a Linode.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



281
282
283
284
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 281

def post_attach_volume(api_version, volume_id, post_attach_volume_request, opts = {})
  data, _status_code, _headers = post_attach_volume_with_http_info(api_version, volume_id, post_attach_volume_request, opts)
  data
end

#post_attach_volume_with_http_info(api_version, volume_id, post_attach_volume_request, opts = {}) ⇒ Array<(Volume7, Integer, Hash)>

Attach a volume Attaches a Volume on your Account to an existing Linode on your Account. In order for this request to complete successfully, your User must have &#x60;read_write&#x60; permission to the Volume and &#x60;read_write&#x60; permission to the Linode. Additionally, the Volume and Linode must be located in the same Region. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes attach 12345 \ –linode_id 12346 \ –config_id 23456 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to attach.

  • post_attach_volume_request (PostAttachVolumeRequest)

    Volume to attach to a Linode.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume7, Integer, Hash)>)

    Volume7 data, response status code and response headers



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
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
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 293

def post_attach_volume_with_http_info(api_version, volume_id, post_attach_volume_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.post_attach_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.post_attach_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  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 VolumesApi.post_attach_volume"
  end
  # verify the required parameter 'post_attach_volume_request' is set
  if @api_client.config.client_side_validation && post_attach_volume_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_attach_volume_request' when calling VolumesApi.post_attach_volume"
  end
  # resource path
  local_var_path = '/{apiVersion}/volumes/{volumeId}/attach'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'volumeId' + '}', 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']) 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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(post_attach_volume_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume7'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.post_attach_volume",
    :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: VolumesApi#post_attach_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_clone_volume(api_version, volume_id, post_clone_volume_request, opts = {}) ⇒ Volume8

Clone a volume Creates a Volume on your Account. In order for this request to complete successfully, your User must have the ‘add_volumes` grant. The new Volume will have the same size and data as the source Volume. Creating a new Volume will incur a charge on your Account. - Only Volumes with a `status` of `active` can be cloned. <<LB>> — - __CLI__. “` linode-cli volumes clone 12345 \ –label my-volume “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to clone.

  • post_clone_volume_request (PostCloneVolumeRequest)

    The requested state your Volume will be cloned into.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



366
367
368
369
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 366

def post_clone_volume(api_version, volume_id, post_clone_volume_request, opts = {})
  data, _status_code, _headers = post_clone_volume_with_http_info(api_version, volume_id, post_clone_volume_request, opts)
  data
end

#post_clone_volume_with_http_info(api_version, volume_id, post_clone_volume_request, opts = {}) ⇒ Array<(Volume8, Integer, Hash)>

Clone a volume Creates a Volume on your Account. In order for this request to complete successfully, your User must have the &#x60;add_volumes&#x60; grant. The new Volume will have the same size and data as the source Volume. Creating a new Volume will incur a charge on your Account. - Only Volumes with a &#x60;status&#x60; of &#x60;active&#x60; can be cloned. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes clone 12345 \ –label my-volume &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to clone.

  • post_clone_volume_request (PostCloneVolumeRequest)

    The requested state your Volume will be cloned into.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume8, Integer, Hash)>)

    Volume8 data, response status code and response headers



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
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
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 378

def post_clone_volume_with_http_info(api_version, volume_id, post_clone_volume_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.post_clone_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.post_clone_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  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 VolumesApi.post_clone_volume"
  end
  # verify the required parameter 'post_clone_volume_request' is set
  if @api_client.config.client_side_validation && post_clone_volume_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_clone_volume_request' when calling VolumesApi.post_clone_volume"
  end
  # resource path
  local_var_path = '/{apiVersion}/volumes/{volumeId}/clone'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'volumeId' + '}', 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']) 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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(post_clone_volume_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume8'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.post_clone_volume",
    :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: VolumesApi#post_clone_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_detach_volume(api_version, volume_id, opts = {}) ⇒ Object

Detach a volume Detaches a Volume on your Account from a Linode on your Account. In order for this request to complete successfully, your User must have ‘read_write` access to the Volume and `read_write` access to the Linode. Volumes are automatically detached from deleted Linodes. <<LB>> — - __CLI__. “` linode-cli volumes detach 12345 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_write linodes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to detach.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


450
451
452
453
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 450

def post_detach_volume(api_version, volume_id, opts = {})
  data, _status_code, _headers = post_detach_volume_with_http_info(api_version, volume_id, opts)
  data
end

#post_detach_volume_with_http_info(api_version, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Detach a volume Detaches a Volume on your Account from a Linode on your Account. In order for this request to complete successfully, your User must have &#x60;read_write&#x60; access to the Volume and &#x60;read_write&#x60; access to the Linode. Volumes are automatically detached from deleted Linodes. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes detach 12345 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_write linodes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to detach.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
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
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 461

def post_detach_volume_with_http_info(api_version, volume_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.post_detach_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.post_detach_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  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 VolumesApi.post_detach_volume"
  end
  # resource path
  local_var_path = '/{apiVersion}/volumes/{volumeId}/detach'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'volumeId' + '}', 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']) 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] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.post_detach_volume",
    :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: VolumesApi#post_detach_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_resize_volume(api_version, volume_id, post_resize_volume_request, opts = {}) ⇒ Volume3

Resize a volume Resize an existing Volume on your Account. In order for this request to complete successfully, your User must have the ‘read_write` permissions to the Volume. - Volumes can only be resized up. - Only Volumes with a `status` of "active" can be resized. <<LB>> — - __CLI__. “` linode-cli volumes resize 12345 \ –size 30 “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to resize.

  • post_resize_volume_request (PostResizeVolumeRequest)

    The requested size to increase your Volume to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



525
526
527
528
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 525

def post_resize_volume(api_version, volume_id, post_resize_volume_request, opts = {})
  data, _status_code, _headers = post_resize_volume_with_http_info(api_version, volume_id, post_resize_volume_request, opts)
  data
end

#post_resize_volume_with_http_info(api_version, volume_id, post_resize_volume_request, opts = {}) ⇒ Array<(Volume3, Integer, Hash)>

Resize a volume Resize an existing Volume on your Account. In order for this request to complete successfully, your User must have the &#x60;read_write&#x60; permissions to the Volume. - Volumes can only be resized up. - Only Volumes with a &#x60;status&#x60; of &quot;active&quot; can be resized. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes resize 12345 \ –size 30 &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to resize.

  • post_resize_volume_request (PostResizeVolumeRequest)

    The requested size to increase your Volume to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume3, Integer, Hash)>)

    Volume3 data, response status code and response headers



537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 537

def post_resize_volume_with_http_info(api_version, volume_id, post_resize_volume_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.post_resize_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.post_resize_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  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 VolumesApi.post_resize_volume"
  end
  # verify the required parameter 'post_resize_volume_request' is set
  if @api_client.config.client_side_validation && post_resize_volume_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_resize_volume_request' when calling VolumesApi.post_resize_volume"
  end
  # resource path
  local_var_path = '/{apiVersion}/volumes/{volumeId}/resize'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'volumeId' + '}', 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']) 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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(post_resize_volume_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume3'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.post_resize_volume",
    :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: VolumesApi#post_resize_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_volume(api_version, post_volume_request, opts = {}) ⇒ Volume5

Create a volume Creates a Volume on your Account. In order for this to complete successfully, your User must have the ‘add_volumes` grant. Creating a new Volume will start accruing additional charges on your account. <<LB>> — - __CLI__. “` linode-cli volumes create \ –label my-volume \ –size 20 \ –linode_id 12346 \ –no-defaults “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_volume_request (PostVolumeRequest)

    The requested initial state of a new Volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



609
610
611
612
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 609

def post_volume(api_version, post_volume_request, opts = {})
  data, _status_code, _headers = post_volume_with_http_info(api_version, post_volume_request, opts)
  data
end

#post_volume_with_http_info(api_version, post_volume_request, opts = {}) ⇒ Array<(Volume5, Integer, Hash)>

Create a volume Creates a Volume on your Account. In order for this to complete successfully, your User must have the &#x60;add_volumes&#x60; grant. Creating a new Volume will start accruing additional charges on your account. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes create \ –label my-volume \ –size 20 \ –linode_id 12346 \ –no-defaults &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • post_volume_request (PostVolumeRequest)

    The requested initial state of a new Volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume5, Integer, Hash)>)

    Volume5 data, response status code and response headers



620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 620

def post_volume_with_http_info(api_version, post_volume_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.post_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.post_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'post_volume_request' is set
  if @api_client.config.client_side_validation && post_volume_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_volume_request' when calling VolumesApi.post_volume"
  end
  # resource path
  local_var_path = '/{apiVersion}/volumes'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(post_volume_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume5'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.post_volume",
    :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: VolumesApi#post_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_volume(api_version, volume_id, put_volume_request, opts = {}) ⇒ Volume1

Update a volume Updates a Volume that you have permission to ‘read_write`. <<LB>> — - __CLI__. “` linode-cli volumes update 12345 \ –label my_volume “` [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. “` volumes:read_write “` [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to look up.

  • put_volume_request (PutVolumeRequest)

    If any updated field fails to pass validation, the Volume will not be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



689
690
691
692
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 689

def put_volume(api_version, volume_id, put_volume_request, opts = {})
  data, _status_code, _headers = put_volume_with_http_info(api_version, volume_id, put_volume_request, opts)
  data
end

#put_volume_with_http_info(api_version, volume_id, put_volume_request, opts = {}) ⇒ Array<(Volume1, Integer, Hash)>

Update a volume Updates a Volume that you have permission to &#x60;read_write&#x60;. &lt;&lt;LB&gt;&gt; — - __CLI__. &#x60;&#x60;&#x60; linode-cli volumes update 12345 \ –label my_volume &#x60;&#x60;&#x60; [Learn more…](www.linode.com/docs/products/tools/cli/get-started/) - __OAuth scopes__. &#x60;&#x60;&#x60; volumes:read_write &#x60;&#x60;&#x60; [Learn more…](techdocs.akamai.com/linode-api/reference/get-started#oauth)

Parameters:

  • api_version (String)

    __Enum__ Call either the &#x60;v4&#x60; URL, or &#x60;v4beta&#x60; for operations still in Beta.

  • volume_id (Integer)

    ID of the Volume to look up.

  • put_volume_request (PutVolumeRequest)

    If any updated field fails to pass validation, the Volume will not be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume1, Integer, Hash)>)

    Volume1 data, response status code and response headers



701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
# File 'lib/linode_openapi_client/api/volumes_api.rb', line 701

def put_volume_with_http_info(api_version, volume_id, put_volume_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VolumesApi.put_volume ...'
  end
  # verify the required parameter 'api_version' is set
  if @api_client.config.client_side_validation && api_version.nil?
    fail ArgumentError, "Missing the required parameter 'api_version' when calling VolumesApi.put_volume"
  end
  # verify enum value
  allowable_values = ["v4", "v4beta"]
  if @api_client.config.client_side_validation && !allowable_values.include?(api_version)
    fail ArgumentError, "invalid value for \"api_version\", must be one of #{allowable_values}"
  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 VolumesApi.put_volume"
  end
  # verify the required parameter 'put_volume_request' is set
  if @api_client.config.client_side_validation && put_volume_request.nil?
    fail ArgumentError, "Missing the required parameter 'put_volume_request' when calling VolumesApi.put_volume"
  end
  # resource path
  local_var_path = '/{apiVersion}/volumes/{volumeId}'.sub('{' + 'apiVersion' + '}', CGI.escape(api_version.to_s)).sub('{' + 'volumeId' + '}', 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']) 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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(put_volume_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume1'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['personalAccessToken', 'oauth']

  new_options = opts.merge(
    :operation => :"VolumesApi.put_volume",
    :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: VolumesApi#put_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end