All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
create_startup_script | POST /startup-scripts | Create Startup Script |
delete_startup_script | DELETE /startup-scripts/{startup-id} | Delete Startup Script |
get_startup_script | GET /startup-scripts/{startup-id} | Get Startup Script |
list_startup_scripts | GET /startup-scripts | List Startup Scripts |
update_startup_script | PATCH /startup-scripts/{startup-id} | Update Startup Script |
create_startup_script(opts)
Create Startup Script
Create a new Startup Script. The name
and script
attributes are required, and scripts are base-64 encoded.
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::StartupApi.new
opts = {
create_startup_script_request: VultrRuby::CreateStartupScriptRequest.new({name: 'name_example', script: 'script_example'}) # CreateStartupScriptRequest | Include a JSON object in the request body with a content type of **application/json**.
}
begin
# Create Startup Script
result = api_instance.create_startup_script(opts)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->create_startup_script: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_startup_script_with_http_info(opts)
begin
# Create Startup Script
data, status_code, headers = api_instance.create_startup_script_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetStartupScript200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->create_startup_script_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_startup_script_request | CreateStartupScriptRequest | 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_startup_script(startup_id)
Delete Startup Script
Delete a Startup Script.
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::StartupApi.new
startup_id = 'startup_id_example' # String | The [Startup Script id](#operation/list-startup-scripts).
begin
# Delete Startup Script
api_instance.delete_startup_script(startup_id)
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->delete_startup_script: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> delete_startup_script_with_http_info(startup_id)
begin
# Delete Startup Script
data, status_code, headers = api_instance.delete_startup_script_with_http_info(startup_id)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->delete_startup_script_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
startup_id | String | The Startup Script id. |
nil (empty response body)
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: Not defined
get_startup_script(startup_id)
Get Startup Script
Get information for a Startup Script.
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::StartupApi.new
startup_id = 'startup_id_example' # String | The [Startup Script id](#operation/list-startup-scripts).
begin
# Get Startup Script
result = api_instance.get_startup_script(startup_id)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->get_startup_script: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_startup_script_with_http_info(startup_id)
begin
# Get Startup Script
data, status_code, headers = api_instance.get_startup_script_with_http_info(startup_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetStartupScript200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->get_startup_script_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
startup_id | String | The Startup Script id. |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
list_startup_scripts(opts)
List Startup Scripts
Get a list of all Startup Scripts.
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::StartupApi.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 Startup Scripts
result = api_instance.list_startup_scripts(opts)
p result
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->list_startup_scripts: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_startup_scripts_with_http_info(opts)
begin
# List Startup Scripts
data, status_code, headers = api_instance.list_startup_scripts_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ListStartupScripts200Response>
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->list_startup_scripts_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
update_startup_script(startup_id, opts)
Update Startup Script
Update a Startup Script. The attributes name
and script
are optional. If not set, the attributes will retain their original values. The script
attribute is base-64 encoded. New deployments will use the updated script, but this action does not update previously deployed instances.
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::StartupApi.new
startup_id = 'startup_id_example' # String | The [Startup Script id](#operation/list-startup-scripts).
opts = {
update_startup_script_request: VultrRuby::UpdateStartupScriptRequest.new # UpdateStartupScriptRequest | Include a JSON object in the request body with a content type of **application/json**.
}
begin
# Update Startup Script
api_instance.update_startup_script(startup_id, opts)
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->update_startup_script: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> update_startup_script_with_http_info(startup_id, opts)
begin
# Update Startup Script
data, status_code, headers = api_instance.update_startup_script_with_http_info(startup_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue VultrRuby::ApiError => e
puts "Error when calling StartupApi->update_startup_script_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
startup_id | String | The Startup Script id. | |
update_startup_script_request | UpdateStartupScriptRequest | 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