com.google.cloud.asset.v1
The interfaces provided are listed below, along with usage samples.
AssetServiceClient
Service Description: Asset service definition.
Sample for AssetServiceClient:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
BatchGetAssetsHistoryRequest request =
BatchGetAssetsHistoryRequest.newBuilder()
.setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString())
.addAllAssetNames(new ArrayList<String>())
.setContentType(ContentType.forNumber(0))
.setReadTimeWindow(TimeWindow.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
}
com.google.cloud.asset.v1.stub
com.google.cloud.asset.v1p1beta1
The interfaces provided are listed below, along with usage samples.
AssetServiceClient
Service Description: Asset service definition.
Sample for AssetServiceClient:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
String scope = "scope109264468";
String query = "query107944136";
List<String> assetTypes = new ArrayList<>();
for (StandardResourceMetadata element :
assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
// doThingsWith(element);
}
}
com.google.cloud.asset.v1p1beta1.stub
com.google.cloud.asset.v1p2beta1
The interfaces provided are listed below, along with usage samples.
AssetServiceClient
Service Description: Asset service definition.
Sample for AssetServiceClient:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
String parent = "parent-995424086";
Feed response = assetServiceClient.createFeed(parent);
}
com.google.cloud.asset.v1p2beta1.stub
com.google.cloud.asset.v1p4beta1
The interfaces provided are listed below, along with usage samples.
AssetServiceClient
Service Description: Asset service definition.
Sample for AssetServiceClient:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
AnalyzeIamPolicyRequest request =
AnalyzeIamPolicyRequest.newBuilder()
.setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
.setOptions(AnalyzeIamPolicyRequest.Options.newBuilder().build())
.build();
AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
}
com.google.cloud.asset.v1p4beta1.stub
com.google.cloud.asset.v1p5beta1
The interfaces provided are listed below, along with usage samples.
AssetServiceClient
Service Description: Asset service definition.
Sample for AssetServiceClient:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
ListAssetsRequest request =
ListAssetsRequest.newBuilder()
.setParent("parent-995424086")
.setReadTime(Timestamp.newBuilder().build())
.addAllAssetTypes(new ArrayList<String>())
.setContentType(ContentType.forNumber(0))
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
// doThingsWith(element);
}
}
com.google.cloud.asset.v1p5beta1.stub
com.google.cloud.asset.v1p7beta1
The interfaces provided are listed below, along with usage samples.
AssetServiceClient
Service Description: Asset service definition.
Sample for AssetServiceClient:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
ExportAssetsRequest request =
ExportAssetsRequest.newBuilder()
.setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString())
.setReadTime(Timestamp.newBuilder().build())
.addAllAssetTypes(new ArrayList<String>())
.setContentType(ContentType.forNumber(0))
.setOutputConfig(OutputConfig.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
}