use of com.google.cloud.asset.v1.AssetServiceClient in project gapic-generator-java by googleapis.
the class SyncDeleteFeed method syncDeleteFeed.
public static void syncDeleteFeed() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()).build();
assetServiceClient.deleteFeed(request);
}
}
use of com.google.cloud.asset.v1.AssetServiceClient in project gapic-generator-java by googleapis.
the class AsyncListFeeds method asyncListFeeds.
public static void asyncListFeeds() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
ApiFuture<ListFeedsResponse> future = assetServiceClient.listFeedsCallable().futureCall(request);
// Do something.
ListFeedsResponse response = future.get();
}
}
use of com.google.cloud.asset.v1.AssetServiceClient in project gapic-generator-java by googleapis.
the class SyncListFeeds method syncListFeeds.
public static void syncListFeeds() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
ListFeedsResponse response = assetServiceClient.listFeeds(request);
}
}
use of com.google.cloud.asset.v1.AssetServiceClient in project gapic-generator-java by googleapis.
the class SyncListFeedsString method syncListFeedsString.
public static void syncListFeedsString() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
String parent = "parent-995424086";
ListFeedsResponse response = assetServiceClient.listFeeds(parent);
}
}
use of com.google.cloud.asset.v1.AssetServiceClient in project gapic-generator-java by googleapis.
the class AsyncSearchAllIamPolicies method asyncSearchAllIamPolicies.
public static void asyncSearchAllIamPolicies() throws Exception {
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder().setScope("scope109264468").setQuery("query107944136").setPageSize(883849137).setPageToken("pageToken873572522").addAllAssetTypes(new ArrayList<String>()).setOrderBy("orderBy-1207110587").build();
ApiFuture<IamPolicySearchResult> future = assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
// Do something.
for (IamPolicySearchResult element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
}
Aggregations