/// <summary>Snippet for AnalyzeIamPolicyLongrunning</summary> public void AnalyzeIamPolicyLongrunningRequestObject() { // Snippet: AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest, CallSettings) // Create client AssetServiceClient assetServiceClient = AssetServiceClient.Create(); // Initialize request argument(s) AnalyzeIamPolicyLongrunningRequest request = new AnalyzeIamPolicyLongrunningRequest { AnalysisQuery = new IamPolicyAnalysisQuery(), OutputConfig = new IamPolicyAnalysisOutputConfig(), }; // Make the request Operation <AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> response = assetServiceClient.AnalyzeIamPolicyLongrunning(request); // Poll until the returned long-running operation is complete Operation <AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result AnalyzeIamPolicyLongrunningResponse result = completedResponse.Result; // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation <AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> retrievedResponse = assetServiceClient.PollOnceAnalyzeIamPolicyLongrunning(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result AnalyzeIamPolicyLongrunningResponse retrievedResult = retrievedResponse.Result; } // End snippet }