Stay organized with collections
Save and categorize content based on your preferences.
Gets a Policy on a resource. If no Policy is set on the resource, a
Policy is returned with default values including POLICY_TYPE_NOT_SET
for the policy_type oneof. The etag value can be used with
SetOrgPolicy() to create or update a Policy during
read-modify-write.
Arguments
Parameters
resource
string
Required. Name of the resource the Policy is set on.
[[["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-29 UTC."],[],[],null,["# Method: googleapis.cloudresourcemanager.v1.folders.getOrgPolicy\n\nGets a `Policy` on a resource. If no `Policy` is set on the resource, a\n`Policy` is returned with default values including `POLICY_TYPE_NOT_SET`\nfor the `policy_type oneof`. The `etag` value can be used with\n`SetOrgPolicy()` to create or update a `Policy` during\nread-modify-write.\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`OrgPolicy`](https://cloud.google.com/workflows/docs/reference/googleapis/cloudresourcemanager/v1/Overview#OrgPolicy).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/resource-manager/reference/rest/v1/folders/getOrgPolicy). \n\n### YAML\n\n```yaml\n- getOrgPolicy:\n call: googleapis.cloudresourcemanager.v1.folders.getOrgPolicy\n args:\n resource: ...\n body:\n constraint: ...\n result: getOrgPolicyResult\n```\n\n### JSON\n\n```json\n[\n {\n \"getOrgPolicy\": {\n \"call\": \"googleapis.cloudresourcemanager.v1.folders.getOrgPolicy\",\n \"args\": {\n \"resource\": \"...\",\n \"body\": {\n \"constraint\": \"...\"\n }\n },\n \"result\": \"getOrgPolicyResult\"\n }\n }\n]\n```"]]