/// <summary>Snippet for SetIamPolicy</summary> public void SetIamPolicy() { // Snippet: SetIamPolicy(string, string, string, RegionSetPolicyRequest, CallSettings) // Create client RegionDisksClient regionDisksClient = RegionDisksClient.Create(); // Initialize request argument(s) string project = ""; string region = ""; string resource = ""; RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest(); // Make the request Policy response = regionDisksClient.SetIamPolicy(project, region, resource, regionSetPolicyRequestResource); // End snippet }
/// <summary>Snippet for SetIamPolicyAsync</summary> public async Task SetIamPolicyAsync() { // Snippet: SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CallSettings) // Additional: SetIamPolicyAsync(string, string, string, RegionSetPolicyRequest, CancellationToken) // Create client RegionDisksClient regionDisksClient = await RegionDisksClient.CreateAsync(); // Initialize request argument(s) string project = ""; string region = ""; string resource = ""; RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest(); // Make the request Policy response = await regionDisksClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource); // End snippet }