gdcloud iam service-accounts keys delete - 從服務帳戶刪除公開金鑰。
概要
gdcloud iam service-accounts keys delete KEY_ID [flags]
說明
從專案的服務帳戶中刪除公開金鑰後,相關聯的私密金鑰就會失效。必須提供公開金鑰的 ID。您可以執行「gdcloud iam service-accounts keys list」指令,列出服務帳戶中所有公開金鑰的 ID。
範例
To delete a public key with ID "ab98fa9a-dae0-401f" from service account "psa-test" in project "iam-test", run:
gdcloud iam service-accounts keys delete ab98fa9a-dae0-401f --iam-account=psa-test --project=iam-test
必要標記
--iam-account string Project's service account to delete the public key from. The flag is required to run the command.
[[["容易理解","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\u003eThis command deletes a specified public key from a project's service account, rendering the corresponding private key invalid.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKEY_ID\u003c/code\u003e of the public key to be deleted is required and can be obtained using the \u003ccode\u003egdcloud iam service-accounts keys list\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--iam-account\u003c/code\u003e flag is mandatory and specifies the service account from which the public key should be deleted.\u003c/p\u003e\n"],["\u003cp\u003eThe command requires a specified key id as well as the service account it is attached to in order to operate.\u003c/p\u003e\n"],["\u003cp\u003eAn example command to delete a key is provided, showing all necessary syntax and flags to do so.\u003c/p\u003e\n"]]],[],null,["# gdcloud iam service-accounts keys delete\n\nNAME\n----\n\ngdcloud iam service-accounts keys delete - Delete a public key from a service account.\n\nSYNOPSIS\n--------\n\n gdcloud iam service-accounts keys delete KEY_ID [flags]\n\nDESCRIPTION\n-----------\n\nDelete a public key from a project's service account, and the associated private key becomes invalid. The ID of the public key must be provided. You can run command \"gdcloud iam service-accounts keys list\" to list the ID of all the public keys from a service account.\n\n### EXAMPLES\n\n\n To delete a public key with ID \"ab98fa9a-dae0-401f\" from service account \"psa-test\" in project \"iam-test\", run:\n\n gdcloud iam service-accounts keys delete ab98fa9a-dae0-401f --iam-account=psa-test --project=iam-test\n\n### REQUIRED FLAGS\n\n --iam-account string Project's service account to delete the public key from. The flag is required to run the command.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page."]]