Class: Daytona::CreateSnapshotParams

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/common/snapshot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, image:, resources: nil, entrypoint: nil, region_id: nil) ⇒ CreateSnapshotParams

Returns a new instance of CreateSnapshotParams.

Parameters:

  • name (String)

    Name of the snapshot

  • image (String, Daytona::Image)

    Image of the snapshot

  • resources (Daytona::Resources, nil) (defaults to: nil)

    Resources of the snapshot

  • entrypoint (Array<String>, nil) (defaults to: nil)

    Entrypoint of the snapshot

  • region_id (String, nil) (defaults to: nil)

    ID of the region where the snapshot will be available



31
32
33
34
35
36
37
# File 'lib/daytona/common/snapshot.rb', line 31

def initialize(name:, image:, resources: nil, entrypoint: nil, region_id: nil)
  @name = name
  @image = image
  @resources = resources
  @entrypoint = entrypoint
  @region_id = region_id
end

Instance Attribute Details

#entrypointArray<String>? (readonly)

Returns Entrypoint of the snapshot.

Returns:

  • (Array<String>, nil)

    Entrypoint of the snapshot



20
21
22
# File 'lib/daytona/common/snapshot.rb', line 20

def entrypoint
  @entrypoint
end

#imageString, Daytona::Image (readonly)

Returns Image of the snapshot. If a string is provided, it should be available on some registry. If an Image instance is provided, it will be used to create a new image in Daytona.

Returns:

  • (String, Daytona::Image)

    Image of the snapshot. If a string is provided, it should be available on some registry. If an Image instance is provided, it will be used to create a new image in Daytona.



14
15
16
# File 'lib/daytona/common/snapshot.rb', line 14

def image
  @image
end

#nameString (readonly)

Returns Name of the snapshot.

Returns:

  • (String)

    Name of the snapshot



9
10
11
# File 'lib/daytona/common/snapshot.rb', line 9

def name
  @name
end

#region_idString? (readonly)

Returns ID of the region where the snapshot will be available. Defaults to organization default region if not specified.

Returns:

  • (String, nil)

    ID of the region where the snapshot will be available. Defaults to organization default region if not specified.



24
25
26
# File 'lib/daytona/common/snapshot.rb', line 24

def region_id
  @region_id
end

#resourcesDaytona::Resources? (readonly)

Returns Resources of the snapshot.

Returns:



17
18
19
# File 'lib/daytona/common/snapshot.rb', line 17

def resources
  @resources
end