Search in sources :

Example 1 with AnalyzeIamPolicyLongrunningResponse

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();
    }
}
Also used : AnalyzeIamPolicyLongrunningRequest(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) AssetServiceClient(com.google.cloud.asset.v1.AssetServiceClient) AnalyzeIamPolicyLongrunningResponse(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse)

Example 2 with AnalyzeIamPolicyLongrunningResponse

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();
    }
}
Also used : AnalyzeIamPolicyLongrunningRequest(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) AssetServiceClient(com.google.cloud.asset.v1.AssetServiceClient) AnalyzeIamPolicyLongrunningMetadata(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) AnalyzeIamPolicyLongrunningResponse(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse)

Aggregations

AnalyzeIamPolicyLongrunningRequest (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest)2 AnalyzeIamPolicyLongrunningResponse (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse)2 AssetServiceClient (com.google.cloud.asset.v1.AssetServiceClient)2 AnalyzeIamPolicyLongrunningMetadata (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata)1