public AnalyzeIamPolicyResponse AnalyzeIamPolicy(string scope, string fullResourceName) { // Create the client. AssetServiceClient client = AssetServiceClient.Create(); // Build the request. AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest { AnalysisQuery = new IamPolicyAnalysisQuery { Scope = scope, ResourceSelector = new IamPolicyAnalysisQuery.Types.ResourceSelector { FullResourceName = fullResourceName, }, Options = new IamPolicyAnalysisQuery.Types.Options { ExpandGroups = true, OutputGroupEdges = true, }, }, }; // Call the API. AnalyzeIamPolicyResponse response = client.AnalyzeIamPolicy(request); // Return the result. return(response); }
/// <summary>Snippet for AnalyzeIamPolicy</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void AnalyzeIamPolicyRequestObject() { // Create client AssetServiceClient assetServiceClient = AssetServiceClient.Create(); // Initialize request argument(s) AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest { AnalysisQuery = new IamPolicyAnalysisQuery(), ExecutionTimeout = new Duration(), }; // Make the request AnalyzeIamPolicyResponse response = assetServiceClient.AnalyzeIamPolicy(request); }
/// <summary>Snippet for AnalyzeIamPolicy</summary> public void AnalyzeIamPolicyRequestObject() { // Snippet: AnalyzeIamPolicy(AnalyzeIamPolicyRequest, CallSettings) // Create client AssetServiceClient assetServiceClient = AssetServiceClient.Create(); // Initialize request argument(s) AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest { AnalysisQuery = new IamPolicyAnalysisQuery(), Options = new AnalyzeIamPolicyRequest.Types.Options(), }; // Make the request AnalyzeIamPolicyResponse response = assetServiceClient.AnalyzeIamPolicy(request); // End snippet }