Class: Google::Apis::WorkstationsV1beta::Container

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

Overview

A Docker container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Container

Returns a new instance of Container.



359
360
361
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 359

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

Instance Attribute Details

#argsArray<String>

Optional. Arguments passed to the entrypoint. Corresponds to the JSON property args

Returns:

  • (Array<String>)


323
324
325
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 323

def args
  @args
end

#commandArray<String>

Optional. If set, overrides the default ENTRYPOINT specified by the image. Corresponds to the JSON property command

Returns:

  • (Array<String>)


328
329
330
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 328

def command
  @command
end

#envHash<String,String>

Optional. Environment variables passed to the container's entrypoint. Corresponds to the JSON property env

Returns:

  • (Hash<String,String>)


333
334
335
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 333

def env
  @env
end

#imageString

Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of preconfigured images, but you can create your own custom container images. If using a private image, the host.gceInstance. serviceAccount field must be specified in the workstation configuration. If using a custom container image, the service account must have Artifact Registry Reader permission to pull the specified image. Otherwise, the image must be publicly accessible. Corresponds to the JSON property image

Returns:

  • (String)


347
348
349
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 347

def image
  @image
end

#run_as_userFixnum

Optional. If set, overrides the USER specified in the image with the given uid. Corresponds to the JSON property runAsUser

Returns:

  • (Fixnum)


352
353
354
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 352

def run_as_user
  @run_as_user
end

#working_dirString

Optional. If set, overrides the default DIR specified by the image. Corresponds to the JSON property workingDir

Returns:

  • (String)


357
358
359
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 357

def working_dir
  @working_dir
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



364
365
366
367
368
369
370
371
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 364

def update!(**args)
  @args = args[:args] if args.key?(:args)
  @command = args[:command] if args.key?(:command)
  @env = args[:env] if args.key?(:env)
  @image = args[:image] if args.key?(:image)
  @run_as_user = args[:run_as_user] if args.key?(:run_as_user)
  @working_dir = args[:working_dir] if args.key?(:working_dir)
end