Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
NOM
gdcloud iam service-accounts keys : permet de gérer les clés d'un compte de service d'un projet.
SYNOPSIS
gdcloud iam service-accounts keys COMMAND [flags]
DESCRIPTION
Créez, listez ou supprimez des identifiants pour le compte de service d'un projet. Vous devez disposer du rôle "Administrateur IAM du projet" dans un projet pour gérer les clés des comptes de service de ce projet.
EXAMPLES
To create an application default credentials JSON file "/tmp/my-key.json" for service account "psa-test" in project "iam-test" using cacert file "/tmp/ca.crt", run:
gdcloud iam service-accounts keys create /tmp/my-key.json --iam-account=psa-test --project=iam-test --ca-cert-path=/tmp/ca.crt
To list all the public keys for service account "psa-test" in project "iam-test", run:
gdcloud iam service-accounts keys list --iam-account=psa-test --project=iam-test
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
OPTIONS GCLOUD GÉNÉRALES
Ces options sont disponibles pour toutes les commandes : --help.
create
Create an application default credentials JSON file which contains a private key for a service account.
delete
Delete a public key from a service account.
list
List all the public keys for a service account.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud iam service-accounts keys\u003c/code\u003e command manages credentials for a project's service accounts.\u003c/p\u003e\n"],["\u003cp\u003eYou can create application default credentials JSON files containing private keys for service accounts.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to list all public keys associated with a specific service account.\u003c/p\u003e\n"],["\u003cp\u003ePublic keys can be deleted from a service account using their unique ID.\u003c/p\u003e\n"],["\u003cp\u003eThe command requires the user to have the "project-iam-admin" role.\u003c/p\u003e\n"]]],[],null,["# gdcloud iam service-accounts keys\n\nNAME\n----\n\ngdcloud iam service-accounts keys - Manage keys for a project's service account.\n\nSYNOPSIS\n--------\n\n gdcloud iam service-accounts keys COMMAND [flags]\n\nDESCRIPTION\n-----------\n\nCreate, list, or delete credentials for a project's service account. You must have the \"project-iam-admin\" role in a project to manage the service accounts' keys for that project.\n\n### EXAMPLES\n\n\n To create an application default credentials JSON file \"/tmp/my-key.json\" for service account \"psa-test\" in project \"iam-test\" using cacert file \"/tmp/ca.crt\", run:\n\n gdcloud iam service-accounts keys create /tmp/my-key.json --iam-account=psa-test --project=iam-test --ca-cert-path=/tmp/ca.crt\n\n To list all the public keys for service account \"psa-test\" in project \"iam-test\", run:\n\n gdcloud iam service-accounts keys list --iam-account=psa-test --project=iam-test\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### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--help`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page.\n\n### COMMANDS\n\n`COMMAND` is one of the following: \n\n create\n Create an application default credentials JSON file which contains a private key for a service account.\n delete\n Delete a public key from a service account.\n list\n List all the public keys for a service account."]]