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