Reference documentation and code samples for the Identity-Aware Proxy V1 API class Google::Iam::V1::GetPolicyOptions.
Encapsulates settings provided to GetIamPolicy.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#requested_policy_version
defrequested_policy_version()->::Integer
Returns
(::Integer) — Optional. The maximum policy version that will be used to format the
policy.
Valid values are 0, 1, and 3. Requests specifying an invalid value will be
rejected.
Requests for policies with any conditional role bindings must specify
version 3. Policies with no conditional role bindings may specify any valid
value or leave the field unset.
The policy in the response might use the policy version that you specified,
or it might use a lower policy version. For example, if you specify version
3, but the policy has no conditional role bindings, the response uses
version 1.
To learn which resources support conditions in their IAM policies, see the
IAM
documentation.
#requested_policy_version=
defrequested_policy_version=(value)->::Integer
Parameter
value (::Integer) — Optional. The maximum policy version that will be used to format the
policy.
Valid values are 0, 1, and 3. Requests specifying an invalid value will be
rejected.
Requests for policies with any conditional role bindings must specify
version 3. Policies with no conditional role bindings may specify any valid
value or leave the field unset.
The policy in the response might use the policy version that you specified,
or it might use a lower policy version. For example, if you specify version
3, but the policy has no conditional role bindings, the response uses
version 1.
To learn which resources support conditions in their IAM policies, see the
IAM
documentation.
Returns
(::Integer) — Optional. The maximum policy version that will be used to format the
policy.
Valid values are 0, 1, and 3. Requests specifying an invalid value will be
rejected.
Requests for policies with any conditional role bindings must specify
version 3. Policies with no conditional role bindings may specify any valid
value or leave the field unset.
The policy in the response might use the policy version that you specified,
or it might use a lower policy version. For example, if you specify version
3, but the policy has no conditional role bindings, the response uses
version 1.
To learn which resources support conditions in their IAM policies, see the
IAM
documentation.
[[["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,["# Identity-Aware Proxy V1 API - Class Google::Iam::V1::GetPolicyOptions (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-iap-v1/latest/Google-Iam-V1-GetPolicyOptions)\n- [1.4.0](/ruby/docs/reference/google-cloud-iap-v1/1.4.0/Google-Iam-V1-GetPolicyOptions)\n- [1.3.1](/ruby/docs/reference/google-cloud-iap-v1/1.3.1/Google-Iam-V1-GetPolicyOptions)\n- [1.2.0](/ruby/docs/reference/google-cloud-iap-v1/1.2.0/Google-Iam-V1-GetPolicyOptions)\n- [1.1.0](/ruby/docs/reference/google-cloud-iap-v1/1.1.0/Google-Iam-V1-GetPolicyOptions)\n- [1.0.1](/ruby/docs/reference/google-cloud-iap-v1/1.0.1/Google-Iam-V1-GetPolicyOptions)\n- [0.12.0](/ruby/docs/reference/google-cloud-iap-v1/0.12.0/Google-Iam-V1-GetPolicyOptions)\n- [0.11.2](/ruby/docs/reference/google-cloud-iap-v1/0.11.2/Google-Iam-V1-GetPolicyOptions)\n- [0.10.1](/ruby/docs/reference/google-cloud-iap-v1/0.10.1/Google-Iam-V1-GetPolicyOptions)\n- [0.9.0](/ruby/docs/reference/google-cloud-iap-v1/0.9.0/Google-Iam-V1-GetPolicyOptions)\n- [0.8.1](/ruby/docs/reference/google-cloud-iap-v1/0.8.1/Google-Iam-V1-GetPolicyOptions)\n- [0.7.0](/ruby/docs/reference/google-cloud-iap-v1/0.7.0/Google-Iam-V1-GetPolicyOptions)\n- [0.6.0](/ruby/docs/reference/google-cloud-iap-v1/0.6.0/Google-Iam-V1-GetPolicyOptions)\n- [0.5.0](/ruby/docs/reference/google-cloud-iap-v1/0.5.0/Google-Iam-V1-GetPolicyOptions)\n- [0.4.0](/ruby/docs/reference/google-cloud-iap-v1/0.4.0/Google-Iam-V1-GetPolicyOptions)\n- [0.3.0](/ruby/docs/reference/google-cloud-iap-v1/0.3.0/Google-Iam-V1-GetPolicyOptions)\n- [0.2.0](/ruby/docs/reference/google-cloud-iap-v1/0.2.0/Google-Iam-V1-GetPolicyOptions)\n- [0.1.3](/ruby/docs/reference/google-cloud-iap-v1/0.1.3/Google-Iam-V1-GetPolicyOptions) \nReference documentation and code samples for the Identity-Aware Proxy V1 API class Google::Iam::V1::GetPolicyOptions.\n\nEncapsulates settings provided to GetIamPolicy. \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### #requested_policy_version\n\n def requested_policy_version() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Optional. The maximum policy version that will be used to format the policy.\n\n Valid values are 0, 1, and 3. Requests specifying an invalid value will be\n rejected.\n\n Requests for policies with any conditional role bindings must specify\n version 3. Policies with no conditional role bindings may specify any valid\n value or leave the field unset.\n\n The policy in the response might use the policy version that you specified,\n or it might use a lower policy version. For example, if you specify version\n 3, but the policy has no conditional role bindings, the response uses\n version 1.\n\n To learn which resources support conditions in their IAM policies, see the\n [IAM\n documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n### #requested_policy_version=\n\n def requested_policy_version=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- Optional. The maximum policy version that will be used to format the policy.\n\n\n Valid values are 0, 1, and 3. Requests specifying an invalid value will be\n rejected.\n\n Requests for policies with any conditional role bindings must specify\n version 3. Policies with no conditional role bindings may specify any valid\n value or leave the field unset.\n\n The policy in the response might use the policy version that you specified,\n or it might use a lower policy version. For example, if you specify version\n 3, but the policy has no conditional role bindings, the response uses\n version 1.\n\n To learn which resources support conditions in their IAM policies, see the\n [IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies). \n**Returns**\n\n- (::Integer) --- Optional. The maximum policy version that will be used to format the policy.\n\n Valid values are 0, 1, and 3. Requests specifying an invalid value will be\n rejected.\n\n Requests for policies with any conditional role bindings must specify\n version 3. Policies with no conditional role bindings may specify any valid\n value or leave the field unset.\n\n The policy in the response might use the policy version that you specified,\n or it might use a lower policy version. For example, if you specify version\n 3, but the policy has no conditional role bindings, the response uses\n version 1.\n\n To learn which resources support conditions in their IAM policies, see the\n [IAM\n documentation](https://cloud.google.com/iam/help/conditions/resource-policies)."]]