@@ -870,5 +870,107 @@ await response.AsRawResponses().ForEachAsync((SearchAllIamPoliciesResponse page)
870870 string nextPageToken = singlePage . NextPageToken ;
871871 // End snippet
872872 }
873+
874+ /// <summary>Snippet for AnalyzeIamPolicy</summary>
875+ public void AnalyzeIamPolicyRequestObject ( )
876+ {
877+ // Snippet: AnalyzeIamPolicy(AnalyzeIamPolicyRequest, CallSettings)
878+ // Create client
879+ AssetServiceClient assetServiceClient = AssetServiceClient . Create ( ) ;
880+ // Initialize request argument(s)
881+ AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest
882+ {
883+ AnalysisQuery = new IamPolicyAnalysisQuery ( ) ,
884+ ExecutionTimeout = new Duration ( ) ,
885+ } ;
886+ // Make the request
887+ AnalyzeIamPolicyResponse response = assetServiceClient . AnalyzeIamPolicy ( request ) ;
888+ // End snippet
889+ }
890+
891+ /// <summary>Snippet for AnalyzeIamPolicyAsync</summary>
892+ public async Task AnalyzeIamPolicyRequestObjectAsync ( )
893+ {
894+ // Snippet: AnalyzeIamPolicyAsync(AnalyzeIamPolicyRequest, CallSettings)
895+ // Additional: AnalyzeIamPolicyAsync(AnalyzeIamPolicyRequest, CancellationToken)
896+ // Create client
897+ AssetServiceClient assetServiceClient = await AssetServiceClient . CreateAsync ( ) ;
898+ // Initialize request argument(s)
899+ AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest
900+ {
901+ AnalysisQuery = new IamPolicyAnalysisQuery ( ) ,
902+ ExecutionTimeout = new Duration ( ) ,
903+ } ;
904+ // Make the request
905+ AnalyzeIamPolicyResponse response = await assetServiceClient . AnalyzeIamPolicyAsync ( request ) ;
906+ // End snippet
907+ }
908+
909+ /// <summary>Snippet for ExportIamPolicyAnalysis</summary>
910+ public void ExportIamPolicyAnalysisRequestObject ( )
911+ {
912+ // Snippet: ExportIamPolicyAnalysis(ExportIamPolicyAnalysisRequest, CallSettings)
913+ // Create client
914+ AssetServiceClient assetServiceClient = AssetServiceClient . Create ( ) ;
915+ // Initialize request argument(s)
916+ ExportIamPolicyAnalysisRequest request = new ExportIamPolicyAnalysisRequest
917+ {
918+ AnalysisQuery = new IamPolicyAnalysisQuery ( ) ,
919+ OutputConfig = new IamPolicyAnalysisOutputConfig ( ) ,
920+ } ;
921+ // Make the request
922+ Operation < ExportIamPolicyAnalysisResponse , ExportIamPolicyAnalysisRequest > response = assetServiceClient . ExportIamPolicyAnalysis ( request ) ;
923+
924+ // Poll until the returned long-running operation is complete
925+ Operation < ExportIamPolicyAnalysisResponse , ExportIamPolicyAnalysisRequest > completedResponse = response . PollUntilCompleted ( ) ;
926+ // Retrieve the operation result
927+ ExportIamPolicyAnalysisResponse result = completedResponse . Result ;
928+
929+ // Or get the name of the operation
930+ string operationName = response . Name ;
931+ // This name can be stored, then the long-running operation retrieved later by name
932+ Operation < ExportIamPolicyAnalysisResponse , ExportIamPolicyAnalysisRequest > retrievedResponse = assetServiceClient . PollOnceExportIamPolicyAnalysis ( operationName ) ;
933+ // Check if the retrieved long-running operation has completed
934+ if ( retrievedResponse . IsCompleted )
935+ {
936+ // If it has completed, then access the result
937+ ExportIamPolicyAnalysisResponse retrievedResult = retrievedResponse . Result ;
938+ }
939+ // End snippet
940+ }
941+
942+ /// <summary>Snippet for ExportIamPolicyAnalysisAsync</summary>
943+ public async Task ExportIamPolicyAnalysisRequestObjectAsync ( )
944+ {
945+ // Snippet: ExportIamPolicyAnalysisAsync(ExportIamPolicyAnalysisRequest, CallSettings)
946+ // Additional: ExportIamPolicyAnalysisAsync(ExportIamPolicyAnalysisRequest, CancellationToken)
947+ // Create client
948+ AssetServiceClient assetServiceClient = await AssetServiceClient . CreateAsync ( ) ;
949+ // Initialize request argument(s)
950+ ExportIamPolicyAnalysisRequest request = new ExportIamPolicyAnalysisRequest
951+ {
952+ AnalysisQuery = new IamPolicyAnalysisQuery ( ) ,
953+ OutputConfig = new IamPolicyAnalysisOutputConfig ( ) ,
954+ } ;
955+ // Make the request
956+ Operation < ExportIamPolicyAnalysisResponse , ExportIamPolicyAnalysisRequest > response = await assetServiceClient . ExportIamPolicyAnalysisAsync ( request ) ;
957+
958+ // Poll until the returned long-running operation is complete
959+ Operation < ExportIamPolicyAnalysisResponse , ExportIamPolicyAnalysisRequest > completedResponse = await response . PollUntilCompletedAsync ( ) ;
960+ // Retrieve the operation result
961+ ExportIamPolicyAnalysisResponse result = completedResponse . Result ;
962+
963+ // Or get the name of the operation
964+ string operationName = response . Name ;
965+ // This name can be stored, then the long-running operation retrieved later by name
966+ Operation < ExportIamPolicyAnalysisResponse , ExportIamPolicyAnalysisRequest > retrievedResponse = await assetServiceClient . PollOnceExportIamPolicyAnalysisAsync ( operationName ) ;
967+ // Check if the retrieved long-running operation has completed
968+ if ( retrievedResponse . IsCompleted )
969+ {
970+ // If it has completed, then access the result
971+ ExportIamPolicyAnalysisResponse retrievedResult = retrievedResponse . Result ;
972+ }
973+ // End snippet
974+ }
873975 }
874976}
0 commit comments