Shuts down any channels automatically created by Create() and
CreateAsync(CancellationToken). Channels which weren't automatically created are not
affected.
A task representing the asynchronous shutdown operation.
Remarks
After calling this method, further calls to Create() and
CreateAsync(CancellationToken) will create new channels, which could in turn be shut down
by another call to this method.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Policy Troubleshooter v3 API - Class PolicyTroubleshooterClient (1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/1.1.0/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/1.0.0/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient) \n\n public abstract class PolicyTroubleshooterClient\n\nReference documentation and code samples for the Policy Troubleshooter v3 API class PolicyTroubleshooterClient.\n\nPolicyTroubleshooter client wrapper, for convenient use. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PolicyTroubleshooterClient \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring) \n\nDerived Types\n-------------\n\n[PolicyTroubleshooterClientImpl](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClientImpl)\n\nNamespace\n---------\n\n[Google.Cloud.PolicyTroubleshooter.Iam.V3](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3)\n\nAssembly\n--------\n\nGoogle.Cloud.PolicyTroubleshooter.Iam.V3.dll\n\nRemarks\n-------\n\nIAM Policy Troubleshooter service.\n\nThis service helps you troubleshoot access issues for Google Cloud resources.\n\nProperties\n----------\n\n### DefaultEndpoint\n\n public static string DefaultEndpoint { get; }\n\nThe default endpoint for the PolicyTroubleshooter service, which is a host of\n\"policytroubleshooter.googleapis.com\" and a port of 443.\n\n### DefaultScopes\n\n public static IReadOnlyList\u003cstring\u003e DefaultScopes { get; }\n\nThe default PolicyTroubleshooter scopes.\n\n**Remarks** \nThe default PolicyTroubleshooter scopes are:\n\n- \u003chttps://www.googleapis.com/auth/cloud-platform\u003e\n\n\u003cbr /\u003e\n\n### GrpcClient\n\n public virtual PolicyTroubleshooter.PolicyTroubleshooterClient GrpcClient { get; }\n\nThe underlying gRPC PolicyTroubleshooter client\n\n### ServiceMetadata\n\n public static ServiceMetadata ServiceMetadata { get; }\n\nThe service metadata associated with this client type.\n\nMethods\n-------\n\n### Create()\n\n public static PolicyTroubleshooterClient Create()\n\nSynchronously creates a [PolicyTroubleshooterClient](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient) using the default credentials, endpoint and\nsettings. To specify custom credentials or other settings, use\n[PolicyTroubleshooterClientBuilder](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClientBuilder).\n\n### CreateAsync(CancellationToken)\n\n public static Task\u003cPolicyTroubleshooterClient\u003e CreateAsync(CancellationToken cancellationToken = default)\n\nAsynchronously creates a [PolicyTroubleshooterClient](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient) using the default credentials, endpoint\nand settings. To specify custom credentials or other settings, use\n[PolicyTroubleshooterClientBuilder](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClientBuilder).\n\n### ShutdownDefaultChannelsAsync()\n\n public static Task ShutdownDefaultChannelsAsync()\n\nShuts down any channels automatically created by [Create()](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient#Google_Cloud_PolicyTroubleshooter_Iam_V3_PolicyTroubleshooterClient_Create) and\n[CreateAsync(CancellationToken)](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient#Google_Cloud_PolicyTroubleshooter_Iam_V3_PolicyTroubleshooterClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not\naffected.\n\n**Remarks** \nAfter calling this method, further calls to [Create()](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient#Google_Cloud_PolicyTroubleshooter_Iam_V3_PolicyTroubleshooterClient_Create) and\n[CreateAsync(CancellationToken)](/dotnet/docs/reference/Google.Cloud.PolicyTroubleshooter.Iam.V3/latest/Google.Cloud.PolicyTroubleshooter.Iam.V3.PolicyTroubleshooterClient#Google_Cloud_PolicyTroubleshooter_Iam_V3_PolicyTroubleshooterClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down\nby another call to this method.\n\n### TroubleshootIamPolicy(TroubleshootIamPolicyRequest, CallSettings)\n\n public virtual TroubleshootIamPolicyResponse TroubleshootIamPolicy(TroubleshootIamPolicyRequest request, CallSettings callSettings = null)\n\nChecks whether a principal has a specific permission for a specific\nresource, and explains why the principal does or doesn't have that\npermission.\n\n**Example** \n\n // Create client\n PolicyTroubleshooterClient policyTroubleshooterClient = PolicyTroubleshooterClient.Create();\n // Initialize request argument(s)\n TroubleshootIamPolicyRequest request = new TroubleshootIamPolicyRequest\n {\n AccessTuple = new AccessTuple(),\n };\n // Make the request\n TroubleshootIamPolicyResponse response = policyTroubleshooterClient.TroubleshootIamPolicy(request);\n\n### TroubleshootIamPolicyAsync(TroubleshootIamPolicyRequest, CallSettings)\n\n public virtual Task\u003cTroubleshootIamPolicyResponse\u003e TroubleshootIamPolicyAsync(TroubleshootIamPolicyRequest request, CallSettings callSettings = null)\n\nChecks whether a principal has a specific permission for a specific\nresource, and explains why the principal does or doesn't have that\npermission.\n\n**Example** \n\n // Create client\n PolicyTroubleshooterClient policyTroubleshooterClient = await PolicyTroubleshooterClient.CreateAsync();\n // Initialize request argument(s)\n TroubleshootIamPolicyRequest request = new TroubleshootIamPolicyRequest\n {\n AccessTuple = new AccessTuple(),\n };\n // Make the request\n TroubleshootIamPolicyResponse response = await policyTroubleshooterClient.TroubleshootIamPolicyAsync(request);\n\n### TroubleshootIamPolicyAsync(TroubleshootIamPolicyRequest, CancellationToken)\n\n public virtual Task\u003cTroubleshootIamPolicyResponse\u003e TroubleshootIamPolicyAsync(TroubleshootIamPolicyRequest request, CancellationToken cancellationToken)\n\nChecks whether a principal has a specific permission for a specific\nresource, and explains why the principal does or doesn't have that\npermission.\n\n**Example** \n\n // Create client\n PolicyTroubleshooterClient policyTroubleshooterClient = await PolicyTroubleshooterClient.CreateAsync();\n // Initialize request argument(s)\n TroubleshootIamPolicyRequest request = new TroubleshootIamPolicyRequest\n {\n AccessTuple = new AccessTuple(),\n };\n // Make the request\n TroubleshootIamPolicyResponse response = await policyTroubleshooterClient.TroubleshootIamPolicyAsync(request);"]]