Class: Google::Apis::BatchV1::AgentContainer

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb

Overview

Container runnable representation on the agent side.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AgentContainer

Returns a new instance of AgentContainer.



123
124
125
# File 'lib/google/apis/batch_v1/classes.rb', line 123

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#commandsArray<String>

Overrides the CMD specified in the container. If there is an ENTRYPOINT ( either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT. Corresponds to the JSON property commands

Returns:

  • (Array<String>)


98
99
100
# File 'lib/google/apis/batch_v1/classes.rb', line 98

def commands
  @commands
end

#entrypointString

Overrides the ENTRYPOINT specified in the container. Corresponds to the JSON property entrypoint

Returns:

  • (String)


103
104
105
# File 'lib/google/apis/batch_v1/classes.rb', line 103

def entrypoint
  @entrypoint
end

#image_uriString

The URI to pull the container image from. Corresponds to the JSON property imageUri

Returns:

  • (String)


108
109
110
# File 'lib/google/apis/batch_v1/classes.rb', line 108

def image_uri
  @image_uri
end

#optionsString

Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host". Corresponds to the JSON property options

Returns:

  • (String)


114
115
116
# File 'lib/google/apis/batch_v1/classes.rb', line 114

def options
  @options
end

#volumesArray<String>

Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro Corresponds to the JSON property volumes

Returns:

  • (Array<String>)


121
122
123
# File 'lib/google/apis/batch_v1/classes.rb', line 121

def volumes
  @volumes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



128
129
130
131
132
133
134
# File 'lib/google/apis/batch_v1/classes.rb', line 128

def update!(**args)
  @commands = args[:commands] if args.key?(:commands)
  @entrypoint = args[:entrypoint] if args.key?(:entrypoint)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
  @options = args[:options] if args.key?(:options)
  @volumes = args[:volumes] if args.key?(:volumes)
end