/// <summary>Snippet for SetIamPolicyAsync</summary> public async Task SetIamPolicyAsync() { // Snippet: SetIamPolicyAsync(string, string, GlobalSetPolicyRequest, CallSettings) // Additional: SetIamPolicyAsync(string, string, GlobalSetPolicyRequest, CancellationToken) // Create client LicensesClient licensesClient = await LicensesClient.CreateAsync(); // Initialize request argument(s) string project = ""; string resource = ""; GlobalSetPolicyRequest globalSetPolicyRequestResource = new GlobalSetPolicyRequest(); // Make the request Policy response = await licensesClient.SetIamPolicyAsync(project, resource, globalSetPolicyRequestResource); // End snippet }
/// <summary>Snippet for SetIamPolicyAsync</summary> public async Task SetIamPolicyRequestObjectAsync() { // Snippet: SetIamPolicyAsync(SetIamPolicyLicenseRequest, CallSettings) // Additional: SetIamPolicyAsync(SetIamPolicyLicenseRequest, CancellationToken) // Create client LicensesClient licensesClient = await LicensesClient.CreateAsync(); // Initialize request argument(s) SetIamPolicyLicenseRequest request = new SetIamPolicyLicenseRequest { Resource = "", Project = "", GlobalSetPolicyRequestResource = new GlobalSetPolicyRequest(), }; // Make the request Policy response = await licensesClient.SetIamPolicyAsync(request); // End snippet }