iam
packagemoduleThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
README¶
IAM API
Go Client Library for IAM API.
Install
go get cloud.google.com/go/iamStability
The stability of this module is indicated by SemVer.
However, av1+ module may have breaking changes in two scenarios:
- Packages with
alphaorbetain the import path - The GoDoc has an explicit stability disclaimer (for example, for an experimental feature).
Go Version Support
See theGo Versions Supportedsection in the root directory's README.
Authorization
See theAuthorizationsection in the root directory's README.
Contributing
Contributions are welcome. Please, see theCONTRIBUTINGdocument for details.
Please note that this project is released with a Contributor Code of Conduct.By participating in this project you agree to abide by its terms. SeeContributor Code of Conductfor more information.
Documentation¶
Overview¶
Package iam supports the resource-specific operations of Google CloudIAM (Identity and Access Management) for the Google Cloud Libraries.Seehttps://cloud.google.com/iam for more about IAM.
Users of the Google Cloud Libraries will typically not use this packagedirectly. Instead they will begin with some resource that supports IAM, likea pubsub topic, and call its IAM method to get a Handle for that resource.
Index¶
Constants¶
const (// AllUsers is a special member that denotes all users, even unauthenticated ones.AllUsers = "allUsers"// AllAuthenticatedUsers is a special member that denotes all authenticated users.AllAuthenticatedUsers = "allAuthenticatedUsers")
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeHandle¶
type Handle struct {// contains filtered or unexported fields}A Handle provides IAM operations for a resource.
funcInternalNewHandle¶
func InternalNewHandle(conngrpc.ClientConnInterface, resourcestring) *Handle
InternalNewHandle is for use by the Google Cloud Libraries only.
InternalNewHandle returns a Handle for resource.The conn parameter refers to a server that must support the IAMPolicy service.
funcInternalNewHandleClient¶
InternalNewHandleClient is for use by the Google Cloud Libraries only.
InternalNewHandleClient returns a Handle for resource using the givenclient implementation.
funcInternalNewHandleGRPCClient¶
func InternalNewHandleGRPCClient(cpb.IAMPolicyClient, resourcestring) *Handle
InternalNewHandleGRPCClient is for use by the Google Cloud Libraries only.
InternalNewHandleClient returns a Handle for resource using the givengrpc service that implements IAM as a mixin
func (*Handle)SetPolicy¶
SetPolicy replaces the resource's current policy with the supplied Policy.
If policy was created from a prior call to Get, then the modification willonly succeed if the policy has not changed since the Get.
func (*Handle)TestPermissions¶
TestPermissions returns the subset of permissions that the caller has on the resource.
typeHandle3¶
type Handle3 struct {// contains filtered or unexported fields}A Handle3 provides IAM operations for a resource. It is similar to a Handle, but provides access to newer IAM features (e.g., conditions).
func (*Handle3)Policy¶
Policy retrieves the IAM policy for the resource.
requestedPolicyVersion is always set to 3.
typePolicy¶
type Policy struct {// This field is exported for use by the Google Cloud Libraries only.// It may become unexported in a future release.InternalProto *pb.Policy}A Policy is a list of Bindings representing rolesgranted to members.
The zero Policy is a valid policy with no bindings.
func (*Policy)Add¶
Add adds member member to role r if it is not already present.A new binding is created if there is no binding for the role.
func (*Policy)Members¶
Members returns the list of members with the supplied role.The return value should not be modified. Use Add and Removeto modify the members of a role.
Directories¶
| Path | Synopsis |
|---|---|
admin | |
apiv1 Package admin is an auto-generated package for the Identity and Access Management (IAM) API. | Package admin is an auto-generated package for the Identity and Access Management (IAM) API. |
Package iam is an auto-generated package for the IAM Meta API. | Package iam is an auto-generated package for the IAM Meta API. |
Package iam is an auto-generated package for the Identity and Access Management (IAM) API. | Package iam is an auto-generated package for the Identity and Access Management (IAM) API. |
credentials | |
apiv1 Package credentials is an auto-generated package for the IAM Service Account Credentials API. | Package credentials is an auto-generated package for the IAM Service Account Credentials API. |