Reference documentation and code samples for the Cloud OS Config V1alpha API module Google::Cloud::OsConfig::V1alpha::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-08-28 UTC."],[],[],null,["# Cloud OS Config V1alpha API - Module Google::Cloud::OsConfig::V1alpha::OSPolicy::Resource::FileResource::DesiredState (v0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/ruby/docs/reference/google-cloud-os_config-v1alpha/latest/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.11.1](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.11.1/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.10.0](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.10.0/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.9.1](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.9.1/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.8.2](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.8.2/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.7.0](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.7.0/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.6.0](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.6.0/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.5.0](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.5.0/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.4.0](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.4.0/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.3.0](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.3.0/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState)\n- [0.2.2](/ruby/docs/reference/google-cloud-os_config-v1alpha/0.2.2/Google-Cloud-OsConfig-V1alpha-OSPolicy-Resource-FileResource-DesiredState) \nReference documentation and code samples for the Cloud OS Config V1alpha API module Google::Cloud::OsConfig::V1alpha::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."]]