All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
create_object_storage | POST /object-storage | Create Object Storage |
delete_object_storage | DELETE /object-storage/{object-storage-id} | Delete Object Storage |
get_object_storage | GET /object-storage/{object-storage-id} | Get Object Storage |
list_object_storage_clusters | GET /object-storage/clusters | Get All Clusters |
list_object_storages | GET /object-storage | List Object Storages |
regenerate_object_storage_keys | POST /object-storage/{object-storage-id}/regenerate-keys | Regenerate Object Storage Keys |
update_object_storage | PUT /object-storage/{object-storage-id} | Update Object Storage |
create_object_storage(opts)
Create Object Storage
Create new Object Storage. The cluster_id
attribute is required.
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::S3Api.new
opts = {
create_object_storage_request: VultrRuby::CreateObjectStorageRequest.new({cluster_id: 37}) # CreateObjectStorageRequest | Include a JSON object in the request body with a content type of **application/json**.
}
begin
# Create Object Storage
result = api_instance.create_object_storage(opts)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->create_object_storage: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_object_storage_with_http_info(opts)
begin
# Create Object Storage
data, status_code, headers = api_instance.create_object_storage_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateObjectStorage202Response>
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->create_object_storage_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_object_storage_request | CreateObjectStorageRequest | Include a JSON object in the request body with a content type of application/json. | [optional] |
CreateObjectStorage202Response
[API Key](../README.md#API Key)
- Content-Type: application/json
- Accept: application/json
delete_object_storage(object_storage_id)
Delete Object Storage
Delete an Object Storage.
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::S3Api.new
object_storage_id = 'object_storage_id_example' # String | The [Object Storage id](#operation/list-object-storages).
begin
# Delete Object Storage
api_instance.delete_object_storage(object_storage_id)
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->delete_object_storage: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> delete_object_storage_with_http_info(object_storage_id)
begin
# Delete Object Storage
data, status_code, headers = api_instance.delete_object_storage_with_http_info(object_storage_id)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->delete_object_storage_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
object_storage_id | String | The Object Storage id. |
nil (empty response body)
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: Not defined
get_object_storage(object_storage_id)
Get Object Storage
Get information about an Object Storage.
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::S3Api.new
object_storage_id = 'object_storage_id_example' # String | The [Object Storage id](#operation/list-object-storages).
begin
# Get Object Storage
result = api_instance.get_object_storage(object_storage_id)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->get_object_storage: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_object_storage_with_http_info(object_storage_id)
begin
# Get Object Storage
data, status_code, headers = api_instance.get_object_storage_with_http_info(object_storage_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateObjectStorage202Response>
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->get_object_storage_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
object_storage_id | String | The Object Storage id. |
CreateObjectStorage202Response
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
list_object_storage_clusters(opts)
Get All Clusters
Get a list of all Object Storage Clusters.
require 'time'
require 'vultr_ruby'
api_instance = VultrRuby::S3Api.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
# Get All Clusters
result = api_instance.list_object_storage_clusters(opts)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->list_object_storage_clusters: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_object_storage_clusters_with_http_info(opts)
begin
# Get All Clusters
data, status_code, headers = api_instance.list_object_storage_clusters_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListObjectStorageClusters200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->list_object_storage_clusters_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] |
ListObjectStorageClusters200Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
list_object_storages(opts)
List Object Storages
Get a list of all Object Storage 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::S3Api.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 Object Storages
result = api_instance.list_object_storages(opts)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->list_object_storages: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_object_storages_with_http_info(opts)
begin
# List Object Storages
data, status_code, headers = api_instance.list_object_storages_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListObjectStorages200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->list_object_storages_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
regenerate_object_storage_keys(object_storage_id)
Regenerate Object Storage Keys
Regenerate the keys for an Object Storage.
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::S3Api.new
object_storage_id = 'object_storage_id_example' # String | The [Object Storage id](#operation/list-object-storages).
begin
# Regenerate Object Storage Keys
result = api_instance.regenerate_object_storage_keys(object_storage_id)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->regenerate_object_storage_keys: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> regenerate_object_storage_keys_with_http_info(object_storage_id)
begin
# Regenerate Object Storage Keys
data, status_code, headers = api_instance.regenerate_object_storage_keys_with_http_info(object_storage_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <RegenerateObjectStorageKeys201Response>
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->regenerate_object_storage_keys_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
object_storage_id | String | The Object Storage id. |
RegenerateObjectStorageKeys201Response
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
update_object_storage(object_storage_id, opts)
Update Object Storage
Update the label for an Object Storage.
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::S3Api.new
object_storage_id = 'object_storage_id_example' # String | The [Object Storage id](#operation/list-object-storages).
opts = {
update_object_storage_request: VultrRuby::UpdateObjectStorageRequest.new({label: 'label_example'}) # UpdateObjectStorageRequest | Include a JSON object in the request body with a content type of **application/json**.
}
begin
# Update Object Storage
api_instance.update_object_storage(object_storage_id, opts)
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->update_object_storage: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> update_object_storage_with_http_info(object_storage_id, opts)
begin
# Update Object Storage
data, status_code, headers = api_instance.update_object_storage_with_http_info(object_storage_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue VultrRuby::ApiError => e
puts "Error when calling S3Api->update_object_storage_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
object_storage_id | String | The Object Storage id. | |
update_object_storage_request | UpdateObjectStorageRequest | Include a JSON object in the request body with a content type of application/json. | [optional] |
nil (empty response body)
[API Key](../README.md#API Key)
- Content-Type: application/json
- Accept: Not defined