Reference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule::StringValues.
A message that holds specific allowed and denied values.
This message can define specific values and subtrees of the Resource
Manager resource hierarchy (Organizations, Folders, Projects) that
are allowed or denied. This is achieved by using the under: and
optional is: prefixes.
The under: prefix is used to denote resource subtree values.
The is: prefix is used to denote specific values, and is required only
if the value contains a ":". Values prefixed with "is:" are treated the
same as values with no prefix.
Ancestry subtrees must be in one of the following formats:
projects/<project-id> (for example, projects/tokyo-rain-123)
folders/<folder-id> (for example, folders/1234)
organizations/<organization-id> (for example, organizations/1234)
The supports_under field of the associated Constraint defines
whether ancestry prefixes can be used.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#allowed_values
defallowed_values()->::Array<::String>
Returns
(::Array<::String>) — List of values allowed at this resource.
#allowed_values=
defallowed_values=(value)->::Array<::String>
Parameter
value (::Array<::String>) — List of values allowed at this resource.
Returns
(::Array<::String>) — List of values allowed at this resource.
#denied_values
defdenied_values()->::Array<::String>
Returns
(::Array<::String>) — List of values denied at this resource.
#denied_values=
defdenied_values=(value)->::Array<::String>
Parameter
value (::Array<::String>) — List of values denied at this resource.
Returns
(::Array<::String>) — List of values denied at this resource.
[[["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-03 UTC."],[],[],null,["# Policy Simulator V1 API - Class Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule::StringValues (v1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [1.3.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.3.0/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [1.2.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.2.1/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [1.1.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.1.0/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [1.0.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.0.1/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [0.4.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.4.0/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [0.3.2](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.3.2/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [0.2.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.2.0/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues)\n- [0.1.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.1.1/Google-Cloud-OrgPolicy-V2-PolicySpec-PolicyRule-StringValues) \nReference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::OrgPolicy::V2::PolicySpec::PolicyRule::StringValues.\n\nA message that holds specific allowed and denied values.\nThis message can define specific values and subtrees of the Resource\nManager resource hierarchy (`Organizations`, `Folders`, `Projects`) that\nare allowed or denied. This is achieved by using the `under:` and\noptional `is:` prefixes.\nThe `under:` prefix is used to denote resource subtree values.\nThe `is:` prefix is used to denote specific values, and is required only\nif the value contains a \":\". Values prefixed with \"is:\" are treated the\nsame as values with no prefix.\nAncestry subtrees must be in one of the following formats:\n\n\n- `projects/\u003cproject-id\u003e` (for example, `projects/tokyo-rain-123`)\n- `folders/\u003cfolder-id\u003e` (for example, `folders/1234`)\n- `organizations/\u003corganization-id\u003e` (for example, `organizations/1234`)\n\n\u003cbr /\u003e\n\nThe `supports_under` field of the associated `Constraint` defines\nwhether ancestry prefixes can be used. \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### #allowed_values\n\n def allowed_values() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- List of values allowed at this resource.\n\n### #allowed_values=\n\n def allowed_values=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- List of values allowed at this resource. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- List of values allowed at this resource.\n\n### #denied_values\n\n def denied_values() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- List of values denied at this resource.\n\n### #denied_values=\n\n def denied_values=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- List of values denied at this resource. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- List of values denied at this resource."]]