Package com.google.cloud.storageinsights.v1 (0.13.0)

A client to Storage Insights API

The interfaces provided are listed below, along with usage samples.

StorageInsightsClient

Service Description: Service describing handlers for resources

Sample for StorageInsightsClient:


 // 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);
 }
 

Classes

CSVOptions

Options to configure CSV formatted reports.

Protobuf type google.cloud.storageinsights.v1.CSVOptions

CSVOptions.Builder

Options to configure CSV formatted reports.

Protobuf type google.cloud.storageinsights.v1.CSVOptions

CloudStorageDestinationOptions

Options to store reports in storage systems. Next ID: 3

Protobuf type google.cloud.storageinsights.v1.CloudStorageDestinationOptions

CloudStorageDestinationOptions.Builder

Options to store reports in storage systems. Next ID: 3

Protobuf type google.cloud.storageinsights.v1.CloudStorageDestinationOptions

CloudStorageFilters

Options to filter data on storage systems. Next ID: 2

Protobuf type google.cloud.storageinsights.v1.CloudStorageFilters

CloudStorageFilters.Builder

Options to filter data on storage systems. Next ID: 2

Protobuf type google.cloud.storageinsights.v1.CloudStorageFilters

CreateReportConfigRequest

Message for creating a ReportConfig

Protobuf type google.cloud.storageinsights.v1.CreateReportConfigRequest

CreateReportConfigRequest.Builder

Message for creating a ReportConfig

Protobuf type google.cloud.storageinsights.v1.CreateReportConfigRequest

DeleteReportConfigRequest

Message for deleting a ReportConfig

Protobuf type google.cloud.storageinsights.v1.DeleteReportConfigRequest

DeleteReportConfigRequest.Builder

Message for deleting a ReportConfig

Protobuf type google.cloud.storageinsights.v1.DeleteReportConfigRequest

FrequencyOptions

ReportConfig Resource:

Options to setup frequency of report generation.

Protobuf type google.cloud.storageinsights.v1.FrequencyOptions

FrequencyOptions.Builder

ReportConfig Resource:

Options to setup frequency of report generation.

Protobuf type google.cloud.storageinsights.v1.FrequencyOptions

GetReportConfigRequest

Message for getting a ReportConfig

Protobuf type google.cloud.storageinsights.v1.GetReportConfigRequest

GetReportConfigRequest.Builder

Message for getting a ReportConfig

Protobuf type google.cloud.storageinsights.v1.GetReportConfigRequest

GetReportDetailRequest

Message for getting a ReportDetail

Protobuf type google.cloud.storageinsights.v1.GetReportDetailRequest

GetReportDetailRequest.Builder

Message for getting a ReportDetail

Protobuf type google.cloud.storageinsights.v1.GetReportDetailRequest

ListReportConfigsRequest

Message for requesting list of ReportConfigs

Protobuf type google.cloud.storageinsights.v1.ListReportConfigsRequest

ListReportConfigsRequest.Builder

Message for requesting list of ReportConfigs

Protobuf type google.cloud.storageinsights.v1.ListReportConfigsRequest

ListReportConfigsResponse

Message for response to listing ReportConfigs

Protobuf type google.cloud.storageinsights.v1.ListReportConfigsResponse

ListReportConfigsResponse.Builder

Message for response to listing ReportConfigs

Protobuf type google.cloud.storageinsights.v1.ListReportConfigsResponse

ListReportDetailsRequest

Message for requesting list of ReportDetails

Protobuf type google.cloud.storageinsights.v1.ListReportDetailsRequest

ListReportDetailsRequest.Builder

Message for requesting list of ReportDetails

Protobuf type google.cloud.storageinsights.v1.ListReportDetailsRequest

ListReportDetailsResponse

Message for response to listing ReportDetails

Protobuf type google.cloud.storageinsights.v1.ListReportDetailsResponse

ListReportDetailsResponse.Builder

Message for response to listing ReportDetails

Protobuf type google.cloud.storageinsights.v1.ListReportDetailsResponse

LocationName

LocationName.Builder

Builder for projects/{project}/locations/{location}.

ObjectMetadataReportOptions

Report specification for exporting object metadata. Next ID: 4

Protobuf type google.cloud.storageinsights.v1.ObjectMetadataReportOptions

ObjectMetadataReportOptions.Builder

Report specification for exporting object metadata. Next ID: 4

Protobuf type google.cloud.storageinsights.v1.ObjectMetadataReportOptions

OperationMetadata

Represents the metadata of the long-running operation.

Protobuf type google.cloud.storageinsights.v1.OperationMetadata

OperationMetadata.Builder

Represents the metadata of the long-running operation.

Protobuf type google.cloud.storageinsights.v1.OperationMetadata

ParquetOptions

Options to configure Parquet formatted reports.

Protobuf type google.cloud.storageinsights.v1.ParquetOptions

ParquetOptions.Builder

Options to configure Parquet formatted reports.

Protobuf type google.cloud.storageinsights.v1.ParquetOptions

ReportConfig

