Identity and Access Management (IAM) API 會使用 Kubernetes 自訂資源,管理身分提供者的存取權控管。
如要使用 IAM API,請使用 GDC 控制台。如果您的應用程式使用自己的程式庫呼叫 API,請採用下一節中的範例服務端點,並使用完整 API 定義來建構要求。
服務端點和探索文件
IAM API 的 API 端點為 https://MANAGEMENT_API_SERVER_ENDPOINT/apis/iam.gdc.goog/v1,其中 MANAGEMENT_API_SERVER_ENDPOINT 是 Management API 伺服器的端點。
使用 kubectl proxy 指令在瀏覽器中存取網址,取得 IAM API 的探索文件。kubectl proxy 指令會在您本機電腦的 127.0.0.1:8001 上,開啟 Kubernetes API 伺服器的 Proxy。執行該指令後,請前往下列網址存取文件:http://127.0.0.1:8001/apis/iam.gdc.goog/v1
[[["容易理解","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-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe Identity and Access Management (IAM) API leverages Kubernetes custom resources to manage access control for identity providers.\u003c/p\u003e\n"],["\u003cp\u003eThe IAM API is accessible through the GDC console, or you can use your own libraries, adopting the example service endpoint and full API definition to build requests.\u003c/p\u003e\n"],["\u003cp\u003eThe IAM API endpoint is located at \u003ccode\u003ehttps://\u003c/code\u003e\u003cvar translate=no\u003eGDCH_API_SERVER_ENDPOINT\u003c/var\u003e\u003ccode\u003e/apis/iam.gdc.goog/v1\u003c/code\u003e, where \u003cvar translate=no\u003eGDCH_API_SERVER_ENDPOINT\u003c/var\u003e represents the GDC API server endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe discovery document for the IAM API can be obtained by using the \u003ccode\u003ekubectl proxy\u003c/code\u003e command and then accessing \u003ccode\u003ehttp://127.0.0.1:8001/apis/iam.gdc.goog/v1\u003c/code\u003e in your browser.\u003c/p\u003e\n"]]],[],null,["# Identity and Access Management API overview\n\nThe Identity and Access Management (IAM) API uses Kubernetes custom resources\nto manage the control access for identity providers.\n\nTo use the IAM API, use the GDC console. If\nyour application uses your own libraries to call the API, adopt the example\nservice endpoint in the following section, and the\n[full API definition](./identity-v1) to build your requests.\n\nService endpoint and discovery document\n---------------------------------------\n\nThe API endpoint for the IAM API is\n`https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/iam.gdc.goog/v1`,\nwhere \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e is the endpoint of\nthe Management API server.\n\nUsing the `kubectl proxy` command, access the URL in your browser to\nobtain the discovery document for the IAM API. The `kubectl proxy` command opens\nup a proxy on `127.0.0.1:8001` to the Kubernetes API server on your local\nmachine. Once that command is running, access the document at the\nfollowing URL:\n`http://127.0.0.1:8001/apis/iam.gdc.goog/v1`\n\nExample resources\n-----------------\n\nThe following is a sample resource: \n\n apiVersion: iam.gdc.goog/v1\n kind: IdentityProviderConfig\n metadata:\n name: example-provider\n namespace: platform\n spec:\n - oidc:\n clientID: clientID\n clientSecret: clientSecret\n groupPrefix: example-\n groupsClaim: groups\n issuerURI: https://test-oidc-provider.example.com\n scopes: openid email profile\n userClaim: user-email@example.com\n userPrefix: example-"]]