Earth Engine 即將推出
非商業用途的配額級別,以便保護共用運算資源,並確保所有使用者都能享有穩固效能。所有非商業用途的專案都必須在
2026 年 4 月 27 日前選取配額級別,否則屆時會預設為「社群」級別。在
2026 年 4 月 27 日,所有專案 (無論選取級別的日期為何) 的級別配額都會生效。
瞭解詳情。
Method: projects.assets.testIamPermissions
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
傳回呼叫者對指定資源所擁有的權限。如果資源不存在,則會傳回空白的權限組合,而非 NOT_FOUND 錯誤訊息。
附註:這項作業是設計用於建構權限感知 UI 和指令列工具,而不是用於授權檢查。這項作業可能會在沒有警告的情況下產生「失敗開放」。
HTTP 要求
POST https://earthengine.googleapis.com/v1/{resource=projects/*/assets/**}:testIamPermissions
這個網址使用 gRPC 轉碼語法。
路徑參數
| 參數 |
resource |
string
必要:要求政策詳細資料的資源。如要瞭解這個欄位的適當值,請參閱「資源名稱」。
|
要求主體
要求主體的資料會採用以下結構:
| JSON 表示法 |
{
"permissions": [
string
]
} |
| 欄位 |
permissions[] |
string
針對 resource 要檢查的權限組合。不允許使用萬用字元 (例如 * 或 storage.*)。詳情請參閱「身分與存取權管理總覽」。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/earthengine.readonly
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-platform.read-only
詳情請參閱 OAuth 2.0 Overview。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],["This endpoint, using a POST request to the specified URL, retrieves a caller's permissions for a given resource. It requires the resource path as a parameter and a JSON request body with a list of permissions to check. Wildcard permissions are not permitted. The response indicates the permissions held, returning an empty set if the resource doesn't exist. This is designed for UI/tool development, not for authorization checks, and can \"fail open.\" OAuth scopes are required for authorization.\n"]]