/// <summary>Snippet for GetIamPolicyAsync</summary> public async Task GetIamPolicyAsync() { // Snippet: GetIamPolicyAsync(string, string, string, CallSettings) // Additional: GetIamPolicyAsync(string, string, string, CancellationToken) // Create client ResourcePoliciesClient resourcePoliciesClient = await ResourcePoliciesClient.CreateAsync(); // Initialize request argument(s) string project = ""; string region = ""; string resource = ""; // Make the request Policy response = await resourcePoliciesClient.GetIamPolicyAsync(project, region, resource); // End snippet }
/// <summary>Snippet for GetIamPolicyAsync</summary> public async Task GetIamPolicyRequestObjectAsync() { // Snippet: GetIamPolicyAsync(GetIamPolicyResourcePolicyRequest, CallSettings) // Additional: GetIamPolicyAsync(GetIamPolicyResourcePolicyRequest, CancellationToken) // Create client ResourcePoliciesClient resourcePoliciesClient = await ResourcePoliciesClient.CreateAsync(); // Initialize request argument(s) GetIamPolicyResourcePolicyRequest request = new GetIamPolicyResourcePolicyRequest { Region = "", Resource = "", Project = "", OptionsRequestedPolicyVersion = 0, }; // Make the request Policy response = await resourcePoliciesClient.GetIamPolicyAsync(request); // End snippet }