This page contains code samples for Identity and Access Management. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.
View in documentation
Add a principal to a role binding
Demonstrates adding a principal to an existing role binding in an IAM policy.
View in documentation
Create a token for workload identity federation with AWS
Creates a token that IAM workload identity federation can verify without revealing the AWS secret access key.
View in documentation
Delete a deny policy
Delete the policy if you no longer want to enforce the rules in a deny policy.
View in documentation
View in documentation
View in documentation
View in documentation
Remove a member from a role binding
Demonstrates removing a member from a role binding in an IAM policy.
View in documentation
Test permissions
Demonstrates testing whether the caller has specified permissions.
View in documentation
Update a deny policy
Update the deny rules and/ or its display name after policy creation.
View in documentation
View in documentation