Method: projects.locations.features.testIamPermissions
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
指定されたリソースに対して呼び出し元が持っている権限を返します。リソースが存在しない場合、NOT_FOUND
エラーではなく、空の権限セットが返されます。
注: このオペレーションは、承認チェックではなく、権限に対応した UI とコマンドライン ツールの構築に使用するように設計されています。このオペレーションは警告なしに「フェイル オープン」することがあります。
HTTP リクエスト
POST https://gkehub.googleapis.com/v1beta/{resource=projects/*/locations/*/features/*}:testIamPermissions
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
resource |
string
必須: ポリシー詳細リクエストの対象となるリソース。このフィールドに適切な値については、リソース名をご覧ください。
|
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
JSON 表現 |
{
"permissions": [
string
]
} |
フィールド |
permissions[] |
string
resource に対して確認する権限のセット。ワイルドカード付きの権限(* や storage.* など)は使用できません。詳細については IAM の概要をご覧ください。
|
レスポンスの本文
成功した場合、レスポンスの本文には TestIamPermissionsResponse
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud-platform
詳細については、認証の概要をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-05-16 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-05-16 UTC。"],[],[],null,["# Method: projects.locations.features.testIamPermissions\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nReturns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.\n\n### HTTP request\n\n`POST https://gkehub.googleapis.com/v1beta/{resource=projects/*/locations/*/features/*}:testIamPermissions`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [TestIamPermissionsResponse](/kubernetes-engine/fleet-management/docs/reference/rest/Shared.Types/TestIamPermissionsResponse).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]