Class: Daytona::CreateSandboxBaseParams
- Inherits:
-
Object
- Object
- Daytona::CreateSandboxBaseParams
- Defined in:
- lib/daytona/common/daytona.rb
Direct Known Subclasses
CreateSandboxFromImageParams, CreateSandboxFromSnapshotParams
Instance Attribute Summary collapse
-
#auto_archive_interval ⇒ Integer?
Auto-archive interval in minutes.
-
#auto_delete_interval ⇒ Integer?
Auto-delete interval in minutes.
-
#auto_stop_interval ⇒ Integer?
Auto-stop interval in minutes.
-
#env_vars ⇒ Hash<String, String>?
Environment variables to set in the Sandbox.
-
#ephemeral ⇒ Boolean?
Whether the Sandbox should be ephemeral.
-
#labels ⇒ Hash<String, String>?
Custom labels for the Sandbox.
-
#language ⇒ Symbol?
Programming language for the Sandbox.
-
#network_allow_list ⇒ String?
Comma-separated list of allowed CIDR network addresses for the Sandbox.
-
#network_block_all ⇒ Boolean?
Whether to block all network access for the Sandbox.
-
#os_user ⇒ String?
OS user for the Sandbox.
-
#public ⇒ Boolean?
Whether the Sandbox should be public.
-
#timeout ⇒ Float?
Timeout in seconds for Sandbox to be created and started.
-
#volumes ⇒ Array<DaytonaApiClient::SandboxVolume>?
List of volumes mounts to attach to the Sandbox.
Instance Method Summary collapse
-
#initialize(language: nil, os_user: nil, env_vars: nil, labels: nil, public: nil, timeout: nil, auto_stop_interval: nil, auto_archive_interval: nil, auto_delete_interval: nil, volumes: nil, network_block_all: nil, network_allow_list: nil, ephemeral: nil) ⇒ CreateSandboxBaseParams
constructor
Initialize CreateSandboxBaseParams.
-
#to_h ⇒ Hash<Symbol, Object>
Convert to hash representation.
Constructor Details
#initialize(language: nil, os_user: nil, env_vars: nil, labels: nil, public: nil, timeout: nil, auto_stop_interval: nil, auto_archive_interval: nil, auto_delete_interval: nil, volumes: nil, network_block_all: nil, network_allow_list: nil, ephemeral: nil) ⇒ CreateSandboxBaseParams
Initialize CreateSandboxBaseParams
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 |
# File 'lib/daytona/common/daytona.rb', line 61 def initialize( # rubocop:disable Metrics/MethodLength, Metrics/ParameterLists language: nil, os_user: nil, env_vars: nil, labels: nil, public: nil, timeout: nil, auto_stop_interval: nil, auto_archive_interval: nil, auto_delete_interval: nil, volumes: nil, network_block_all: nil, network_allow_list: nil, ephemeral: nil ) @language = language @os_user = os_user @env_vars = env_vars @labels = labels @public = public @timeout = timeout @auto_stop_interval = auto_stop_interval @auto_archive_interval = auto_archive_interval @auto_delete_interval = auto_delete_interval @volumes = volumes @network_block_all = network_block_all @network_allow_list = network_allow_list @ephemeral = ephemeral # Handle ephemeral and auto_delete_interval conflict handle_ephemeral_auto_delete_conflict end |
Instance Attribute Details
#auto_archive_interval ⇒ Integer?
Returns Auto-archive interval in minutes.
29 30 31 |
# File 'lib/daytona/common/daytona.rb', line 29 def auto_archive_interval @auto_archive_interval end |
#auto_delete_interval ⇒ Integer?
Returns Auto-delete interval in minutes.
32 33 34 |
# File 'lib/daytona/common/daytona.rb', line 32 def auto_delete_interval @auto_delete_interval end |
#auto_stop_interval ⇒ Integer?
Returns Auto-stop interval in minutes.
26 27 28 |
# File 'lib/daytona/common/daytona.rb', line 26 def auto_stop_interval @auto_stop_interval end |
#env_vars ⇒ Hash<String, String>?
Returns Environment variables to set in the Sandbox.
14 15 16 |
# File 'lib/daytona/common/daytona.rb', line 14 def env_vars @env_vars end |
#ephemeral ⇒ Boolean?
Returns Whether the Sandbox should be ephemeral.
44 45 46 |
# File 'lib/daytona/common/daytona.rb', line 44 def ephemeral @ephemeral end |
#labels ⇒ Hash<String, String>?
Returns Custom labels for the Sandbox.
17 18 19 |
# File 'lib/daytona/common/daytona.rb', line 17 def labels @labels end |
#language ⇒ Symbol?
Returns Programming language for the Sandbox.
8 9 10 |
# File 'lib/daytona/common/daytona.rb', line 8 def language @language end |
#network_allow_list ⇒ String?
Returns Comma-separated list of allowed CIDR network addresses for the Sandbox.
41 42 43 |
# File 'lib/daytona/common/daytona.rb', line 41 def network_allow_list @network_allow_list end |
#network_block_all ⇒ Boolean?
Returns Whether to block all network access for the Sandbox.
38 39 40 |
# File 'lib/daytona/common/daytona.rb', line 38 def network_block_all @network_block_all end |
#os_user ⇒ String?
Returns OS user for the Sandbox.
11 12 13 |
# File 'lib/daytona/common/daytona.rb', line 11 def os_user @os_user end |
#public ⇒ Boolean?
Returns Whether the Sandbox should be public.
20 21 22 |
# File 'lib/daytona/common/daytona.rb', line 20 def public @public end |
#timeout ⇒ Float?
Returns Timeout in seconds for Sandbox to be created and started.
23 24 25 |
# File 'lib/daytona/common/daytona.rb', line 23 def timeout @timeout end |
#volumes ⇒ Array<DaytonaApiClient::SandboxVolume>?
Returns List of volumes mounts to attach to the Sandbox.
35 36 37 |
# File 'lib/daytona/common/daytona.rb', line 35 def volumes @volumes end |
Instance Method Details
#to_h ⇒ Hash<Symbol, Object>
Convert to hash representation
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/daytona/common/daytona.rb', line 97 def to_h # rubocop:disable Metrics/MethodLength { language:, os_user:, env_vars:, labels:, public:, timeout:, auto_stop_interval:, auto_archive_interval:, auto_delete_interval:, volumes:, network_block_all:, network_allow_list:, ephemeral: }.compact end |