Difference between revisions of "Gcloud iam service-accounts keys create"

From wikieduonline
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
<code>[[gcloud iam service-accounts keys]] create</code>
+
<code>[[gcloud iam service-accounts keys]] create OUTPUT-FILE  --iam-account [email protected].[[gserviceacccount.com]]</code>
* https://cloud.google.com/iam/docs/creating-managing-service-account-keys
+
:https://cloud.google.com/iam/docs/creating-managing-service-account-keys
  
 +
* [[Google cloud roles|Role]]: <code>[[roles/iam.serviceAccountKeyAdmin]]</code> required
  
  [[gcloud iam service-accounts keys]] create FILE_NAME.json --iam-account=SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com
+
== Examples ==
 +
  [[gcloud iam service-accounts keys]] create --iam-account=SERVICE_ACCOUNT_NAME@PROJECT_ID.[[iam.gserviceaccount.com]] OUTPUT_FILE_NAME_WITH_CREDENTIALS[[.json]]
 +
created key [XXXXXXXX] of type [json] as [OUTPUT_FILE_NAME_WITH_CREDENTIALS.json] for SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com  
  
 +
 +
created key [1974eb1f2d4a3569xadfaadsf] of type [json] as [your-user.json] for [your-user@your-project.[[iam.gserviceaccount.com]]]
  
 
  gcloud iam service-accounts keys create FILE_NAME.json --iam-account=SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com outputfile[[.json]]
 
  gcloud iam service-accounts keys create FILE_NAME.json --iam-account=SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com outputfile[[.json]]
  
 
  [[gcloud iam service-accounts keys]] create service-account-file.json
 
  [[gcloud iam service-accounts keys]] create service-account-file.json
 
  
 
== Related ==
 
== Related ==
 +
* <code>[[gcloud iam service-accounts create]]</code>
 
* <code>[[gcloud auth activate-service-account]]</code>
 
* <code>[[gcloud auth activate-service-account]]</code>
 
* <code>[[aws iam create-access-key]]</code>
 
* <code>[[aws iam create-access-key]]</code>
 
* <code>export [[GOOGLE_APPLICATION_CREDENTIALS]]="/home/user/Downloads/service-account-file.json"</code>
 
* <code>export [[GOOGLE_APPLICATION_CREDENTIALS]]="/home/user/Downloads/service-account-file.json"</code>
 
* [[GitLab CI: variables:]]
 
* [[GitLab CI: variables:]]
 +
* <code>[[ssh-keygen]]</code>
 +
* <code>[[your_key_file_name.json]]</code>
 +
* <code>[[cloud iam service-accounts keys list]]</code>
  
 
== See also ==
 
== See also ==
 
* {{gcloud iam service-accounts}}
 
* {{gcloud iam service-accounts}}
* {{gcloud iam}}
 
  
 
[[Category:GCP]]
 
[[Category:GCP]]

Latest revision as of 14:14, 24 November 2022

gcloud iam service-accounts keys create OUTPUT-FILE --iam-account [email protected].gserviceacccount.com

https://cloud.google.com/iam/docs/creating-managing-service-account-keys

Examples[edit]

gcloud iam service-accounts keys create --iam-account=SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com OUTPUT_FILE_NAME_WITH_CREDENTIALS.json
created key [XXXXXXXX] of type [json] as [OUTPUT_FILE_NAME_WITH_CREDENTIALS.json] for SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com 


created key [1974eb1f2d4a3569xadfaadsf] of type [json] as [your-user.json] for [your-user@your-project.iam.gserviceaccount.com]
gcloud iam service-accounts keys create FILE_NAME.json --iam-account=SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com outputfile.json
gcloud iam service-accounts keys create service-account-file.json

Related[edit]

See also[edit]

Advertising: