Class StorageInsightsClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) {
ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]");
ReportConfig response = storageInsightsClient.getReportConfig(name);
}
Note: close() needs to be called on the StorageInsightsClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
ListReportConfigs |
Lists ReportConfigs in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetReportConfig |
Gets details of a single ReportConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateReportConfig |
Creates a new ReportConfig in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateReportConfig |
Updates the parameters of a single ReportConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteReportConfig |
Deletes a single ReportConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListReportDetails |
Lists ReportDetails in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetReportDetail |
Gets details of a single ReportDetail. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDatasetConfigs |
Lists the dataset configurations in a given project for a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDatasetConfig |
Gets the dataset configuration in a given project for a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDatasetConfig |
Creates a dataset configuration in a given project for a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDatasetConfig |
Updates a dataset configuration in a given project for a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDatasetConfig |
Deletes a dataset configuration in a given project for a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
LinkDataset |
Links a dataset to BigQuery in a given project for a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UnlinkDataset |
Unlinks a dataset from BigQuery in a given project for a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of StorageInsightsSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
StorageInsightsSettings storageInsightsSettings =
StorageInsightsSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
StorageInsightsClient storageInsightsClient =
StorageInsightsClient.create(storageInsightsSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
StorageInsightsSettings storageInsightsSettings =
StorageInsightsSettings.newBuilder().setEndpoint(myEndpoint).build();
StorageInsightsClient storageInsightsClient =
StorageInsightsClient.create(storageInsightsSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
StorageInsightsSettings storageInsightsSettings =
StorageInsightsSettings.newHttpJsonBuilder().build();
StorageInsightsClient storageInsightsClient =
StorageInsightsClient.create(storageInsightsSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStorageInsightsClient(StorageInsightsSettings settings) Constructs an instance of StorageInsightsClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final StorageInsightsClientcreate()Constructs an instance of StorageInsightsClient with default settings.static final StorageInsightsClientcreate(StorageInsightsSettings settings) Constructs an instance of StorageInsightsClient, using the given settings.static final StorageInsightsClientcreate(StorageInsightsStub stub) Constructs an instance of StorageInsightsClient, using the given stub for making calls.Creates a dataset configuration in a given project for a given location.createDatasetConfigAsync(LocationName parent, DatasetConfig datasetConfig, String datasetConfigId) Creates a dataset configuration in a given project for a given location.createDatasetConfigAsync(String parent, DatasetConfig datasetConfig, String datasetConfigId) Creates a dataset configuration in a given project for a given location.Creates a dataset configuration in a given project for a given location.Creates a dataset configuration in a given project for a given location.final ReportConfigCreates a new ReportConfig in a given project and location.final ReportConfigcreateReportConfig(LocationName parent, ReportConfig reportConfig) Creates a new ReportConfig in a given project and location.final ReportConfigcreateReportConfig(String parent, ReportConfig reportConfig) Creates a new ReportConfig in a given project and location.Creates a new ReportConfig in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a dataset configuration in a given project for a given location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a dataset configuration in a given project for a given location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a dataset configuration in a given project for a given location.Deletes a dataset configuration in a given project for a given location.final OperationCallable<DeleteDatasetConfigRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a dataset configuration in a given project for a given location.final voidDeletes a single ReportConfig.final voidDeletes a single ReportConfig.final voiddeleteReportConfig(String name) Deletes a single ReportConfig.final UnaryCallable<DeleteReportConfigRequest,com.google.protobuf.Empty> Deletes a single ReportConfig.final DatasetConfigGets the dataset configuration in a given project for a given location.final DatasetConfiggetDatasetConfig(GetDatasetConfigRequest request) Gets the dataset configuration in a given project for a given location.final DatasetConfiggetDatasetConfig(String name) Gets the dataset configuration in a given project for a given location.Gets the dataset configuration in a given project for a given location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final ReportConfiggetReportConfig(GetReportConfigRequest request) Gets details of a single ReportConfig.final ReportConfigGets details of a single ReportConfig.final ReportConfiggetReportConfig(String name) Gets details of a single ReportConfig.Gets details of a single ReportConfig.final ReportDetailgetReportDetail(GetReportDetailRequest request) Gets details of a single ReportDetail.final ReportDetailGets details of a single ReportDetail.final ReportDetailgetReportDetail(String name) Gets details of a single ReportDetail.Gets details of a single ReportDetail.final StorageInsightsSettingsgetStub()booleanbooleanLinks a dataset to BigQuery in a given project for a given location.linkDatasetAsync(LinkDatasetRequest request) Links a dataset to BigQuery in a given project for a given location.linkDatasetAsync(String name) Links a dataset to BigQuery in a given project for a given location.Links a dataset to BigQuery in a given project for a given location.Links a dataset to BigQuery in a given project for a given location.Lists the dataset configurations in a given project for a given location.listDatasetConfigs(LocationName parent) Lists the dataset configurations in a given project for a given location.listDatasetConfigs(String parent) Lists the dataset configurations in a given project for a given location.Lists the dataset configurations in a given project for a given location.final UnaryCallable<ListDatasetConfigsRequest,StorageInsightsClient.ListDatasetConfigsPagedResponse> Lists the dataset configurations in a given project for a given location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists ReportConfigs in a given project and location.listReportConfigs(LocationName parent) Lists ReportConfigs in a given project and location.listReportConfigs(String parent) Lists ReportConfigs in a given project and location.Lists ReportConfigs in a given project and location.Lists ReportConfigs in a given project and location.Lists ReportDetails in a given project and location.listReportDetails(ReportConfigName parent) Lists ReportDetails in a given project and location.listReportDetails(String parent) Lists ReportDetails in a given project and location.Lists ReportDetails in a given project and location.Lists ReportDetails in a given project and location.voidshutdown()voidfinal OperationFuture<com.google.protobuf.Empty,OperationMetadata> Unlinks a dataset from BigQuery in a given project for a given location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> unlinkDatasetAsync(UnlinkDatasetRequest request) Unlinks a dataset from BigQuery in a given project for a given location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> unlinkDatasetAsync(String name) Unlinks a dataset from BigQuery in a given project for a given location.Unlinks a dataset from BigQuery in a given project for a given location.final OperationCallable<UnlinkDatasetRequest,com.google.protobuf.Empty, OperationMetadata> Unlinks a dataset from BigQuery in a given project for a given location.updateDatasetConfigAsync(DatasetConfig datasetConfig, com.google.protobuf.FieldMask updateMask) Updates a dataset configuration in a given project for a given location.Updates a dataset configuration in a given project for a given location.Updates a dataset configuration in a given project for a given location.Updates a dataset configuration in a given project for a given location.final ReportConfigupdateReportConfig(ReportConfig reportConfig, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single ReportConfig.final ReportConfigUpdates the parameters of a single ReportConfig.Updates the parameters of a single ReportConfig.
-
Constructor Details
-
StorageInsightsClient
Constructs an instance of StorageInsightsClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
StorageInsightsClient
-
-
Method Details
-
create
Constructs an instance of StorageInsightsClient with default settings.- Throws:
IOException
-
create
public static final StorageInsightsClient create(StorageInsightsSettings settings) throws IOException Constructs an instance of StorageInsightsClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of StorageInsightsClient, using the given stub for making calls. This is for advanced usage - prefer using create(StorageInsightsSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listReportConfigs
public final StorageInsightsClient.ListReportConfigsPagedResponse listReportConfigs(LocationName parent) Lists ReportConfigs in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ReportConfig element : storageInsightsClient.listReportConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListReportConfigsRequest- Throws:
ApiException- if the remote call fails
-
listReportConfigs
Lists ReportConfigs in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ReportConfig element : storageInsightsClient.listReportConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListReportConfigsRequest- Throws:
ApiException- if the remote call fails
-
listReportConfigs
public final StorageInsightsClient.ListReportConfigsPagedResponse listReportConfigs(ListReportConfigsRequest request) Lists ReportConfigs in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListReportConfigsRequest request = ListReportConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (ReportConfig element : storageInsightsClient.listReportConfigs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listReportConfigsPagedCallable
public final UnaryCallable<ListReportConfigsRequest,StorageInsightsClient.ListReportConfigsPagedResponse> listReportConfigsPagedCallable()Lists ReportConfigs in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListReportConfigsRequest request = ListReportConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ReportConfig> future = storageInsightsClient.listReportConfigsPagedCallable().futureCall(request); // Do something. for (ReportConfig element : future.get().iterateAll()) { // doThingsWith(element); } } -
listReportConfigsCallable
public final UnaryCallable<ListReportConfigsRequest,ListReportConfigsResponse> listReportConfigsCallable()Lists ReportConfigs in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListReportConfigsRequest request = ListReportConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListReportConfigsResponse response = storageInsightsClient.listReportConfigsCallable().call(request); for (ReportConfig element : response.getReportConfigsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getReportConfig
Gets details of a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); ReportConfig response = storageInsightsClient.getReportConfig(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getReportConfig
Gets details of a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); ReportConfig response = storageInsightsClient.getReportConfig(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getReportConfig
Gets details of a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetReportConfigRequest request = GetReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .build(); ReportConfig response = storageInsightsClient.getReportConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getReportConfigCallable
Gets details of a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetReportConfigRequest request = GetReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .build(); ApiFuture<ReportConfig> future = storageInsightsClient.getReportConfigCallable().futureCall(request); // Do something. ReportConfig response = future.get(); } -
createReportConfig
Creates a new ReportConfig in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ReportConfig reportConfig = ReportConfig.newBuilder().build(); ReportConfig response = storageInsightsClient.createReportConfig(parent, reportConfig); }- Parameters:
parent- Required. Value for parent.reportConfig- Required. The resource being created- Throws:
ApiException- if the remote call fails
-
createReportConfig
Creates a new ReportConfig in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ReportConfig reportConfig = ReportConfig.newBuilder().build(); ReportConfig response = storageInsightsClient.createReportConfig(parent, reportConfig); }- Parameters:
parent- Required. Value for parent.reportConfig- Required. The resource being created- Throws:
ApiException- if the remote call fails
-
createReportConfig
Creates a new ReportConfig in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { CreateReportConfigRequest request = CreateReportConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setReportConfig(ReportConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ReportConfig response = storageInsightsClient.createReportConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createReportConfigCallable
Creates a new ReportConfig in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { CreateReportConfigRequest request = CreateReportConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setReportConfig(ReportConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<ReportConfig> future = storageInsightsClient.createReportConfigCallable().futureCall(request); // Do something. ReportConfig response = future.get(); } -
updateReportConfig
public final ReportConfig updateReportConfig(ReportConfig reportConfig, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ReportConfig reportConfig = ReportConfig.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ReportConfig response = storageInsightsClient.updateReportConfig(reportConfig, updateMask); }- Parameters:
reportConfig- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the ReportConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateReportConfig
Updates the parameters of a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UpdateReportConfigRequest request = UpdateReportConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setReportConfig(ReportConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ReportConfig response = storageInsightsClient.updateReportConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateReportConfigCallable
Updates the parameters of a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UpdateReportConfigRequest request = UpdateReportConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setReportConfig(ReportConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<ReportConfig> future = storageInsightsClient.updateReportConfigCallable().futureCall(request); // Do something. ReportConfig response = future.get(); } -
deleteReportConfig
Deletes a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); storageInsightsClient.deleteReportConfig(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteReportConfig
Deletes a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); storageInsightsClient.deleteReportConfig(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteReportConfig
Deletes a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DeleteReportConfigRequest request = DeleteReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setForce(true) .setRequestId("requestId693933066") .build(); storageInsightsClient.deleteReportConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteReportConfigCallable
public final UnaryCallable<DeleteReportConfigRequest,com.google.protobuf.Empty> deleteReportConfigCallable()Deletes a single ReportConfig.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DeleteReportConfigRequest request = DeleteReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setForce(true) .setRequestId("requestId693933066") .build(); ApiFuture<Empty> future = storageInsightsClient.deleteReportConfigCallable().futureCall(request); // Do something. future.get(); } -
listReportDetails
public final StorageInsightsClient.ListReportDetailsPagedResponse listReportDetails(ReportConfigName parent) Lists ReportDetails in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); for (ReportDetail element : storageInsightsClient.listReportDetails(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListReportDetailsRequest- Throws:
ApiException- if the remote call fails
-
listReportDetails
Lists ReportDetails in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); for (ReportDetail element : storageInsightsClient.listReportDetails(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListReportDetailsRequest- Throws:
ApiException- if the remote call fails
-
listReportDetails
public final StorageInsightsClient.ListReportDetailsPagedResponse listReportDetails(ListReportDetailsRequest request) Lists ReportDetails in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListReportDetailsRequest request = ListReportDetailsRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (ReportDetail element : storageInsightsClient.listReportDetails(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listReportDetailsPagedCallable
public final UnaryCallable<ListReportDetailsRequest,StorageInsightsClient.ListReportDetailsPagedResponse> listReportDetailsPagedCallable()Lists ReportDetails in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListReportDetailsRequest request = ListReportDetailsRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ReportDetail> future = storageInsightsClient.listReportDetailsPagedCallable().futureCall(request); // Do something. for (ReportDetail element : future.get().iterateAll()) { // doThingsWith(element); } } -
listReportDetailsCallable
public final UnaryCallable<ListReportDetailsRequest,ListReportDetailsResponse> listReportDetailsCallable()Lists ReportDetails in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListReportDetailsRequest request = ListReportDetailsRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListReportDetailsResponse response = storageInsightsClient.listReportDetailsCallable().call(request); for (ReportDetail element : response.getReportDetailsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getReportDetail
Gets details of a single ReportDetail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ReportDetailName name = ReportDetailName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]"); ReportDetail response = storageInsightsClient.getReportDetail(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getReportDetail
Gets details of a single ReportDetail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String name = ReportDetailName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]") .toString(); ReportDetail response = storageInsightsClient.getReportDetail(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getReportDetail
Gets details of a single ReportDetail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetReportDetailRequest request = GetReportDetailRequest.newBuilder() .setName( ReportDetailName.of( "[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]") .toString()) .build(); ReportDetail response = storageInsightsClient.getReportDetail(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getReportDetailCallable
Gets details of a single ReportDetail.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetReportDetailRequest request = GetReportDetailRequest.newBuilder() .setName( ReportDetailName.of( "[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT_DETAIL]") .toString()) .build(); ApiFuture<ReportDetail> future = storageInsightsClient.getReportDetailCallable().futureCall(request); // Do something. ReportDetail response = future.get(); } -
listDatasetConfigs
public final StorageInsightsClient.ListDatasetConfigsPagedResponse listDatasetConfigs(LocationName parent) Lists the dataset configurations in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (DatasetConfig element : storageInsightsClient.listDatasetConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListDatasetConfigsRequest- Throws:
ApiException- if the remote call fails
-
listDatasetConfigs
public final StorageInsightsClient.ListDatasetConfigsPagedResponse listDatasetConfigs(String parent) Lists the dataset configurations in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (DatasetConfig element : storageInsightsClient.listDatasetConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListDatasetConfigsRequest- Throws:
ApiException- if the remote call fails
-
listDatasetConfigs
public final StorageInsightsClient.ListDatasetConfigsPagedResponse listDatasetConfigs(ListDatasetConfigsRequest request) Lists the dataset configurations in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListDatasetConfigsRequest request = ListDatasetConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (DatasetConfig element : storageInsightsClient.listDatasetConfigs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDatasetConfigsPagedCallable
public final UnaryCallable<ListDatasetConfigsRequest,StorageInsightsClient.ListDatasetConfigsPagedResponse> listDatasetConfigsPagedCallable()Lists the dataset configurations in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListDatasetConfigsRequest request = ListDatasetConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<DatasetConfig> future = storageInsightsClient.listDatasetConfigsPagedCallable().futureCall(request); // Do something. for (DatasetConfig element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDatasetConfigsCallable
public final UnaryCallable<ListDatasetConfigsRequest,ListDatasetConfigsResponse> listDatasetConfigsCallable()Lists the dataset configurations in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListDatasetConfigsRequest request = ListDatasetConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListDatasetConfigsResponse response = storageInsightsClient.listDatasetConfigsCallable().call(request); for (DatasetConfig element : response.getDatasetConfigsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getDatasetConfig
Gets the dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DatasetConfigName name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]"); DatasetConfig response = storageInsightsClient.getDatasetConfig(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getDatasetConfig
Gets the dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString(); DatasetConfig response = storageInsightsClient.getDatasetConfig(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getDatasetConfig
Gets the dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetDatasetConfigRequest request = GetDatasetConfigRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); DatasetConfig response = storageInsightsClient.getDatasetConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDatasetConfigCallable
Gets the dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetDatasetConfigRequest request = GetDatasetConfigRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); ApiFuture<DatasetConfig> future = storageInsightsClient.getDatasetConfigCallable().futureCall(request); // Do something. DatasetConfig response = future.get(); } -
createDatasetConfigAsync
public final OperationFuture<DatasetConfig,OperationMetadata> createDatasetConfigAsync(LocationName parent, DatasetConfig datasetConfig, String datasetConfigId) Creates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); DatasetConfig datasetConfig = DatasetConfig.newBuilder().build(); String datasetConfigId = "datasetConfigId7070869"; DatasetConfig response = storageInsightsClient .createDatasetConfigAsync(parent, datasetConfig, datasetConfigId) .get(); }- Parameters:
parent- Required. Value for parent.datasetConfig- Required. The resource being createddatasetConfigId- Required. ID of the requesting object. If auto-generating ID is enabled on the server-side, remove this field and `dataset_config_id` from the method_signature of Create RPC Note: The value should not contain any hyphens.- Throws:
ApiException- if the remote call fails
-
createDatasetConfigAsync
public final OperationFuture<DatasetConfig,OperationMetadata> createDatasetConfigAsync(String parent, DatasetConfig datasetConfig, String datasetConfigId) Creates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); DatasetConfig datasetConfig = DatasetConfig.newBuilder().build(); String datasetConfigId = "datasetConfigId7070869"; DatasetConfig response = storageInsightsClient .createDatasetConfigAsync(parent, datasetConfig, datasetConfigId) .get(); }- Parameters:
parent- Required. Value for parent.datasetConfig- Required. The resource being createddatasetConfigId- Required. ID of the requesting object. If auto-generating ID is enabled on the server-side, remove this field and `dataset_config_id` from the method_signature of Create RPC Note: The value should not contain any hyphens.- Throws:
ApiException- if the remote call fails
-
createDatasetConfigAsync
public final OperationFuture<DatasetConfig,OperationMetadata> createDatasetConfigAsync(CreateDatasetConfigRequest request) Creates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { CreateDatasetConfigRequest request = CreateDatasetConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDatasetConfigId("datasetConfigId7070869") .setDatasetConfig(DatasetConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); DatasetConfig response = storageInsightsClient.createDatasetConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDatasetConfigOperationCallable
public final OperationCallable<CreateDatasetConfigRequest,DatasetConfig, createDatasetConfigOperationCallable()OperationMetadata> Creates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { CreateDatasetConfigRequest request = CreateDatasetConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDatasetConfigId("datasetConfigId7070869") .setDatasetConfig(DatasetConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<DatasetConfig, OperationMetadata> future = storageInsightsClient.createDatasetConfigOperationCallable().futureCall(request); // Do something. DatasetConfig response = future.get(); } -
createDatasetConfigCallable
Creates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { CreateDatasetConfigRequest request = CreateDatasetConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDatasetConfigId("datasetConfigId7070869") .setDatasetConfig(DatasetConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = storageInsightsClient.createDatasetConfigCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateDatasetConfigAsync
public final OperationFuture<DatasetConfig,OperationMetadata> updateDatasetConfigAsync(DatasetConfig datasetConfig, com.google.protobuf.FieldMask updateMask) Updates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DatasetConfig datasetConfig = DatasetConfig.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); DatasetConfig response = storageInsightsClient.updateDatasetConfigAsync(datasetConfig, updateMask).get(); }- Parameters:
datasetConfig- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the `DatasetConfig` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask then it returns an "Invalid Argument" error.- Throws:
ApiException- if the remote call fails
-
updateDatasetConfigAsync
public final OperationFuture<DatasetConfig,OperationMetadata> updateDatasetConfigAsync(UpdateDatasetConfigRequest request) Updates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UpdateDatasetConfigRequest request = UpdateDatasetConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDatasetConfig(DatasetConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); DatasetConfig response = storageInsightsClient.updateDatasetConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateDatasetConfigOperationCallable
public final OperationCallable<UpdateDatasetConfigRequest,DatasetConfig, updateDatasetConfigOperationCallable()OperationMetadata> Updates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UpdateDatasetConfigRequest request = UpdateDatasetConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDatasetConfig(DatasetConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<DatasetConfig, OperationMetadata> future = storageInsightsClient.updateDatasetConfigOperationCallable().futureCall(request); // Do something. DatasetConfig response = future.get(); } -
updateDatasetConfigCallable
Updates a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UpdateDatasetConfigRequest request = UpdateDatasetConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDatasetConfig(DatasetConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = storageInsightsClient.updateDatasetConfigCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteDatasetConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDatasetConfigAsync(DatasetConfigName name) Deletes a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DatasetConfigName name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]"); storageInsightsClient.deleteDatasetConfigAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteDatasetConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDatasetConfigAsync(String name) Deletes a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString(); storageInsightsClient.deleteDatasetConfigAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteDatasetConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDatasetConfigAsync(DeleteDatasetConfigRequest request) Deletes a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DeleteDatasetConfigRequest request = DeleteDatasetConfigRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .setRequestId("requestId693933066") .build(); storageInsightsClient.deleteDatasetConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDatasetConfigOperationCallable
public final OperationCallable<DeleteDatasetConfigRequest,com.google.protobuf.Empty, deleteDatasetConfigOperationCallable()OperationMetadata> Deletes a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DeleteDatasetConfigRequest request = DeleteDatasetConfigRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = storageInsightsClient.deleteDatasetConfigOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteDatasetConfigCallable
Deletes a dataset configuration in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DeleteDatasetConfigRequest request = DeleteDatasetConfigRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = storageInsightsClient.deleteDatasetConfigCallable().futureCall(request); // Do something. future.get(); } -
linkDatasetAsync
public final OperationFuture<LinkDatasetResponse,OperationMetadata> linkDatasetAsync(DatasetConfigName name) Links a dataset to BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DatasetConfigName name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]"); LinkDatasetResponse response = storageInsightsClient.linkDatasetAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
linkDatasetAsync
Links a dataset to BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString(); LinkDatasetResponse response = storageInsightsClient.linkDatasetAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
linkDatasetAsync
public final OperationFuture<LinkDatasetResponse,OperationMetadata> linkDatasetAsync(LinkDatasetRequest request) Links a dataset to BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { LinkDatasetRequest request = LinkDatasetRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); LinkDatasetResponse response = storageInsightsClient.linkDatasetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
linkDatasetOperationCallable
public final OperationCallable<LinkDatasetRequest,LinkDatasetResponse, linkDatasetOperationCallable()OperationMetadata> Links a dataset to BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { LinkDatasetRequest request = LinkDatasetRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); OperationFuture<LinkDatasetResponse, OperationMetadata> future = storageInsightsClient.linkDatasetOperationCallable().futureCall(request); // Do something. LinkDatasetResponse response = future.get(); } -
linkDatasetCallable
Links a dataset to BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { LinkDatasetRequest request = LinkDatasetRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); ApiFuture<Operation> future = storageInsightsClient.linkDatasetCallable().futureCall(request); // Do something. Operation response = future.get(); } -
unlinkDatasetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> unlinkDatasetAsync(DatasetConfigName name) Unlinks a dataset from BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { DatasetConfigName name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]"); storageInsightsClient.unlinkDatasetAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
unlinkDatasetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> unlinkDatasetAsync(String name) Unlinks a dataset from BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { String name = DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString(); storageInsightsClient.unlinkDatasetAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
unlinkDatasetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> unlinkDatasetAsync(UnlinkDatasetRequest request) Unlinks a dataset from BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UnlinkDatasetRequest request = UnlinkDatasetRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); storageInsightsClient.unlinkDatasetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
unlinkDatasetOperationCallable
public final OperationCallable<UnlinkDatasetRequest,com.google.protobuf.Empty, unlinkDatasetOperationCallable()OperationMetadata> Unlinks a dataset from BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UnlinkDatasetRequest request = UnlinkDatasetRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = storageInsightsClient.unlinkDatasetOperationCallable().futureCall(request); // Do something. future.get(); } -
unlinkDatasetCallable
Unlinks a dataset from BigQuery in a given project for a given location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { UnlinkDatasetRequest request = UnlinkDatasetRequest.newBuilder() .setName( DatasetConfigName.of("[PROJECT]", "[LOCATION]", "[DATASET_CONFIG]").toString()) .build(); ApiFuture<Operation> future = storageInsightsClient.unlinkDatasetCallable().futureCall(request); // Do something. future.get(); } -
listLocations
public final StorageInsightsClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : storageInsightsClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,StorageInsightsClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = storageInsightsClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = storageInsightsClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = storageInsightsClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StorageInsightsClient storageInsightsClient = StorageInsightsClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = storageInsightsClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-