func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
IamPolicyCallOptions contains the retry settings for each method of IamPolicyClient.
type IamPolicyCallOptions struct { SetIamPolicy []gax.CallOption GetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption }
IamPolicyClient is a client for interacting with IAM Meta API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
type IamPolicyClient struct { // The call options for this service. CallOptions *IamPolicyCallOptions // contains filtered or unexported fields }
func NewIamPolicyClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
NewIamPolicyClient creates a new iam policy client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
▹ Example
func NewIamPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) (*IamPolicyClient, error)
NewIamPolicyRESTClient creates a new iam policy rest client.
Manages Identity and Access Management (IAM) policies.
Any implementation of an API that offers access control features implements the google.iam.v1.IAMPolicy interface.
Data modelAccess control is applied when a principal (user or service account), takes some action on a resource exposed by a service. Resources, identified by URI-like names, are the unit of access control specification. Service implementations can choose the granularity of access control and the supported permissions for their resources. For example one database service may allow access control to be specified only at the Table level, whereas another might allow access control to also be specified at the Column level.
This is intentionally not a CRUD style API because access control policies are created and deleted implicitly with the resources to which they are attached.
▹ Example
func (c *IamPolicyClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (c *IamPolicyClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (c *IamPolicyClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
▹ Example
func (c *IamPolicyClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
▹ Example
func (c *IamPolicyClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
▹ Example