use of com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse in project gapic-generator-java by googleapis.
the class SyncAnalyzeIamPolicyLongrunning method syncAnalyzeIamPolicyLongrunning.
public static void syncAnalyzeIamPolicyLongrunning() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder().setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()).setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()).build();
AnalyzeIamPolicyLongrunningResponse response = assetServiceClient.analyzeIamPolicyLongrunningAsync(request).get();
}
}
use of com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse in project gapic-generator-java by googleapis.
the class AsyncAnalyzeIamPolicyLongrunningLRO method asyncAnalyzeIamPolicyLongrunningLRO.
public static void asyncAnalyzeIamPolicyLongrunningLRO() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder().setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()).setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()).build();
OperationFuture<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> future = assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request);
// Do something.
AnalyzeIamPolicyLongrunningResponse response = future.get();
}
}
Aggregations