Class IAMPolicyClientImpl (2.4.0)

public sealed class IAMPolicyClientImpl : IAMPolicyClient

IAMPolicy client wrapper implementation, for convenient use.

Inheritance

Object > IAMPolicyClient > IAMPolicyClientImpl

Namespace

Google.Cloud.Iam.V1

Assembly

Google.Cloud.Iam.V1.dll

Remarks

API Overview

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 model

Access 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.

Policy Structure

See google.iam.v1.Policy

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.

Constructors

IAMPolicyClientImpl(IAMPolicy.IAMPolicyClient, IAMPolicySettings, Logging.ILogger)

public IAMPolicyClientImpl(IAMPolicy.IAMPolicyClient grpcClient, IAMPolicySettings settings, Logging.ILogger logger)

Constructs a client wrapper for the IAMPolicy service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientIAMPolicy.IAMPolicyClient

The underlying gRPC client.

settingsIAMPolicySettings

The base IAMPolicySettings used within this client.

loggerLogging.ILogger

Optional to use within this client.

Properties

GrpcClient

public override IAMPolicy.IAMPolicyClient GrpcClient { get; }

The underlying gRPC IAMPolicy client

Property Value
TypeDescription
IAMPolicy.IAMPolicyClient
Overrides

Methods

GetIamPolicy(GetIamPolicyRequest, Api.Gax.Grpc.CallSettings)

public override Policy GetIamPolicy(GetIamPolicyRequest request, Api.Gax.Grpc.CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsApi.Gax.Grpc.CallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Overrides

GetIamPolicyAsync(GetIamPolicyRequest, Api.Gax.Grpc.CallSettings)

public override System.Threading.Tasks.Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, Api.Gax.Grpc.CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsApi.Gax.Grpc.CallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
System.Threading.Tasks.Task<Policy>

A Task containing the RPC response.

Overrides

SetIamPolicy(SetIamPolicyRequest, Api.Gax.Grpc.CallSettings)

public override Policy SetIamPolicy(SetIamPolicyRequest request, Api.Gax.Grpc.CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
NameDescription
requestSetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsApi.Gax.Grpc.CallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Overrides

SetIamPolicyAsync(SetIamPolicyRequest, Api.Gax.Grpc.CallSettings)

public override System.Threading.Tasks.Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, Api.Gax.Grpc.CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
NameDescription
requestSetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsApi.Gax.Grpc.CallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
System.Threading.Tasks.Task<Policy>

A Task containing the RPC response.

Overrides

TestIamPermissions(TestIamPermissionsRequest, Api.Gax.Grpc.CallSettings)

public override TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, Api.Gax.Grpc.CallSettings callSettings = null)

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.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request object containing all of the parameters for the API call.

callSettingsApi.Gax.Grpc.CallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

The RPC response.

Overrides

TestIamPermissionsAsync(TestIamPermissionsRequest, Api.Gax.Grpc.CallSettings)

public override System.Threading.Tasks.Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, Api.Gax.Grpc.CallSettings callSettings = null)

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.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request object containing all of the parameters for the API call.

callSettingsApi.Gax.Grpc.CallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
System.Threading.Tasks.Task<TestIamPermissionsResponse>

A Task containing the RPC response.

Overrides