名称
gdcloud iam service-accounts keys create - 创建一个包含服务账号私钥的应用默认凭据 JSON 文件。
摘要
gdcloud iam service-accounts keys create FILE_NAME [flags]
说明
为项目的服务账号创建一对公钥/私钥,并将私钥放入 JSON 文件中。该文件可用于从 AIS 交换 STS 令牌。
示例
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
必需标志
--iam-account string Project's service account to create the key for. The flag is required to run the command.
可选标志
--ca-cert-path string CA cert path to verify the authentication endpoint. If omitted, then the system cert chain will be used.
GDCLOUD 全局标志
以下标志适用于所有命令:--configuration、--format、--help、--project、--quiet。
如需了解详情,请参阅 gdcloud CLI 参考概览页面。