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



28
29
30
31
32
33
34
# File 'lib/daytona/common/snapshot.rb', line 28

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



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

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.



11
12
13
# File 'lib/daytona/common/snapshot.rb', line 11

def image
  @image
end

#nameString (readonly)

Returns Name of the snapshot.

Returns:

  • (String)

    Name of the snapshot



6
7
8
# File 'lib/daytona/common/snapshot.rb', line 6

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.



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

def region_id
  @region_id
end

#resourcesDaytona::Resources? (readonly)

Returns Resources of the snapshot.

Returns:



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

def resources
  @resources
end