/// <summary>Snippet for GetPolicyAsync</summary> public async Task GetPolicyAsync() { // Snippet: GetPolicyAsync(string, CallSettings) // Additional: GetPolicyAsync(string, CancellationToken) // Create client BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/policy"; // Make the request Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(name); // End snippet }
/// <summary>Snippet for GetPolicyAsync</summary> public async Task GetPolicyResourceNamesAsync() { // Snippet: GetPolicyAsync(PolicyName, CallSettings) // Additional: GetPolicyAsync(PolicyName, CancellationToken) // Create client BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync(); // Initialize request argument(s) PolicyName name = PolicyName.FromProject("[PROJECT]"); // Make the request Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(name); // End snippet }