# Cloud OS Config V1 API - Class Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource::Exec (v1.9.0)

1.9.0 (latest) 1.8.1 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.16.0 0.15.2 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.1 Reference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource::Exec.

A file or script to execute.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #args

    def args() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Optional arguments to pass to the source during execution.

### #args=

    def args=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Optional arguments to pass to the source during execution.
**Returns**

- (::Array\<::String\>) --- Optional arguments to pass to the source during execution.

### #file

    def file() -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File

**Returns**

- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)) --- A remote or local file.


  Note: The following fields are mutually exclusive: `file`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #file=

    def file=(value) -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)) --- A remote or local file.


  Note: The following fields are mutually exclusive: `file`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)) --- A remote or local file.


  Note: The following fields are mutually exclusive: `file`, `script`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #interpreter

    def interpreter() -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource::Exec::Interpreter

**Returns**

- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource::Exec::Interpreter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicy-Resource-ExecResource-Exec-Interpreter)) --- Required. The script interpreter to use.

### #interpreter=

    def interpreter=(value) -> ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource::Exec::Interpreter

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource::Exec::Interpreter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicy-Resource-ExecResource-Exec-Interpreter)) --- Required. The script interpreter to use.
**Returns**

- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::ExecResource::Exec::Interpreter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicy-Resource-ExecResource-Exec-Interpreter)) --- Required. The script interpreter to use.

### #output_file_path

    def output_file_path() -> ::String

**Returns**

- (::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.

### #output_file_path=

    def output_file_path=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #script

    def script() -> ::String

**Returns**

- (::String) --- An inline script. The size of the script is limited to 1024 characters.

  Note: The following fields are mutually exclusive: `script`, `file`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #script=

    def script=(value) -> ::String

**Parameter**

- **value** (::String) --- An inline script. The size of the script is limited to 1024 characters.


  Note: The following fields are mutually exclusive: `script`, `file`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- An inline script. The size of the script is limited to 1024 characters.

  Note: The following fields are mutually exclusive: `script`, `file`. If a field in that set is populated, all other fields in the set will automatically be cleared.