Class: Google::Apis::GenomicsV2alpha1::Action

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

Overview

Specifies a single action that runs a Docker container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Action

Returns a new instance of Action.



165
166
167
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 165

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

Instance Attribute Details

#commandsArray<String>

If specified, overrides the CMD specified in the container. If the container also has an ENTRYPOINT the values are used as entrypoint arguments. Otherwise, they are used as a command and arguments to run inside the container. Corresponds to the JSON property commands

Returns:

  • (Array<String>)


65
66
67
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 65

def commands
  @commands
end

#credentialsGoogle::Apis::GenomicsV2alpha1::Secret

Holds encrypted information that is only decrypted and stored in RAM by the worker VM when running the pipeline. Corresponds to the JSON property credentials



71
72
73
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 71

def credentials
  @credentials
end

#entrypointString

If specified, overrides the ENTRYPOINT specified in the container. Corresponds to the JSON property entrypoint

Returns:

  • (String)


76
77
78
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 76

def entrypoint
  @entrypoint
end

#environmentHash<String,String>

The environment to pass into the container. This environment is merged with values specified in the google.genomics.v2alpha1.Pipeline message, overwriting any duplicate values. In addition to the values passed here, a few other values are automatically injected into the environment. These cannot be hidden or overwritten. GOOGLE_PIPELINE_FAILED will be set to "1" if the pipeline failed because an action has exited with a non-zero status (and did not have the IGNORE_EXIT_STATUS flag set). This can be used to determine if additional debug or logging actions should execute. GOOGLE_LAST_EXIT_STATUS will be set to the exit status of the last non-background action that executed. This can be used by workflow engine authors to determine whether an individual action has succeeded or failed. Corresponds to the JSON property environment

Returns:

  • (Hash<String,String>)


91
92
93
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 91

def environment
  @environment
end

#flagsArray<String>

The set of flags to apply to this action. Corresponds to the JSON property flags

Returns:

  • (Array<String>)


96
97
98
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 96

def flags
  @flags
end

#image_uriString

Required. The URI to pull the container image from. Note that all images referenced by actions in the pipeline are pulled before the first action runs. If multiple actions reference the same image, it is only pulled once, ensuring that the same image is used for all actions in a single pipeline. The image URI can be either a complete host and image specification (e.g., quay.io/ biocontainers/samtools), a library and image name (e.g., google/cloud-sdk) or a bare image name ('bash') to pull from the default library. No schema is required in any of these cases. If the specified image is not public, the service account specified for the Virtual Machine must have access to pull the images from GCR, or appropriate credentials must be specified in the google. genomics.v2alpha1.Action.credentials field. Corresponds to the JSON property imageUri

Returns:

  • (String)


111
112
113
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 111

def image_uri
  @image_uri
end

#labelsHash<String,String>

Labels to associate with the action. This field is provided to assist workflow engine authors in identifying actions (for example, to indicate what sort of action they perform, such as localization or debugging). They are returned in the operation metadata, but are otherwise ignored. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


119
120
121
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 119

def labels
  @labels
end

#mountsArray<Google::Apis::GenomicsV2alpha1::Mount>

A list of mounts to make available to the action. In addition to the values specified here, every action has a special virtual disk mounted under /google that contains log files and other operational components. - /google/logs All logs written during the pipeline execution. - /google/logs/output The combined standard output and standard error of all actions run as part of the pipeline execution. - /google/logs/action//stdout The complete contents of each individual action's standard output. - /google/logs/action//stderr The complete contents of each individual action's standard error output. Corresponds to the JSON property mounts



131
132
133
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 131

def mounts
  @mounts
end

#nameString

An optional name for the container. The container hostname will be set to this name, making it useful for inter-container communication. The name must contain only upper and lowercase alphanumeric characters and hyphens and cannot start with a hyphen. Corresponds to the JSON property name

Returns:

  • (String)


139
140
141
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 139

def name
  @name
end

#pid_namespaceString

An optional identifier for a PID namespace to run the action inside. Multiple actions should use the same string to share a namespace. If unspecified, a separate isolated namespace is used. Corresponds to the JSON property pidNamespace

Returns:

  • (String)


146
147
148
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 146

def pid_namespace
  @pid_namespace
end

#port_mappingsHash<String,Fixnum>

A map of containers to host port mappings for this container. If the container already specifies exposed ports, use the PUBLISH_EXPOSED_PORTS flag instead. The host port number must be less than 65536. If it is zero, an unused random port is assigned. To determine the resulting port number, consult the ContainerStartedEvent in the operation metadata. Corresponds to the JSON property portMappings

Returns:

  • (Hash<String,Fixnum>)


155
156
157
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 155

def port_mappings
  @port_mappings
end

#timeoutString

The maximum amount of time to give the action to complete. If the action fails to complete before the timeout, it will be terminated and the exit status will be non-zero. The pipeline will continue or terminate based on the rules defined by the ALWAYS_RUN and IGNORE_EXIT_STATUS flags. Corresponds to the JSON property timeout

Returns:

  • (String)


163
164
165
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 163

def timeout
  @timeout
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'generated/google/apis/genomics_v2alpha1/classes.rb', line 170

def update!(**args)
  @commands = args[:commands] if args.key?(:commands)
  @credentials = args[:credentials] if args.key?(:credentials)
  @entrypoint = args[:entrypoint] if args.key?(:entrypoint)
  @environment = args[:environment] if args.key?(:environment)
  @flags = args[:flags] if args.key?(:flags)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
  @labels = args[:labels] if args.key?(:labels)
  @mounts = args[:mounts] if args.key?(:mounts)
  @name = args[:name] if args.key?(:name)
  @pid_namespace = args[:pid_namespace] if args.key?(:pid_namespace)
  @port_mappings = args[:port_mappings] if args.key?(:port_mappings)
  @timeout = args[:timeout] if args.key?(:timeout)
end