All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
create_iso | POST /iso | Create ISO |
delete_iso | DELETE /iso/{iso-id} | Delete ISO |
iso_get | GET /iso/{iso-id} | Get ISO |
list_isos | GET /iso | List ISOs |
list_public_isos | GET /iso-public | List Public ISOs |
create_iso(opts)
Create ISO
Create a new ISO in your account from url
.
require 'time'
require 'vultr_ruby'
# setup authorization
VultrRuby.configure do |config|
# Configure Bearer authorization: API Key
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = VultrRuby::IsoApi.new
opts = {
create_iso_request: VultrRuby::CreateIsoRequest.new({url: 'url_example'}) # CreateIsoRequest | Include a JSON object in the request body with a content type of **application/json**.
}
begin
# Create ISO
result = api_instance.create_iso(opts)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->create_iso: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_iso_with_http_info(opts)
begin
# Create ISO
data, status_code, headers = api_instance.create_iso_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateIso201Response>
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->create_iso_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_iso_request | CreateIsoRequest | Include a JSON object in the request body with a content type of application/json. | [optional] |
[API Key](../README.md#API Key)
- Content-Type: application/json
- Accept: application/json
delete_iso(iso_id)
Delete ISO
Delete an ISO.
require 'time'
require 'vultr_ruby'
# setup authorization
VultrRuby.configure do |config|
# Configure Bearer authorization: API Key
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = VultrRuby::IsoApi.new
iso_id = 'iso_id_example' # String | The [ISO id](#operation/list-isos).
begin
# Delete ISO
api_instance.delete_iso(iso_id)
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->delete_iso: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> delete_iso_with_http_info(iso_id)
begin
# Delete ISO
data, status_code, headers = api_instance.delete_iso_with_http_info(iso_id)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->delete_iso_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
iso_id | String | The ISO id. |
nil (empty response body)
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: Not defined
iso_get(iso_id)
Get ISO
Get information for an ISO.
require 'time'
require 'vultr_ruby'
# setup authorization
VultrRuby.configure do |config|
# Configure Bearer authorization: API Key
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = VultrRuby::IsoApi.new
iso_id = 'iso_id_example' # String | The [ISO id](#operation/list-isos).
begin
# Get ISO
result = api_instance.iso_get(iso_id)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->iso_get: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> iso_get_with_http_info(iso_id)
begin
# Get ISO
data, status_code, headers = api_instance.iso_get_with_http_info(iso_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateIso201Response>
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->iso_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
iso_id | String | The ISO id. |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
list_isos(opts)
List ISOs
Get the ISOs in your account.
require 'time'
require 'vultr_ruby'
# setup authorization
VultrRuby.configure do |config|
# Configure Bearer authorization: API Key
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = VultrRuby::IsoApi.new
opts = {
per_page: 56, # Integer | Number of items requested per page. Default is 100 and Max is 500.
cursor: 'cursor_example' # String | Cursor for paging. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination).
}
begin
# List ISOs
result = api_instance.list_isos(opts)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->list_isos: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_isos_with_http_info(opts)
begin
# List ISOs
data, status_code, headers = api_instance.list_isos_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListIsos200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->list_isos_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
per_page | Integer | Number of items requested per page. Default is 100 and Max is 500. | [optional] |
cursor | String | Cursor for paging. See Meta and Pagination. | [optional] |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
list_public_isos
List Public ISOs
List all Vultr Public ISOs.
require 'time'
require 'vultr_ruby'
api_instance = VultrRuby::IsoApi.new
begin
# List Public ISOs
result = api_instance.list_public_isos
p result
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->list_public_isos: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_public_isos_with_http_info
begin
# List Public ISOs
data, status_code, headers = api_instance.list_public_isos_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <ListPublicIsos200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling IsoApi->list_public_isos_with_http_info: #{e}"
end
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json