/// <summary>Snippet for SetIamPolicy</summary> public void SetIamPolicy() { // Snippet: SetIamPolicy(IamResourceNameOneof,Policy,CallSettings) // Create client ContainerAnalysisV1Beta1Client containerAnalysisV1Beta1Client = ContainerAnalysisV1Beta1Client.Create(); // Initialize request argument(s) IamResourceNameOneof resource = IamResourceNameOneof.From(new NoteName("[PROJECT]", "[NOTE]")); Policy policy = new Policy(); // Make the request Policy response = containerAnalysisV1Beta1Client.SetIamPolicy(resource, policy); // End snippet }
/// <summary>Snippet for SetIamPolicy</summary> public void SetIamPolicy_RequestObject() { // Snippet: SetIamPolicy(SetIamPolicyRequest,CallSettings) // Create client ContainerAnalysisV1Beta1Client containerAnalysisV1Beta1Client = ContainerAnalysisV1Beta1Client.Create(); // Initialize request argument(s) SetIamPolicyRequest request = new SetIamPolicyRequest { ResourceAsIamResourceNameOneof = IamResourceNameOneof.From(new NoteName("[PROJECT]", "[NOTE]")), Policy = new Policy(), }; // Make the request Policy response = containerAnalysisV1Beta1Client.SetIamPolicy(request); // End snippet }