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.
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 | PoliciesPoliciesClient The underlying gRPC client. |
settings | PoliciesSettings The base PoliciesSettings used within this client. |
logger | ILogger Optional 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 | CreatePolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | CreatePolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | DeletePolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | DeletePolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | GetPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | GetPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | ListPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | ListPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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
UpdatePolicy
to write the updated policy.
This pattern helps prevent conflicts between concurrent updates.
Parameters | |
---|---|
Name | Description |
request | UpdatePolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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
UpdatePolicy
to write the updated policy.
This pattern helps prevent conflicts between concurrent updates.
Parameters | |
---|---|
Name | Description |
request | UpdatePolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationPolicyPolicyOperationMetadata | A Task containing the RPC response. |