Reference documentation and code samples for the Cloud OS Config V1 API module Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource::DesiredState.
Desired state of the file.
Constants
DESIRED_STATE_UNSPECIFIED
value: 0 Unspecified is invalid.
PRESENT
value: 1 Ensure file at path is present.
ABSENT
value: 2 Ensure file at path is absent.
CONTENTS_MATCH
value: 3 Ensure the contents of the file at path matches. If the file does
not exist it will be created.
[[["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 - Module Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource::DesiredState (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-FileResource-DesiredState)\n- [1.3.0](/ruby/docs/reference/google-cloud-os_config-v1/1.3.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [1.2.1](/ruby/docs/reference/google-cloud-os_config-v1/1.2.1/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [1.1.0](/ruby/docs/reference/google-cloud-os_config-v1/1.1.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [1.0.1](/ruby/docs/reference/google-cloud-os_config-v1/1.0.1/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.16.0](/ruby/docs/reference/google-cloud-os_config-v1/0.16.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.15.2](/ruby/docs/reference/google-cloud-os_config-v1/0.15.2/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.14.0](/ruby/docs/reference/google-cloud-os_config-v1/0.14.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.13.0](/ruby/docs/reference/google-cloud-os_config-v1/0.13.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.12.0](/ruby/docs/reference/google-cloud-os_config-v1/0.12.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.11.0](/ruby/docs/reference/google-cloud-os_config-v1/0.11.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.10.0](/ruby/docs/reference/google-cloud-os_config-v1/0.10.0/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState)\n- [0.9.1](/ruby/docs/reference/google-cloud-os_config-v1/0.9.1/Google-Cloud-OsConfig-V1-OSPolicy-Resource-FileResource-DesiredState) \nReference documentation and code samples for the Cloud OS Config V1 API module Google::Cloud::OsConfig::V1::OSPolicy::Resource::FileResource::DesiredState.\n\nDesired state of the file.\n\nConstants\n---------\n\n### DESIRED_STATE_UNSPECIFIED\n\n**value:** 0 \nUnspecified is invalid.\n\n### PRESENT\n\n**value:** 1 \nEnsure file at path is present.\n\n### ABSENT\n\n**value:** 2 \nEnsure file at path is absent.\n\n### CONTENTS_MATCH\n\n**value:** 3 \nEnsure the contents of the file at path matches. If the file does\nnot exist it will be created."]]