GoogleCloudPlatform / golang-samples

Sample apps and code written for Google Cloud in the Go programming language.
Apache License 2.0
4.29k stars 1.73k forks source link

feat(iam): Add iam v2 Go client libraries/ samples #4271

Closed vijaykanthm closed 2 months ago

vijaykanthm commented 2 months ago

Description

Reference to https://b.corp.google.com/issues/339692211 This PR adds v2 API Go client samples for the Get IAM Policies, Set IAM Policies and Test IAM Permissions.

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

snippet-bot[bot] commented 2 months ago

Here is the summary of changes.

You are about to add 3 region tags. - [securitycenter/iamv2/get_iam_policies.go:17](https://github.com/vijaykanthm/golang-samples/blob/a63a2bf4fe950d0efad7805ff862c5764435d500/securitycenter/iamv2/get_iam_policies.go#L17), tag `securitycenter_get_iam_policies_v2` - [securitycenter/iamv2/set_iam_policies.go:17](https://github.com/vijaykanthm/golang-samples/blob/a63a2bf4fe950d0efad7805ff862c5764435d500/securitycenter/iamv2/set_iam_policies.go#L17), tag `securitycenter_set_iam_policies_v2` - [securitycenter/iamv2/test_iam_permissions.go:17](https://github.com/vijaykanthm/golang-samples/blob/a63a2bf4fe950d0efad7805ff862c5764435d500/securitycenter/iamv2/test_iam_permissions.go#L17), tag `securitycenter_test_iam_permissions_v2`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

vijaykanthm commented 2 months ago

Hi @vijaykanthm, can you please add region tags to your samples? They should look like this: // [START securitycenter_*]. Let me know if you need additional guidance. Thanks!

Thank you for pointing it out. Added them.