Class: Google::Cloud::Batch::V1::Runnable

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/batch/v1/task.rb

Overview

Runnable describes instructions for executing a specific script or container as part of a Task.

Defined Under Namespace

Classes: Barrier, Container, LabelsEntry, Script

Instance Attribute Summary collapse

Instance Attribute Details

#always_run::Boolean

Returns By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging.

The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.

Returns:

  • (::Boolean)

    By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging.

    The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#background::Boolean

Returns This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).

Returns:

  • (::Boolean)

    This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#barrier::Google::Cloud::Batch::V1::Runnable::Barrier

Returns Barrier runnable.

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#container::Google::Cloud::Batch::V1::Runnable::Container

Returns Container runnable.

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#display_name::String

Returns Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.

Returns:

  • (::String)

    Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#environment::Google::Cloud::Batch::V1::Environment

Returns Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#ignore_exit_status::Boolean

Returns Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.

Returns:

  • (::Boolean)

    Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#labels::Google::Protobuf::Map{::String => ::String}

Returns Labels for this Runnable.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    Labels for this Runnable.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#script::Google::Cloud::Batch::V1::Runnable::Script

Returns Script runnable.

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#timeout::Google::Protobuf::Duration

Returns Timeout for this Runnable.

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 191

class Runnable
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Container runnable.
  # @!attribute [rw] image_uri
  #   @return [::String]
  #     The URI to pull the container image from.
  # @!attribute [rw] commands
  #   @return [::Array<::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.
  # @!attribute [rw] entrypoint
  #   @return [::String]
  #     Overrides the `ENTRYPOINT` specified in the container.
  # @!attribute [rw] volumes
  #   @return [::Array<::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
  #
  #     If the `TaskSpec.Volumes` field is specified but this field is not, Batch
  #     will mount each volume from the host machine to the container with the
  #     same mount path by default. In this case, the default mount option for
  #     containers will be read-only (ro) for existing persistent disks and
  #     read-write (rw) for other volume types, regardless of the original mount
  #     options specified in `TaskSpec.Volumes`. If you need different mount
  #     settings, you can explicitly configure them in this field.
  # @!attribute [rw] options
  #   @return [::String]
  #     Arbitrary additional options to include in the "docker run" command when
  #     running this container, e.g. "--network host".
  # @!attribute [rw] block_external_network
  #   @return [::Boolean]
  #     If set to true, external network access to and from container will be
  #     blocked, containers that are with block_external_network as true can
  #     still communicate with each other, network cannot be specified in the
  #     `container.options` field.
  # @!attribute [rw] username
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     username to login to the Docker registry that contains the image.
  #
  #     You can either specify the username directly by using plain text or
  #     specify an encrypted username by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`. However, using a secret is
  #     recommended for enhanced security.
  #
  #     Caution: If you specify the username using plain text, you risk the
  #     username being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the username instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] password
  #   @return [::String]
  #     Required if the container image is from a private Docker registry. The
  #     password to login to the Docker registry that contains the image.
  #
  #     For security, it is strongly recommended to specify an
  #     encrypted password by using a Secret Manager secret:
  #     `projects/*/secrets/*/versions/*`.
  #
  #     Warning: If you specify the password using plain text, you risk the
  #     password being exposed to any users who can view the job or its logs.
  #     To avoid this risk, specify a secret that contains the password instead.
  #
  #     Learn more about [Secret
  #     Manager](https://cloud.google.com/secret-manager/docs/) and [using
  #     Secret Manager with
  #     Batch](https://cloud.google.com/batch/docs/create-run-job-secret-manager).
  # @!attribute [rw] enable_image_streaming
  #   @return [::Boolean]
  #     Optional. If set to true, this container runnable uses Image streaming.
  #
  #     Use Image streaming to allow the runnable to initialize without
  #     waiting for the entire container image to download, which can
  #     significantly reduce startup time for large container images.
  #
  #     When `enableImageStreaming` is set to true, the container
  #     runtime is [containerd](https://containerd.io/) instead of Docker.
  #     Additionally, this container runnable only supports the following
  #     `container` subfields: `imageUri`,
  #     `commands[]`, `entrypoint`, and
  #     `volumes[]`; any other `container` subfields are ignored.
  #
  #     For more information about the requirements and limitations for using
  #     Image streaming with Batch, see the [`image-streaming`
  #     sample on
  #     GitHub](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming).
  class Container
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Script runnable.
  # @!attribute [rw] path
  #   @return [::String]
  #     Script file path on the host VM.
  #
  #     To specify an interpreter, please add a `#!<interpreter>`(also known as
  #     [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
  #     first line of the file.(For example, to execute the script using bash,
  #     `#!/bin/bash` should be the first line of the file. To execute the
  #     script using`Python3`, `#!/usr/bin/env python3` should be the first
  #     line of the file.) Otherwise, the file will by default be executed by
  #     `/bin/sh`.
  # @!attribute [rw] text
  #   @return [::String]
  #     Shell script text.
  #
  #     To specify an interpreter, please add a `#!<interpreter>\n` at the
  #     beginning of the text.(For example, to execute the script using bash,
  #     `#!/bin/bash\n` should be added. To execute the script using`Python3`,
  #     `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
  #     by default be executed by `/bin/sh`.
  class Script
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Barrier runnable blocks until all tasks in a taskgroup reach it.
  # @!attribute [rw] name
  #   @return [::String]
  #     Barriers are identified by their index in runnable list.
  #     Names are not required, but if present should be an identifier.
  class Barrier
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end