Registry / cloud / go-iam

go-iam

JSON →
library1.11.0gogounverified

Package iam provides client libraries for the Google Cloud IAM API.

go get cloud.google.com/go/iam
INSTALL
IMPORT
SIG · GO-IAM
G
go-iam
cloudgov1.11.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

iam
cloud.google.com/go/iam

Get a service account from Google Cloud IAM

package main import ( "context" "fmt" "cloud.google.com/go/iam" "cloud.google.com/go/iam/admin/apiv1" adminpb "cloud.google.com/go/iam/admin/apiv1/adminpb" ) func main() { ctx := context.Background() client, err := admin.NewIamClient(ctx) if err != nil { panic(err) } defer client.Close() req := &adminpb.GetServiceAccountRequest{Name: "projects/-/serviceAccounts/test@project.iam.gserviceaccount.com"} sa, err := client.GetServiceAccount(ctx, req) if err != nil { panic(err) } fmt.Println(sa.Email) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.11.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
Resources
go-iam — go get go-iam · libregistry