您目前查看的是已封存的 1.21 版服務網格說明文件。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Method: projects.locations.tcpRoutes.testIamPermissions
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
傳回呼叫者對指定資源所擁有的權限。如果資源不存在,則會傳回空白的權限組合,而非 NOT_FOUND 錯誤。
附註:這項作業是設計用於建構權限感知 UI 和指令列工具,而不是用於授權檢查。這項作業可能會在沒有警告的情況下產生「失敗開放」。
HTTP 要求
POST https://networkservices.googleapis.com/v1alpha1/{resource=projects/*/locations/*/tcpRoutes/*}:testIamPermissions
這個網址使用 gRPC 轉碼語法。
路徑參數
| 參數 |
resource |
string
必要:要求政策詳細資訊的資源。如要瞭解這個欄位的適當值,請參閱「資源名稱」。
|
要求主體
要求主體包含下列結構的資料:
| JSON 表示法 |
{
"permissions": [
string
]
} |
| 欄位 |
permissions[] |
string
針對 resource 要檢查的權限組合。不允許使用萬用字元 (例如 * 或 storage.*)。詳情請參閱「身分與存取權管理總覽」。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/cloud-platform
詳情請參閱驗證總覽一文。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-10-19 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-10-19 (世界標準時間)。"],[],[]]