public sealed class PoliciesClientImpl : PoliciesClientReference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v2 API class PoliciesClientImpl.
Policies client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Iam.V2Assembly
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 | |
|---|---|
| Name | Description |
grpcClient |
PoliciesPoliciesClientThe underlying gRPC client. |
settings |
PoliciesSettingsThe base PoliciesSettings used within this client. |
logger |
ILoggerOptional ILogger to use within this client. |
Properties
CreatePolicyOperationsClient
public override OperationsClient CreatePolicyOperationsClient { get; }The long-running operations client for CreatePolicy.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
DeletePolicyOperationsClient
public override OperationsClient DeletePolicyOperationsClient { get; }The long-running operations client for DeletePolicy.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public override Policies.PoliciesClient GrpcClient { get; }The underlying gRPC Policies client
| Property Value | |
|---|---|
| Type | Description |
PoliciesPoliciesClient |
|
UpdatePolicyOperationsClient
public override OperationsClient UpdatePolicyOperationsClient { get; }The long-running operations client for UpdatePolicy.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
Methods
CreatePolicy(CreatePolicyRequest, CallSettings)
public override Operation<Policy, PolicyOperationMetadata> CreatePolicy(CreatePolicyRequest request, CallSettings callSettings = null)Creates a policy.
| Parameters | |
|---|---|
| Name | Description |
request |
CreatePolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationPolicyPolicyOperationMetadata |
The RPC response. |
CreatePolicyAsync(CreatePolicyRequest, CallSettings)
public override Task<Operation<Policy, PolicyOperationMetadata>> CreatePolicyAsync(CreatePolicyRequest request, CallSettings callSettings = null)Creates a policy.
| Parameters | |
|---|---|
| Name | Description |
request |
CreatePolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationPolicyPolicyOperationMetadata |
A Task containing the RPC response. |
DeletePolicy(DeletePolicyRequest, CallSettings)
public override Operation<Policy, PolicyOperationMetadata> DeletePolicy(DeletePolicyRequest request, CallSettings callSettings = null)Deletes a policy. This action is permanent.
| Parameters | |
|---|---|
| Name | Description |
request |
DeletePolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationPolicyPolicyOperationMetadata |
The RPC response. |
DeletePolicyAsync(DeletePolicyRequest, CallSettings)
public override Task<Operation<Policy, PolicyOperationMetadata>> DeletePolicyAsync(DeletePolicyRequest request, CallSettings callSettings = null)Deletes a policy. This action is permanent.
| Parameters | |
|---|---|
| Name | Description |
request |
DeletePolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationPolicyPolicyOperationMetadata |
A Task containing the RPC response. |
GetPolicy(GetPolicyRequest, CallSettings)
public override Policy GetPolicy(GetPolicyRequest request, CallSettings callSettings = null)Gets a policy.
| Parameters | |
|---|---|
| Name | Description |
request |
GetPolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Policy |
The RPC response. |
GetPolicyAsync(GetPolicyRequest, CallSettings)
public override Task<Policy> GetPolicyAsync(GetPolicyRequest request, CallSettings callSettings = null)Gets a policy.
| Parameters | |
|---|---|
| Name | Description |
request |
GetPolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskPolicy |
A Task containing the RPC response. |
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 | |
|---|---|
| Name | Description |
request |
ListPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListPoliciesResponsePolicy |
A pageable sequence of Policy resources. |
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 | |
|---|---|
| Name | Description |
request |
ListPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListPoliciesResponsePolicy |
A pageable asynchronous sequence of Policy resources. |
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:
- Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
- Modify the policy as needed.
- Use
UpdatePolicyto write the updated policy.
This pattern helps prevent conflicts between concurrent updates.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdatePolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationPolicyPolicyOperationMetadata |
The RPC response. |
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:
- Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
- Modify the policy as needed.
- Use
UpdatePolicyto write the updated policy.
This pattern helps prevent conflicts between concurrent updates.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdatePolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationPolicyPolicyOperationMetadata |
A Task containing the RPC response. |