公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
GetIamPolicyRequest
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
字段 |
resource |
string
必需字段:要为其请求政策的资源。如需了解此字段的适当值,请参阅资源名称。
|
options |
object (GetPolicyOptions )
可选:用于指定 GetIamPolicy 选项的 GetPolicyOptions 对象。
|
GetPolicyOptions
JSON 表示法 |
{
"requestedPolicyVersion": integer
} |
字段 |
requestedPolicyVersion |
integer
可选。将用于设置政策格式的最高政策版本。 有效值包括 0、1 和 3。指定无效值的请求将被拒绝。 对具有任何条件角色绑定的政策的请求必须指定版本 3。没有任何条件角色绑定的政策可以指定任何有效值,也可以不设置该字段。 响应中的政策可能会使用您指定的政策版本,也可能会使用较低的政策版本。例如,如果您指定版本 3,但政策没有任何条件角色绑定,则响应将使用版本 1。 如需了解哪些资源支持在其 IAM 政策中使用条件,请参阅 IAM 文档。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe \u003ccode\u003eGetIamPolicy\u003c/code\u003e request retrieves the IAM policy for a specified Google Earth Engine resource.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the \u003ccode\u003eresource\u003c/code\u003e for which the policy is being requested.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, \u003ccode\u003eGetPolicyOptions\u003c/code\u003e can be included to specify the desired policy version (0, 1, or 3).\u003c/p\u003e\n"],["\u003cp\u003ePolicies with conditional role bindings must use version 3, while others may use any valid version or leave it unset.\u003c/p\u003e\n"],["\u003cp\u003eThe response might contain a lower policy version than requested if the resource doesn't support the specified version.\u003c/p\u003e\n"]]],[],null,["# GetIamPolicyRequest\n\nRequest message for `GetIamPolicy` method.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"resource\": string, \"options\": { object (/earth-engine/reference/rest/Shared.Types/GetIamPolicyRequest#GetPolicyOptions) } } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `resource` | `string` REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. |\n| `options` | `object (`[GetPolicyOptions](/earth-engine/reference/rest/Shared.Types/GetIamPolicyRequest#GetPolicyOptions)`)` OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. |\n\nGetPolicyOptions\n----------------\n\nEncapsulates settings provided to GetIamPolicy.\n\n| JSON representation |\n|-----------------------------------------------|\n| ``` { \"requestedPolicyVersion\": integer } ``` |\n\n| Fields ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestedPolicyVersion` | `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](https://cloud.google.com/iam/help/conditions/resource-policies). |"]]