Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
NOM
gdcloud iam service-accounts keys create : créez un fichier JSON d'identifiants par défaut de l'application contenant une clé privée pour un compte de service.
SYNOPSIS
gdcloud iam service-accounts keys create FILE_NAME [flags]
DESCRIPTION
Créez une paire de clés publique/privée pour le compte de service d'un projet et placez la clé privée dans un fichier JSON. Le fichier peut être utilisé pour échanger un jeton STS depuis AIS.
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
DRAPEAUX REQUIS
--iam-account string Project's service account to create the key for. The flag is required to run the command.
INDICATEURS FACULTATIFS
--ca-cert-path string CA cert path to verify the authentication endpoint. If omitted, then the system cert chain will be used.
OPTIONS GCLOUD GÉNÉRALES
Ces options sont disponibles pour toutes les commandes : --configuration, --format, --help, --project, --quiet.
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 create\u003c/code\u003e command generates a private key for a service account and saves it in a JSON file.\u003c/p\u003e\n"],["\u003cp\u003eThis JSON file can be used to obtain an STS token from AIS.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--iam-account\u003c/code\u003e flag is required and specifies the service account for which to create the key.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--ca-cert-path\u003c/code\u003e flag is optional and allows you to specify a custom CA certificate for authentication.\u003c/p\u003e\n"],["\u003cp\u003eThe command requires a file path where the key will be stored as the first argument after \u003ccode\u003ecreate\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# gdcloud iam service-accounts keys create\n\nNAME\n----\n\ngdcloud iam service-accounts keys create - Create an application default credentials JSON file which contains a private key for a service account.\n\nSYNOPSIS\n--------\n\n gdcloud iam service-accounts keys create FILE_NAME [flags]\n\nDESCRIPTION\n-----------\n\nCreate a pair of public/private keys for a project's service account and put the private key into a JSON file. The file can be used to exchange for an STS token from AIS.\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### REQUIRED FLAGS\n\n --iam-account string Project's service account to create the key for. The flag is required to run the command.\n\n### OPTIONAL FLAGS\n\n --ca-cert-path string CA cert path to verify the authentication endpoint. If omitted, then the system cert chain will be used.\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."]]