gdcloud iam service-accounts keys create

名稱

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

詳情請參閱 gcloud CLI 參考資料總覽頁面。