Message describing ReportConfig object. ReportConfig is the configuration to generate reports. See https://cloud.google.com/storage/docs/insights/using-inventory-reports#create-config-rest for more details on how to set various fields. Next ID: 12

Protobuf type google.cloud.storageinsights.v1.ReportConfig

ReportConfig.Builder

Message describing ReportConfig object. ReportConfig is the configuration to generate reports. See https://cloud.google.com/storage/docs/insights/using-inventory-reports#create-config-rest for more details on how to set various fields. Next ID: 12

Protobuf type google.cloud.storageinsights.v1.ReportConfig

ReportConfigName

ReportConfigName.Builder

Builder for projects/{project}/locations/{location}/reportConfigs/{report_config}.

ReportDetail

Message describing ReportDetail object. ReportDetail represents metadata of generated reports for a ReportConfig. Next ID: 10

Protobuf type google.cloud.storageinsights.v1.ReportDetail

ReportDetail.Builder

Message describing ReportDetail object. ReportDetail represents metadata of generated reports for a ReportConfig. Next ID: 10

Protobuf type google.cloud.storageinsights.v1.ReportDetail

ReportDetail.Metrics

Different metrics associated with the generated report.

Protobuf type google.cloud.storageinsights.v1.ReportDetail.Metrics

ReportDetail.Metrics.Builder

Different metrics associated with the generated report.

Protobuf type google.cloud.storageinsights.v1.ReportDetail.Metrics

ReportDetailName

ReportDetailName.Builder

Builder for projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail}.

StorageInsightsClient

Service Description: Service describing handlers for resources

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().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns 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.

StorageInsightsClient.ListLocationsFixedSizeCollection

StorageInsightsClient.ListLocationsPage

StorageInsightsClient.ListLocationsPagedResponse

StorageInsightsClient.ListReportConfigsFixedSizeCollection

StorageInsightsClient.ListReportConfigsPage

StorageInsightsClient.ListReportConfigsPagedResponse

StorageInsightsClient.ListReportDetailsFixedSizeCollection

StorageInsightsClient.ListReportDetailsPage

StorageInsightsClient.ListReportDetailsPagedResponse

StorageInsightsGrpc

Service describing handlers for resources

StorageInsightsGrpc.StorageInsightsBlockingStub

A stub to allow clients to do synchronous rpc calls to service StorageInsights.

Service describing handlers for resources

StorageInsightsGrpc.StorageInsightsFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service StorageInsights.

Service describing handlers for resources

StorageInsightsGrpc.StorageInsightsImplBase

Base class for the server implementation of the service StorageInsights.

Service describing handlers for resources

StorageInsightsGrpc.StorageInsightsStub

A stub to allow clients to do asynchronous rpc calls to service StorageInsights.

Service describing handlers for resources

StorageInsightsSettings

Settings class to configure an instance of StorageInsightsClient.

The default instance has everything set to sensible defaults:

  • The default service address (storageinsights.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of getReportConfig to 30 seconds:


 // 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.Builder storageInsightsSettingsBuilder =
     StorageInsightsSettings.newBuilder();
 storageInsightsSettingsBuilder
     .getReportConfigSettings()
     .setRetrySettings(
         storageInsightsSettingsBuilder
             .getReportConfigSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 StorageInsightsSettings storageInsightsSettings = storageInsightsSettingsBuilder.build();
 

StorageInsightsSettings.Builder

Builder for StorageInsightsSettings.

UpdateReportConfigRequest

Message for updating a ReportConfig

Protobuf type google.cloud.storageinsights.v1.UpdateReportConfigRequest

UpdateReportConfigRequest.Builder

Message for updating a ReportConfig

Protobuf type google.cloud.storageinsights.v1.UpdateReportConfigRequest

V1Proto

Interfaces

CSVOptionsOrBuilder

CloudStorageDestinationOptionsOrBuilder

CloudStorageFiltersOrBuilder

CreateReportConfigRequestOrBuilder

DeleteReportConfigRequestOrBuilder

FrequencyOptionsOrBuilder

GetReportConfigRequestOrBuilder

GetReportDetailRequestOrBuilder

ListReportConfigsRequestOrBuilder

ListReportConfigsResponseOrBuilder

ListReportDetailsRequestOrBuilder

ListReportDetailsResponseOrBuilder

ObjectMetadataReportOptionsOrBuilder

OperationMetadataOrBuilder

ParquetOptionsOrBuilder

ReportConfigOrBuilder

ReportDetail.MetricsOrBuilder

ReportDetailOrBuilder

StorageInsightsGrpc.AsyncService

Service describing handlers for resources

UpdateReportConfigRequestOrBuilder

Enums

FrequencyOptions.Frequency

This ENUM specifies possible frequencies of report generation.

Protobuf enum google.cloud.storageinsights.v1.FrequencyOptions.Frequency

ObjectMetadataReportOptions.DestinationOptionsCase

ObjectMetadataReportOptions.FilterCase

ReportConfig.ReportFormatCase

ReportConfig.ReportKindCase