Google Cloud Identity and Access Management (IAM) v2 API - Class PoliciesClientImpl (1.1.0)

public sealed class PoliciesClientImpl : PoliciesClient

Reference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v2 API class PoliciesClientImpl.

Policies client wrapper implementation, for convenient use.

Inheritance

object > PoliciesClient > PoliciesClientImpl

Namespace

Google.Cloud.Iam.V2

Assembly

Google.Cloud.Iam.V2.dll

Remarks

An interface for managing Identity and Access Management (IAM) policies.

Constructors

PoliciesClientImpl(PoliciesClient, PoliciesSettings, ILogger)

public PoliciesClientImpl(Policies.PoliciesClient grpcClient, PoliciesSettings settings, ILogger logger)

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

Parameters
NameDescription
grpcClientPoliciesPoliciesClient

The underlying gRPC client.

settingsPoliciesSettings

The base PoliciesSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

CreatePolicyOperationsClient

public override OperationsClient CreatePolicyOperationsClient { get; }

The long-running operations client for CreatePolicy.

Property Value
TypeDescription
OperationsClient
Overrides

DeletePolicyOperationsClient

public override OperationsClient DeletePolicyOperationsClient { get; }

The long-running operations client for DeletePolicy.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override Policies.PoliciesClient GrpcClient { get; }

The underlying gRPC Policies client

Property Value
TypeDescription
PoliciesPoliciesClient
Overrides

UpdatePolicyOperationsClient

public override OperationsClient UpdatePolicyOperationsClient { get; }

The long-running operations client for UpdatePolicy.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

CreatePolicy(CreatePolicyRequest, CallSettings)

public override Operation<Policy, PolicyOperationMetadata> CreatePolicy(CreatePolicyRequest request, CallSettings callSettings = null)

Creates a policy.

Parameters
NameDescription
requestCreatePolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPolicyPolicyOperationMetadata

The RPC response.

Overrides

CreatePolicyAsync(CreatePolicyRequest, CallSettings)

public override Task<Operation<Policy, PolicyOperationMetadata>> CreatePolicyAsync(CreatePolicyRequest request, CallSettings callSettings = null)

Creates a policy.

Parameters
NameDescription
requestCreatePolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPolicyPolicyOperationMetadata

A Task containing the RPC response.

Overrides

DeletePolicy(DeletePolicyRequest, CallSettings)

public override Operation<Policy, PolicyOperationMetadata> DeletePolicy(DeletePolicyRequest request, CallSettings callSettings = null)

Deletes a policy. This action is permanent.

Parameters
NameDescription
requestDeletePolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPolicyPolicyOperationMetadata

The RPC response.

Overrides

DeletePolicyAsync(DeletePolicyRequest, CallSettings)

public override Task<Operation<Policy, PolicyOperationMetadata>> DeletePolicyAsync(DeletePolicyRequest request, CallSettings callSettings = null)

Deletes a policy. This action is permanent.

Parameters
NameDescription
requestDeletePolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPolicyPolicyOperationMetadata

A Task containing the RPC response.

Overrides

GetPolicy(GetPolicyRequest, CallSettings)

public override Policy GetPolicy(GetPolicyRequest request, CallSettings callSettings = null)

Gets a policy.

Parameters
NameDescription
requestGetPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Overrides

GetPolicyAsync(GetPolicyRequest, CallSettings)

public override Task<Policy> GetPolicyAsync(GetPolicyRequest request, CallSettings callSettings = null)

Gets a policy.

Parameters
NameDescription
requestGetPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Overrides

ListPolicies(ListPoliciesRequest, CallSettings)

public override PagedEnumerable<ListPoliciesResponse, Policy> ListPolicies(ListPoliciesRequest request, CallSettings callSettings = null)

Retrieves the policies of the specified kind that are attached to a resource.

The response lists only policy metadata. In particular, policy rules are omitted.

Parameters
NameDescription
requestListPoliciesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListPoliciesResponsePolicy

A pageable sequence of Policy resources.

Overrides

ListPoliciesAsync(ListPoliciesRequest, CallSettings)

public override PagedAsyncEnumerable<ListPoliciesResponse, Policy> ListPoliciesAsync(ListPoliciesRequest request, CallSettings callSettings = null)

Retrieves the policies of the specified kind that are attached to a resource.

The response lists only policy metadata. In particular, policy rules are omitted.

Parameters
NameDescription
requestListPoliciesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListPoliciesResponsePolicy

A pageable asynchronous sequence of Policy resources.

Overrides

UpdatePolicy(UpdatePolicyRequest, CallSettings)

public override Operation<Policy, PolicyOperationMetadata> UpdatePolicy(UpdatePolicyRequest request, CallSettings callSettings = null)

Updates the specified policy.

You can update only the rules and the display name for the policy.

To update a policy, you should use a read-modify-write loop:

  1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
  2. Modify the policy as needed.
  3. Use UpdatePolicy to write the updated policy.

This pattern helps prevent conflicts between concurrent updates.

Parameters
NameDescription
requestUpdatePolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationPolicyPolicyOperationMetadata

The RPC response.

Overrides

UpdatePolicyAsync(UpdatePolicyRequest, CallSettings)

public override Task<Operation<Policy, PolicyOperationMetadata>> UpdatePolicyAsync(UpdatePolicyRequest request, CallSettings callSettings = null)

Updates the specified policy.

You can update only the rules and the display name for the policy.

To update a policy, you should use a read-modify-write loop:

  1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
  2. Modify the policy as needed.
  3. Use UpdatePolicy to write the updated policy.

This pattern helps prevent conflicts between concurrent updates.

Parameters
NameDescription
requestUpdatePolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationPolicyPolicyOperationMetadata

A Task containing the RPC response.

Overrides