Google Cloud Batch V1 Client - Class Script (0.13.1)

Reference documentation and code samples for the Google Cloud Batch V1 Client class Script.

Script runnable.

Generated from protobuf message google.cloud.batch.v1.Runnable.Script

Namespace

Google \ Cloud \ Batch \ V1 \ Runnable

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ path string

Script file path on the host VM. To specify an interpreter, please add a #!<interpreter>(also known as shebang line) 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 usingPython3, #!/usr/bin/env python3 should be the first line of the file.) Otherwise, the file will by default be excuted by /bin/sh.

↳ text 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 usingPython3, #!/usr/bin/env python3\n should be added.) Otherwise, the script will by default be excuted by /bin/sh.

getPath

Script file path on the host VM.

To specify an interpreter, please add a #!<interpreter>(also known as shebang line) 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 usingPython3, #!/usr/bin/env python3 should be the first line of the file.) Otherwise, the file will by default be excuted by /bin/sh.

Returns
TypeDescription
string

hasPath

setPath

Script file path on the host VM.

To specify an interpreter, please add a #!<interpreter>(also known as shebang line) 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 usingPython3, #!/usr/bin/env python3 should be the first line of the file.) Otherwise, the file will by default be excuted by /bin/sh.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getText

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 usingPython3, #!/usr/bin/env python3\n should be added.) Otherwise, the script will by default be excuted by /bin/sh.

Returns
TypeDescription
string

hasText

setText

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 usingPython3, #!/usr/bin/env python3\n should be added.) Otherwise, the script will by default be excuted by /bin/sh.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCommand

Returns
TypeDescription
string