()
| 48 | // const resourceName = client.keyRingPath(projectId, locationId, keyRingId); |
| 49 | |
| 50 | async function iamGetPolicy() { |
| 51 | const [policy] = await client.getIamPolicy({ |
| 52 | resource: resourceName, |
| 53 | }); |
| 54 | |
| 55 | for (const binding of policy.bindings) { |
| 56 | console.log(`Role: ${binding.role}`); |
| 57 | for (const member of binding.members) { |
| 58 | console.log(` - ${member}`); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | return policy; |
| 63 | } |
| 64 | |
| 65 | return iamGetPolicy(); |
| 66 | // [END kms_iam_get_policy] |