Class Exec (1.16.0rc0)

Exec(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A file or script to execute.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
file google.cloud.osconfig_v1.types.OSPolicy.Resource.File
A remote or local file. This field is a member of oneof_ source.
script str
An inline script. The size of the script is limited to 1024 characters. This field is a member of oneof_ source.
args MutableSequence[str]
Optional arguments to pass to the source during execution.
interpreter google.cloud.osconfig_v1.types.OSPolicy.Resource.ExecResource.Exec.Interpreter
Required. The script interpreter to use.
output_file_path str
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.

Classes

Interpreter

Interpreter(value)

The interpreter to use.

Values: INTERPRETER_UNSPECIFIED (0): Invalid value, the request will return validation error. NONE (1): If an interpreter is not specified, the source is executed directly. This execution, without an interpreter, only succeeds for executables and scripts that have shebang lines. SHELL (2): Indicates that the script runs with /bin/sh on Linux and cmd.exe on Windows. POWERSHELL (3): Indicates that the script runs with PowerShell.