Google Cloud OsConfig V1 Client - Class Exec (1.3.5)

Reference documentation and code samples for the Google Cloud OsConfig V1 Client class Exec.

A file or script to execute.

Generated from protobuf message google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec

Namespace

Google \ Cloud \ OsConfig \ V1 \ OSPolicy \ Resource \ ExecResource

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ file Google\Cloud\OsConfig\V1\OSPolicy\Resource\File

A remote or local file.

↳ script string

An inline script. The size of the script is limited to 1024 characters.

↳ args array

Optional arguments to pass to the source during execution.

↳ interpreter int

Required. The script interpreter to use.

↳ output_file_path string

Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.

getFile

A remote or local file.

Returns
Type Description
Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null

hasFile

setFile

A remote or local file.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicy\Resource\File
Returns
Type Description
$this

getScript

An inline script.

The size of the script is limited to 1024 characters.

Returns
Type Description
string

hasScript

setScript

An inline script.

The size of the script is limited to 1024 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getArgs

Optional arguments to pass to the source during execution.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setArgs

Optional arguments to pass to the source during execution.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getInterpreter

Required. The script interpreter to use.

Returns
Type Description
int

setInterpreter

Required. The script interpreter to use.

Parameter
Name Description
var int
Returns
Type Description
$this

getOutputFilePath

Only recorded for enforce Exec.

Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.

Returns
Type Description
string

setOutputFilePath

Only recorded for enforce Exec.

Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.

Parameter
Name Description
var string
Returns
Type Description
$this

getSource

Returns
Type Description
string