# Organization Policy v2 API - Class OrgPolicyClientImpl (2.9.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.9.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.8.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.7.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.6.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.5.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.4.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.3.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.2.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.1.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/2.0.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/1.2.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/1.1.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/1.0.0/Google.Cloud.OrgPolicy.V2.OrgPolicyClientImpl)

    public sealed class OrgPolicyClientImpl : OrgPolicyClient

Reference documentation and code samples for the Organization Policy v2 API class OrgPolicyClientImpl.

OrgPolicy client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [OrgPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient) \> OrgPolicyClientImpl

## Inherited Members

[OrgPolicyClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DefaultEndpoint) [OrgPolicyClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DefaultScopes) [OrgPolicyClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ServiceMetadata) [OrgPolicyClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateAsync_System_Threading_CancellationToken_) [OrgPolicyClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_Create) [OrgPolicyClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ShutdownDefaultChannelsAsync) [OrgPolicyClient.ListConstraints(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraints_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListConstraintsAsync(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraintsAsync_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListConstraints(ProjectName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraints_Google_Api_Gax_ResourceNames_ProjectName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListConstraintsAsync(ProjectName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraintsAsync_Google_Api_Gax_ResourceNames_ProjectName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListConstraints(FolderName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraints_Google_Api_Gax_ResourceNames_FolderName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListConstraintsAsync(FolderName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraintsAsync_Google_Api_Gax_ResourceNames_FolderName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListConstraints(OrganizationName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraints_Google_Api_Gax_ResourceNames_OrganizationName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListConstraintsAsync(OrganizationName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraintsAsync_Google_Api_Gax_ResourceNames_OrganizationName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPolicies(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPolicies_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPoliciesAsync(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPoliciesAsync_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPolicies(ProjectName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPolicies_Google_Api_Gax_ResourceNames_ProjectName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPoliciesAsync(ProjectName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPoliciesAsync_Google_Api_Gax_ResourceNames_ProjectName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPolicies(FolderName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPolicies_Google_Api_Gax_ResourceNames_FolderName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPoliciesAsync(FolderName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPoliciesAsync_Google_Api_Gax_ResourceNames_FolderName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPolicies(OrganizationName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPolicies_Google_Api_Gax_ResourceNames_OrganizationName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListPoliciesAsync(OrganizationName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPoliciesAsync_Google_Api_Gax_ResourceNames_OrganizationName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetPolicyAsync(GetPolicyRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicyAsync_Google_Cloud_OrgPolicy_V2_GetPolicyRequest_System_Threading_CancellationToken_) [OrgPolicyClient.GetPolicy(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicy_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetPolicyAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicyAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetPolicyAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicyAsync_System_String_System_Threading_CancellationToken_) [OrgPolicyClient.GetPolicy(PolicyName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicy_Google_Cloud_OrgPolicy_V2_PolicyName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetPolicyAsync(PolicyName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicyAsync_Google_Cloud_OrgPolicy_V2_PolicyName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetPolicyAsync(PolicyName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicyAsync_Google_Cloud_OrgPolicy_V2_PolicyName_System_Threading_CancellationToken_) [OrgPolicyClient.GetEffectivePolicyAsync(GetEffectivePolicyRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicyAsync_Google_Cloud_OrgPolicy_V2_GetEffectivePolicyRequest_System_Threading_CancellationToken_) [OrgPolicyClient.GetEffectivePolicy(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicy_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetEffectivePolicyAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicyAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetEffectivePolicyAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicyAsync_System_String_System_Threading_CancellationToken_) [OrgPolicyClient.GetEffectivePolicy(PolicyName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicy_Google_Cloud_OrgPolicy_V2_PolicyName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetEffectivePolicyAsync(PolicyName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicyAsync_Google_Cloud_OrgPolicy_V2_PolicyName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetEffectivePolicyAsync(PolicyName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicyAsync_Google_Cloud_OrgPolicy_V2_PolicyName_System_Threading_CancellationToken_) [OrgPolicyClient.CreatePolicyAsync(CreatePolicyRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Cloud_OrgPolicy_V2_CreatePolicyRequest_System_Threading_CancellationToken_) [OrgPolicyClient.CreatePolicy(string, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicy_System_String_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(string, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_System_String_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(string, Policy, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_System_String_Google_Cloud_OrgPolicy_V2_Policy_System_Threading_CancellationToken_) [OrgPolicyClient.CreatePolicy(ProjectName, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicy_Google_Api_Gax_ResourceNames_ProjectName_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(ProjectName, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Api_Gax_ResourceNames_ProjectName_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(ProjectName, Policy, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Api_Gax_ResourceNames_ProjectName_Google_Cloud_OrgPolicy_V2_Policy_System_Threading_CancellationToken_) [OrgPolicyClient.CreatePolicy(FolderName, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicy_Google_Api_Gax_ResourceNames_FolderName_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(FolderName, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Api_Gax_ResourceNames_FolderName_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(FolderName, Policy, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Api_Gax_ResourceNames_FolderName_Google_Cloud_OrgPolicy_V2_Policy_System_Threading_CancellationToken_) [OrgPolicyClient.CreatePolicy(OrganizationName, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicy_Google_Api_Gax_ResourceNames_OrganizationName_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(OrganizationName, Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Api_Gax_ResourceNames_OrganizationName_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreatePolicyAsync(OrganizationName, Policy, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Api_Gax_ResourceNames_OrganizationName_Google_Cloud_OrgPolicy_V2_Policy_System_Threading_CancellationToken_) [OrgPolicyClient.UpdatePolicyAsync(UpdatePolicyRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdatePolicyAsync_Google_Cloud_OrgPolicy_V2_UpdatePolicyRequest_System_Threading_CancellationToken_) [OrgPolicyClient.UpdatePolicy(Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdatePolicy_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.UpdatePolicyAsync(Policy, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdatePolicyAsync_Google_Cloud_OrgPolicy_V2_Policy_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.UpdatePolicyAsync(Policy, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdatePolicyAsync_Google_Cloud_OrgPolicy_V2_Policy_System_Threading_CancellationToken_) [OrgPolicyClient.DeletePolicyAsync(DeletePolicyRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicyAsync_Google_Cloud_OrgPolicy_V2_DeletePolicyRequest_System_Threading_CancellationToken_) [OrgPolicyClient.DeletePolicy(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicy_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeletePolicyAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicyAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeletePolicyAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicyAsync_System_String_System_Threading_CancellationToken_) [OrgPolicyClient.DeletePolicy(PolicyName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicy_Google_Cloud_OrgPolicy_V2_PolicyName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeletePolicyAsync(PolicyName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicyAsync_Google_Cloud_OrgPolicy_V2_PolicyName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeletePolicyAsync(PolicyName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicyAsync_Google_Cloud_OrgPolicy_V2_PolicyName_System_Threading_CancellationToken_) [OrgPolicyClient.CreateCustomConstraintAsync(CreateCustomConstraintRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CreateCustomConstraintRequest_System_Threading_CancellationToken_) [OrgPolicyClient.CreateCustomConstraint(string, CustomConstraint, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraint_System_String_Google_Cloud_OrgPolicy_V2_CustomConstraint_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreateCustomConstraintAsync(string, CustomConstraint, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraintAsync_System_String_Google_Cloud_OrgPolicy_V2_CustomConstraint_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreateCustomConstraintAsync(string, CustomConstraint, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraintAsync_System_String_Google_Cloud_OrgPolicy_V2_CustomConstraint_System_Threading_CancellationToken_) [OrgPolicyClient.CreateCustomConstraint(OrganizationName, CustomConstraint, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraint_Google_Api_Gax_ResourceNames_OrganizationName_Google_Cloud_OrgPolicy_V2_CustomConstraint_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreateCustomConstraintAsync(OrganizationName, CustomConstraint, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraintAsync_Google_Api_Gax_ResourceNames_OrganizationName_Google_Cloud_OrgPolicy_V2_CustomConstraint_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.CreateCustomConstraintAsync(OrganizationName, CustomConstraint, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraintAsync_Google_Api_Gax_ResourceNames_OrganizationName_Google_Cloud_OrgPolicy_V2_CustomConstraint_System_Threading_CancellationToken_) [OrgPolicyClient.UpdateCustomConstraintAsync(UpdateCustomConstraintRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdateCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_UpdateCustomConstraintRequest_System_Threading_CancellationToken_) [OrgPolicyClient.UpdateCustomConstraint(CustomConstraint, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdateCustomConstraint_Google_Cloud_OrgPolicy_V2_CustomConstraint_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.UpdateCustomConstraintAsync(CustomConstraint, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdateCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CustomConstraint_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.UpdateCustomConstraintAsync(CustomConstraint, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdateCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CustomConstraint_System_Threading_CancellationToken_) [OrgPolicyClient.GetCustomConstraintAsync(GetCustomConstraintRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_GetCustomConstraintRequest_System_Threading_CancellationToken_) [OrgPolicyClient.GetCustomConstraint(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraint_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetCustomConstraintAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraintAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetCustomConstraintAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraintAsync_System_String_System_Threading_CancellationToken_) [OrgPolicyClient.GetCustomConstraint(CustomConstraintName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraint_Google_Cloud_OrgPolicy_V2_CustomConstraintName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetCustomConstraintAsync(CustomConstraintName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CustomConstraintName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.GetCustomConstraintAsync(CustomConstraintName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CustomConstraintName_System_Threading_CancellationToken_) [OrgPolicyClient.ListCustomConstraints(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListCustomConstraints_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListCustomConstraintsAsync(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListCustomConstraintsAsync_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListCustomConstraints(OrganizationName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListCustomConstraints_Google_Api_Gax_ResourceNames_OrganizationName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.ListCustomConstraintsAsync(OrganizationName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListCustomConstraintsAsync_Google_Api_Gax_ResourceNames_OrganizationName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeleteCustomConstraintAsync(DeleteCustomConstraintRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_DeleteCustomConstraintRequest_System_Threading_CancellationToken_) [OrgPolicyClient.DeleteCustomConstraint(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraint_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeleteCustomConstraintAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraintAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeleteCustomConstraintAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraintAsync_System_String_System_Threading_CancellationToken_) [OrgPolicyClient.DeleteCustomConstraint(CustomConstraintName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraint_Google_Cloud_OrgPolicy_V2_CustomConstraintName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeleteCustomConstraintAsync(CustomConstraintName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CustomConstraintName_Google_Api_Gax_Grpc_CallSettings_) [OrgPolicyClient.DeleteCustomConstraintAsync(CustomConstraintName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CustomConstraintName_System_Threading_CancellationToken_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.OrgPolicy.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2)

## Assembly

Google.Cloud.OrgPolicy.V2.dll

## Remarks

An interface for managing organization policies.

The Organization Policy Service provides a simple mechanism for
organizations to restrict the allowed configurations across their entire
resource hierarchy.

You can use a policy to configure restrictions on resources. For
example, you can enforce a policy that restricts which Google
Cloud APIs can be activated in a certain part of your resource
hierarchy, or prevents serial port access to VM instances in a
particular folder.

Policies are inherited down through the resource hierarchy. A policy
applied to a parent resource automatically applies to all its child resources
unless overridden with a policy lower in the hierarchy.

A constraint defines an aspect of a resource's configuration that can be
controlled by an organization's policy administrator. Policies are a
collection of constraints that defines their allowable configuration on a
particular resource and its child resources.

## Constructors

### OrgPolicyClientImpl(OrgPolicyClient, OrgPolicySettings, ILogger)

    public OrgPolicyClientImpl(OrgPolicy.OrgPolicyClient grpcClient, OrgPolicySettings settings, ILogger logger)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicy.OrgPolicyClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicySettings` The base [OrgPolicySettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicySettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override OrgPolicy.OrgPolicyClient GrpcClient { get; }

The underlying gRPC OrgPolicy client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicy.OrgPolicyClient` |   |

**Overrides** [OrgPolicyClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GrpcClient)

## Methods

### CreateCustomConstraint(CreateCustomConstraintRequest, CallSettings)

    public override CustomConstraint CreateCustomConstraint(CreateCustomConstraintRequest request, CallSettings callSettings = null)

Creates a custom constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
organization does not exist.
Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the
constraint already exists on the given organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CreateCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | The RPC response. |

**Overrides** [OrgPolicyClient.CreateCustomConstraint(CreateCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraint_Google_Cloud_OrgPolicy_V2_CreateCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### CreateCustomConstraintAsync(CreateCustomConstraintRequest, CallSettings)

    public override Task<CustomConstraint> CreateCustomConstraintAsync(CreateCustomConstraintRequest request, CallSettings callSettings = null)

Creates a custom constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
organization does not exist.
Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the
constraint already exists on the given organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CreateCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.CreateCustomConstraintAsync(CreateCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreateCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_CreateCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### CreatePolicy(CreatePolicyRequest, CallSettings)

    public override Policy CreatePolicy(CreatePolicyRequest request, CallSettings callSettings = null)

Creates a policy.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint does not exist.
Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the
policy already exists on the given Google Cloud resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CreatePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | The RPC response. |

**Overrides** [OrgPolicyClient.CreatePolicy(CreatePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicy_Google_Cloud_OrgPolicy_V2_CreatePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### CreatePolicyAsync(CreatePolicyRequest, CallSettings)

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

Creates a policy.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint does not exist.
Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the
policy already exists on the given Google Cloud resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CreatePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.CreatePolicyAsync(CreatePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_CreatePolicyAsync_Google_Cloud_OrgPolicy_V2_CreatePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteCustomConstraint(DeleteCustomConstraintRequest, CallSettings)

    public override void DeleteCustomConstraint(DeleteCustomConstraintRequest request, CallSettings callSettings = null)

Deletes a custom constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.DeleteCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Overrides** [OrgPolicyClient.DeleteCustomConstraint(DeleteCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraint_Google_Cloud_OrgPolicy_V2_DeleteCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeleteCustomConstraintAsync(DeleteCustomConstraintRequest, CallSettings)

    public override Task DeleteCustomConstraintAsync(DeleteCustomConstraintRequest request, CallSettings callSettings = null)

Deletes a custom constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.DeleteCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.DeleteCustomConstraintAsync(DeleteCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeleteCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_DeleteCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeletePolicy(DeletePolicyRequest, CallSettings)

    public override void DeletePolicy(DeletePolicyRequest request, CallSettings callSettings = null)

Deletes a policy.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint or organization policy does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.DeletePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Overrides** [OrgPolicyClient.DeletePolicy(DeletePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicy_Google_Cloud_OrgPolicy_V2_DeletePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### DeletePolicyAsync(DeletePolicyRequest, CallSettings)

    public override Task DeletePolicyAsync(DeletePolicyRequest request, CallSettings callSettings = null)

Deletes a policy.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint or organization policy does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.DeletePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.DeletePolicyAsync(DeletePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_DeletePolicyAsync_Google_Cloud_OrgPolicy_V2_DeletePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetCustomConstraint(GetCustomConstraintRequest, CallSettings)

    public override CustomConstraint GetCustomConstraint(GetCustomConstraintRequest request, CallSettings callSettings = null)

Gets a custom or managed constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
custom or managed constraint does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.GetCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | The RPC response. |

**Overrides** [OrgPolicyClient.GetCustomConstraint(GetCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraint_Google_Cloud_OrgPolicy_V2_GetCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetCustomConstraintAsync(GetCustomConstraintRequest, CallSettings)

    public override Task<CustomConstraint> GetCustomConstraintAsync(GetCustomConstraintRequest request, CallSettings callSettings = null)

Gets a custom or managed constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
custom or managed constraint does not exist.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.GetCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.GetCustomConstraintAsync(GetCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_GetCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetEffectivePolicy(GetEffectivePolicyRequest, CallSettings)

    public override Policy GetEffectivePolicy(GetEffectivePolicyRequest request, CallSettings callSettings = null)

Gets the effective policy on a resource. This is the result of merging
policies in the resource hierarchy and evaluating conditions. The
returned policy will not have an `etag` or `condition` set because it is
an evaluated policy across multiple resources.
Subtrees of Resource Manager resource hierarchy with 'under:' prefix will
not be expanded.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.GetEffectivePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | The RPC response. |

**Overrides** [OrgPolicyClient.GetEffectivePolicy(GetEffectivePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicy_Google_Cloud_OrgPolicy_V2_GetEffectivePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetEffectivePolicyAsync(GetEffectivePolicyRequest, CallSettings)

    public override Task<Policy> GetEffectivePolicyAsync(GetEffectivePolicyRequest request, CallSettings callSettings = null)

Gets the effective policy on a resource. This is the result of merging
policies in the resource hierarchy and evaluating conditions. The
returned policy will not have an `etag` or `condition` set because it is
an evaluated policy across multiple resources.
Subtrees of Resource Manager resource hierarchy with 'under:' prefix will
not be expanded.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.GetEffectivePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.GetEffectivePolicyAsync(GetEffectivePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetEffectivePolicyAsync_Google_Cloud_OrgPolicy_V2_GetEffectivePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetPolicy(GetPolicyRequest, CallSettings)

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

Gets a policy on a resource.

If no policy is set on the resource, `NOT_FOUND` is returned. The
`etag` value can be used with `UpdatePolicy()` to update a
policy during read-modify-write.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.GetPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | The RPC response. |

**Overrides** [OrgPolicyClient.GetPolicy(GetPolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicy_Google_Cloud_OrgPolicy_V2_GetPolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetPolicyAsync(GetPolicyRequest, CallSettings)

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

Gets a policy on a resource.

If no policy is set on the resource, `NOT_FOUND` is returned. The
`etag` value can be used with `UpdatePolicy()` to update a
policy during read-modify-write.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.GetPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.GetPolicyAsync(GetPolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_GetPolicyAsync_Google_Cloud_OrgPolicy_V2_GetPolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListConstraints(ListConstraintsRequest, CallSettings)

    public override PagedEnumerable<ListConstraintsResponse, Constraint> ListConstraints(ListConstraintsRequest request, CallSettings callSettings = null)

Lists constraints that could be applied on the specified resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListConstraintsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListConstraintsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Constraint` | A pageable sequence of [Constraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Constraint) resources. |

**Overrides** [OrgPolicyClient.ListConstraints(ListConstraintsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraints_Google_Cloud_OrgPolicy_V2_ListConstraintsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListConstraintsAsync(ListConstraintsRequest, CallSettings)

    public override PagedAsyncEnumerable<ListConstraintsResponse, Constraint> ListConstraintsAsync(ListConstraintsRequest request, CallSettings callSettings = null)

Lists constraints that could be applied on the specified resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListConstraintsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListConstraintsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Constraint` | A pageable asynchronous sequence of [Constraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Constraint) resources. |

**Overrides** [OrgPolicyClient.ListConstraintsAsync(ListConstraintsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListConstraintsAsync_Google_Cloud_OrgPolicy_V2_ListConstraintsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListCustomConstraints(ListCustomConstraintsRequest, CallSettings)

    public override PagedEnumerable<ListCustomConstraintsResponse, CustomConstraint> ListCustomConstraints(ListCustomConstraintsRequest request, CallSettings callSettings = null)

Retrieves all of the custom constraints that exist on a particular
organization resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListCustomConstraintsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListCustomConstraintsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | A pageable sequence of [CustomConstraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint) resources. |

**Overrides** [OrgPolicyClient.ListCustomConstraints(ListCustomConstraintsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListCustomConstraints_Google_Cloud_OrgPolicy_V2_ListCustomConstraintsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListCustomConstraintsAsync(ListCustomConstraintsRequest, CallSettings)

    public override PagedAsyncEnumerable<ListCustomConstraintsResponse, CustomConstraint> ListCustomConstraintsAsync(ListCustomConstraintsRequest request, CallSettings callSettings = null)

Retrieves all of the custom constraints that exist on a particular
organization resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListCustomConstraintsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListCustomConstraintsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | A pageable asynchronous sequence of [CustomConstraint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint) resources. |

**Overrides** [OrgPolicyClient.ListCustomConstraintsAsync(ListCustomConstraintsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListCustomConstraintsAsync_Google_Cloud_OrgPolicy_V2_ListCustomConstraintsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListPolicies(ListPoliciesRequest, CallSettings)

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

Retrieves all of the policies that exist on a particular resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListPoliciesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | A pageable sequence of [Policy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy) resources. |

**Overrides** [OrgPolicyClient.ListPolicies(ListPoliciesRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPolicies_Google_Cloud_OrgPolicy_V2_ListPoliciesRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListPoliciesAsync(ListPoliciesRequest, CallSettings)

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

Retrieves all of the policies that exist on a particular resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListPoliciesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.ListPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | A pageable asynchronous sequence of [Policy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy) resources. |

**Overrides** [OrgPolicyClient.ListPoliciesAsync(ListPoliciesRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_ListPoliciesAsync_Google_Cloud_OrgPolicy_V2_ListPoliciesRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdateCustomConstraint(UpdateCustomConstraintRequest, CallSettings)

    public override CustomConstraint UpdateCustomConstraint(UpdateCustomConstraintRequest request, CallSettings callSettings = null)

Updates a custom constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint does not exist.

Note: the supplied policy will perform a full overwrite of all
fields.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.UpdateCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | The RPC response. |

**Overrides** [OrgPolicyClient.UpdateCustomConstraint(UpdateCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdateCustomConstraint_Google_Cloud_OrgPolicy_V2_UpdateCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdateCustomConstraintAsync(UpdateCustomConstraintRequest, CallSettings)

    public override Task<CustomConstraint> UpdateCustomConstraintAsync(UpdateCustomConstraintRequest request, CallSettings callSettings = null)

Updates a custom constraint.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint does not exist.

Note: the supplied policy will perform a full overwrite of all
fields.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.UpdateCustomConstraintRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.CustomConstraint` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.UpdateCustomConstraintAsync(UpdateCustomConstraintRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdateCustomConstraintAsync_Google_Cloud_OrgPolicy_V2_UpdateCustomConstraintRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdatePolicy(UpdatePolicyRequest, CallSettings)

    public override Policy UpdatePolicy(UpdatePolicyRequest request, CallSettings callSettings = null)

Updates a policy.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint or the policy do not exist.
Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag
supplied in the request does not match the persisted etag of the policy

Note: the supplied policy will perform a full overwrite of all
fields.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.UpdatePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | The RPC response. |

**Overrides** [OrgPolicyClient.UpdatePolicy(UpdatePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdatePolicy_Google_Cloud_OrgPolicy_V2_UpdatePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdatePolicyAsync(UpdatePolicyRequest, CallSettings)

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

Updates a policy.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
constraint or the policy do not exist.
Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag
supplied in the request does not match the persisted etag of the policy

Note: the supplied policy will perform a full overwrite of all
fields.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.UpdatePolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.Policy` | A Task containing the RPC response. |

**Overrides** [OrgPolicyClient.UpdatePolicyAsync(UpdatePolicyRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OrgPolicy.V2/latest/Google.Cloud.OrgPolicy.V2.OrgPolicyClient#Google_Cloud_OrgPolicy_V2_OrgPolicyClient_UpdatePolicyAsync_Google_Cloud_OrgPolicy_V2_UpdatePolicyRequest_Google_Api_Gax_Grpc_CallSettings_)