Note: The following fields are mutually exclusive: gcs, remote, local_path. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: gcs, remote, local_path. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: gcs, remote, local_path. If a field in that set is populated, all other fields in the set will automatically be cleared.
#local_path
deflocal_path()->::String
Returns
(::String) — A local path within the VM to use.
Note: The following fields are mutually exclusive: local_path, remote, gcs. If a field in that set is populated, all other fields in the set will automatically be cleared.
#local_path=
deflocal_path=(value)->::String
Parameter
value (::String) — A local path within the VM to use.
Note: The following fields are mutually exclusive: local_path, remote, gcs. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — A local path within the VM to use.
Note: The following fields are mutually exclusive: local_path, remote, gcs. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: remote, gcs, local_path. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: remote, gcs, local_path. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: remote, gcs, local_path. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud OS Config V1 API - Class Google::Cloud::OsConfig::V1::OSPolicy::Resource::File (v1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [1.3.0](/ruby/docs/reference/google-cloud-os_config-v1/1.3.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [1.2.1](/ruby/docs/reference/google-cloud-os_config-v1/1.2.1/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [1.1.0](/ruby/docs/reference/google-cloud-os_config-v1/1.1.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [1.0.1](/ruby/docs/reference/google-cloud-os_config-v1/1.0.1/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.16.0](/ruby/docs/reference/google-cloud-os_config-v1/0.16.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.15.2](/ruby/docs/reference/google-cloud-os_config-v1/0.15.2/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.14.0](/ruby/docs/reference/google-cloud-os_config-v1/0.14.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.13.0](/ruby/docs/reference/google-cloud-os_config-v1/0.13.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.12.0](/ruby/docs/reference/google-cloud-os_config-v1/0.12.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.11.0](/ruby/docs/reference/google-cloud-os_config-v1/0.11.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.10.0](/ruby/docs/reference/google-cloud-os_config-v1/0.10.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File)\n- [0.9.1](/ruby/docs/reference/google-cloud-os_config-v1/0.9.1/Google-Cloud-OsConfig-V1-OSPolicy-Resource-File) \nReference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::OSPolicy::Resource::File.\n\nA remote or local file. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #allow_insecure\n\n def allow_insecure() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Defaults to false. When false, files are subject to validations based on the file type:\n\n Remote: A checksum must be specified.\n Cloud Storage: An object generation number must be specified.\n\n### #allow_insecure=\n\n def allow_insecure=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Defaults to false. When false, files are subject to validations based on the file type:\n\n\n Remote: A checksum must be specified.\nCloud Storage: An object generation number must be specified. \n**Returns**\n\n- (::Boolean) --- Defaults to false. When false, files are subject to validations based on the file type:\n\n Remote: A checksum must be specified.\n Cloud Storage: An object generation number must be specified.\n\n### #gcs\n\n def gcs() -\u003e ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Gcs\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Gcs](./Google-Cloud-OsConfig-V1-OSPolicy-Resource-File-Gcs)) --- A Cloud Storage object.\n\n\n Note: The following fields are mutually exclusive: `gcs`, `remote`, `local_path`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #gcs=\n\n def gcs=(value) -\u003e ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Gcs\n\n**Parameter**\n\n- **value** ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Gcs](./Google-Cloud-OsConfig-V1-OSPolicy-Resource-File-Gcs)) --- A Cloud Storage object.\n\n\nNote: The following fields are mutually exclusive: `gcs`, `remote`, `local_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Gcs](./Google-Cloud-OsConfig-V1-OSPolicy-Resource-File-Gcs)) --- A Cloud Storage object.\n\n\n Note: The following fields are mutually exclusive: `gcs`, `remote`, `local_path`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #local_path\n\n def local_path() -\u003e ::String\n\n**Returns**\n\n- (::String) --- A local path within the VM to use.\n\n Note: The following fields are mutually exclusive: `local_path`, `remote`, `gcs`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #local_path=\n\n def local_path=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- A local path within the VM to use.\n\n\nNote: The following fields are mutually exclusive: `local_path`, `remote`, `gcs`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- A local path within the VM to use.\n\n Note: The following fields are mutually exclusive: `local_path`, `remote`, `gcs`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #remote\n\n def remote() -\u003e ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Remote\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Remote](./Google-Cloud-OsConfig-V1-OSPolicy-Resource-File-Remote)) --- A generic remote file.\n\n\n Note: The following fields are mutually exclusive: `remote`, `gcs`, `local_path`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #remote=\n\n def remote=(value) -\u003e ::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Remote\n\n**Parameter**\n\n- **value** ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Remote](./Google-Cloud-OsConfig-V1-OSPolicy-Resource-File-Remote)) --- A generic remote file.\n\n\nNote: The following fields are mutually exclusive: `remote`, `gcs`, `local_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::OSPolicy::Resource::File::Remote](./Google-Cloud-OsConfig-V1-OSPolicy-Resource-File-Remote)) --- A generic remote file.\n\n\n Note: The following fields are mutually exclusive: `remote`, `gcs`, `local_path`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]