Answers: <p>Looks like only the <code>roles/billing.admin</code>:
  <a href="https://cloud.google.com/iam/docs/understanding-roles#billing-roles" rel="nofollow noreferrer">https://cloud.google.com/iam/docs/understanding-roles#billing-roles</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2019-09-24T13:57:31.253Z
Answers: 2019-09-24T13:57:31.253Z
Answers: erk
Answers: <p>If under unix, with gcloud SDK you can execute the following script:</p>
  
  <pre><code>export expected_permission=billing.accounts.updateUsageExportSpec
  
  for role in $(gcloud iam roles list --format='value(NAME)');                                     
  do permissions=$(gcloud iam roles describe $role --format='value(includedPermissions)')
  if [[ $permissions =~ $expected_permission  ]]; then echo "-------------------------------------------------" &amp;&amp;  echo $role &amp;&amp; echo "-------------------------------------------------"; fi
  done
  </code></pre>
  
  <p>Either way, there's <a href="https://cloud.google.com/iam/docs/permissions-reference" rel="nofollow noreferrer">this reference</a> in official docs where permission/roles mapping can be shown</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-09-25T18:40:51.667Z
Answers: 2019-09-25T18:40:51.667Z
Answers: manasouza
Body: <p>I'd like to see wich <code>Roles</code> in <code>iam</code> yield a certain permission.
  In other words, for a given permission (like <code>billing.accounts.updateUsageExportSpec</code>) I want to know a list of <code>Roles</code>, that satisfy this permission.</p>
  
Tags: <google-cloud-platform><permissions>
Title: See which Roles contain a GCLOUD Permisson
UserDisplayName: Nils Martel
ThreadText: # See which Roles contain a GCLOUD Permisson
  
  (Asked by: username_0 on 2019-09-24)
  
  I'd like to see wich `Roles` in `iam` yield a certain permission.
  In other words, for a given permission (like `billing.accounts.updateUsageExportSpec`) I want to know a list of `Roles`, that satisfy this permission.
  
  **Tags:** google-cloud-platform, permissions
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-09-24. Score: 1
  
  Looks like only the `roles/billing.admin`:
  <https://cloud.google.com/iam/docs/understanding-roles#billing-roles>
  
  
  ---
  
  ### Answer by username_2 on 2019-09-25. Score: 0
  
  If under unix, with gcloud SDK you can execute the following script:
  
  ```
  export expected_permission=billing.accounts.updateUsageExportSpec
  
  for role in $(gcloud iam roles list --format='value(NAME)');                                     
  do permissions=$(gcloud iam roles describe $role --format='value(includedPermissions)')
  if [[ $permissions =~ $expected_permission  ]]; then echo "-------------------------------------------------" &&  echo $role && echo "-------------------------------------------------"; fi
  done
  
  ```
  
  Either way, there's [this reference](https://cloud.google.com/iam/docs/permissions-reference) in official docs where permission/roles mapping can be shown
  
  
  ---
  
  