Difference between revisions of "Gcloud projects get-iam-policy"

From wikieduonline
Jump to navigation Jump to search
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 +
https://cloud.google.com/sdk/gcloud/reference/projects/get-iam-policy
 +
 +
[[gcloud projects]] get-iam-policy your_project_name
 +
 +
gcloud projects get-iam-policy $GCP_PROJECT_NAME --flatten="bindings[].members" --format="table(bindings.members)"
 +
 +
  gcloud projects get-iam-policy $GCP_PROJECT_NAME --flatten="bindings[].members" --format="table(bindings.members)" | [[grep .]] | [[sort -u]]
  
 
  [[gcloud projects]] get-iam-policy your_project_name
 
  [[gcloud projects]] get-iam-policy your_project_name
Line 7: Line 14:
 
   - user: your_username2@your_domain.com
 
   - user: your_username2@your_domain.com
  
  gcloud projects get-iam-policy elucidate-co
+
 
 +
- condition:
 +
    expression: resource.name == "your-bucket-name"
 +
    title: Your-tible
 +
  members:
 +
 +
  role: roles/[[storage.admin]]
 +
 
 +
 
 +
== Errors ==
 +
  gcloud projects get-iam-policy project-co
 
  ERROR: (gcloud.projects.[[get-iam-policy]]) User [local-user@your-project.[[iam.gserviceaccount.com]]] does not have permission to  access projects instance [your-project:getIamPolicy] (or it may not exist): The caller does not have permission
 
  ERROR: (gcloud.projects.[[get-iam-policy]]) User [local-user@your-project.[[iam.gserviceaccount.com]]] does not have permission to  access projects instance [your-project:getIamPolicy] (or it may not exist): The caller does not have permission
 
  
 
== Related ==
 
== Related ==
Line 15: Line 31:
 
* <code>[[gcloud projects add-iam-policy-binding]]</code>
 
* <code>[[gcloud projects add-iam-policy-binding]]</code>
 
* [[IAM Conditions]]
 
* [[IAM Conditions]]
 +
* [[Terraform IAM policy for projects]]
 +
* <code>[[expression:]]</code>
 +
* <code>[[gcloud iam]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{gcloud projects iam}}
 
* {{gcloud projects}}
 
* {{gcloud projects}}
* {{gcloud}}
+
* {{Gcloud policies}}
  
 
[[Category:GCP]]
 
[[Category:GCP]]

Latest revision as of 10:08, 21 November 2022

https://cloud.google.com/sdk/gcloud/reference/projects/get-iam-policy

gcloud projects get-iam-policy your_project_name
gcloud projects get-iam-policy $GCP_PROJECT_NAME --flatten="bindings[].members" --format="table(bindings.members)"
 gcloud projects get-iam-policy $GCP_PROJECT_NAME --flatten="bindings[].members" --format="table(bindings.members)" | grep . | sort -u
gcloud projects get-iam-policy your_project_name
.../...
- members:
  - user: your_username1@your_domain.com
  - user: your_username2@your_domain.com


- condition:
    expression: resource.name == "your-bucket-name"
    title: Your-tible
  members:
  - user:[email protected]
  role: roles/storage.admin


Errors[edit]

gcloud projects get-iam-policy project-co
ERROR: (gcloud.projects.get-iam-policy) User [local-user@your-project.iam.gserviceaccount.com] does not have permission to  access projects instance [your-project:getIamPolicy] (or it may not exist): The caller does not have permission

Related[edit]

See also[edit]

Advertising: