Package com.google.cloud.recommender.v1beta1 (2.25.0)

A client to Recommender API

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

RecommenderClient

Service Description: Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

Sample for RecommenderClient:


 // 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 (RecommenderClient recommenderClient = RecommenderClient.create()) {
   InsightName name =
       InsightName.ofProjectLocationInsightTypeInsightName(
           "[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
   Insight response = recommenderClient.getInsight(name);
 }
 

Classes

CostProjection

Contains metadata about how much money a recommendation can save or incur.

Protobuf type google.cloud.recommender.v1beta1.CostProjection

CostProjection.Builder

Contains metadata about how much money a recommendation can save or incur.

Protobuf type google.cloud.recommender.v1beta1.CostProjection

GetInsightRequest

Request to the GetInsight method.

Protobuf type google.cloud.recommender.v1beta1.GetInsightRequest

GetInsightRequest.Builder

Request to the GetInsight method.

Protobuf type google.cloud.recommender.v1beta1.GetInsightRequest

GetInsightTypeConfigRequest

Request for the GetInsightTypeConfig` method.

Protobuf type google.cloud.recommender.v1beta1.GetInsightTypeConfigRequest

GetInsightTypeConfigRequest.Builder

Request for the GetInsightTypeConfig` method.

Protobuf type google.cloud.recommender.v1beta1.GetInsightTypeConfigRequest

GetRecommendationRequest

Request to the GetRecommendation method.

Protobuf type google.cloud.recommender.v1beta1.GetRecommendationRequest

GetRecommendationRequest.Builder

Request to the GetRecommendation method.

Protobuf type google.cloud.recommender.v1beta1.GetRecommendationRequest

GetRecommenderConfigRequest

Request for the GetRecommenderConfig` method.

Protobuf type google.cloud.recommender.v1beta1.GetRecommenderConfigRequest

GetRecommenderConfigRequest.Builder

Request for the GetRecommenderConfig` method.

Protobuf type google.cloud.recommender.v1beta1.GetRecommenderConfigRequest

Impact

Contains the impact a recommendation can have for a given category.

Protobuf type google.cloud.recommender.v1beta1.Impact

Impact.Builder

Contains the impact a recommendation can have for a given category.

Protobuf type google.cloud.recommender.v1beta1.Impact

Insight

An insight along with the information used to derive the insight. The insight may have associated recomendations as well.

Protobuf type google.cloud.recommender.v1beta1.Insight

Insight.Builder

An insight along with the information used to derive the insight. The insight may have associated recomendations as well.

Protobuf type google.cloud.recommender.v1beta1.Insight

Insight.RecommendationReference

Reference to an associated recommendation.

Protobuf type google.cloud.recommender.v1beta1.Insight.RecommendationReference

Insight.RecommendationReference.Builder

Reference to an associated recommendation.

Protobuf type google.cloud.recommender.v1beta1.Insight.RecommendationReference

InsightName

InsightName.BillingAccountLocationInsightTypeInsightBuilder

Builder for billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}.

InsightName.Builder

Builder for projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}.

InsightName.FolderLocationInsightTypeInsightBuilder

Builder for folders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}.

InsightName.OrganizationLocationInsightTypeInsightBuilder

Builder for organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}.

InsightOuterClass

InsightStateInfo

Information related to insight state.

Protobuf type google.cloud.recommender.v1beta1.InsightStateInfo

InsightStateInfo.Builder

Information related to insight state.

Protobuf type google.cloud.recommender.v1beta1.InsightStateInfo

InsightTypeConfig

Configuration for an InsightType.

Protobuf type google.cloud.recommender.v1beta1.InsightTypeConfig

InsightTypeConfig.Builder

Configuration for an InsightType.

Protobuf type google.cloud.recommender.v1beta1.InsightTypeConfig

InsightTypeConfigName

InsightTypeConfigName.Builder

Builder for projects/{project}/locations/{location}/insightTypes/{insight_type}/config.

InsightTypeConfigName.OrganizationLocationInsightTypeBuilder

Builder for organizations/{organization}/locations/{location}/insightTypes/{insight_type}/config.

InsightTypeConfigProto

InsightTypeGenerationConfig

A configuration to customize the generation of insights. Eg, customizing the lookback period considered when generating a insight.

Protobuf type google.cloud.recommender.v1beta1.InsightTypeGenerationConfig

InsightTypeGenerationConfig.Builder

A configuration to customize the generation of insights. Eg, customizing the lookback period considered when generating a insight.

Protobuf type google.cloud.recommender.v1beta1.InsightTypeGenerationConfig

InsightTypeName

InsightTypeName.BillingAccountLocationInsightTypeBuilder

Builder for billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}.

InsightTypeName.Builder

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

InsightTypeName.FolderLocationInsightTypeBuilder

Builder for folders/{folder}/locations/{location}/insightTypes/{insight_type}.

InsightTypeName.OrganizationLocationInsightTypeBuilder

Builder for organizations/{organization}/locations/{location}/insightTypes/{insight_type}.

ListInsightsRequest

Request for the ListInsights method.

Protobuf type google.cloud.recommender.v1beta1.ListInsightsRequest

ListInsightsRequest.Builder

Request for the ListInsights method.

Protobuf type google.cloud.recommender.v1beta1.ListInsightsRequest

ListInsightsResponse

Response to the ListInsights method.

Protobuf type google.cloud.recommender.v1beta1.ListInsightsResponse

ListInsightsResponse.Builder

Response to the ListInsights method.

Protobuf type google.cloud.recommender.v1beta1.ListInsightsResponse

ListRecommendationsRequest

Request for the ListRecommendations method.

Protobuf type google.cloud.recommender.v1beta1.ListRecommendationsRequest

ListRecommendationsRequest.Builder

Request for the ListRecommendations method.

Protobuf type google.cloud.recommender.v1beta1.ListRecommendationsRequest

ListRecommendationsResponse

Response to the ListRecommendations method.

Protobuf type google.cloud.recommender.v1beta1.ListRecommendationsResponse

ListRecommendationsResponse.Builder

Response to the ListRecommendations method.

Protobuf type google.cloud.recommender.v1beta1.ListRecommendationsResponse

MarkInsightAcceptedRequest

Request for the MarkInsightAccepted method.

Protobuf type google.cloud.recommender.v1beta1.MarkInsightAcceptedRequest

MarkInsightAcceptedRequest.Builder

Request for the MarkInsightAccepted method.

Protobuf type google.cloud.recommender.v1beta1.MarkInsightAcceptedRequest

MarkRecommendationClaimedRequest

Request for the MarkRecommendationClaimed Method.

Protobuf type google.cloud.recommender.v1beta1.MarkRecommendationClaimedRequest

MarkRecommendationClaimedRequest.Builder

Request for the MarkRecommendationClaimed Method.

Protobuf type google.cloud.recommender.v1beta1.MarkRecommendationClaimedRequest

MarkRecommendationFailedRequest

Request for the MarkRecommendationFailed Method.

Protobuf type google.cloud.recommender.v1beta1.MarkRecommendationFailedRequest

MarkRecommendationFailedRequest.Builder

Request for the MarkRecommendationFailed Method.

Protobuf type google.cloud.recommender.v1beta1.MarkRecommendationFailedRequest

MarkRecommendationSucceededRequest

Request for the MarkRecommendationSucceeded Method.

Protobuf type google.cloud.recommender.v1beta1.MarkRecommendationSucceededRequest

MarkRecommendationSucceededRequest.Builder

Request for the MarkRecommendationSucceeded Method.

Protobuf type google.cloud.recommender.v1beta1.MarkRecommendationSucceededRequest

Operation

Contains an operation for a resource loosely based on the JSON-PATCH format with support for:

  • Custom filters for describing partial array patch.
  • Extended path values for describing nested arrays.
  • Custom fields for describing the resource for which the operation is being described.
  • Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.

Protobuf type google.cloud.recommender.v1beta1.Operation

Operation.Builder

Contains an operation for a resource loosely based on the JSON-PATCH format with support for:

  • Custom filters for describing partial array patch.
  • Extended path values for describing nested arrays.
  • Custom fields for describing the resource for which the operation is being described.
  • Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.

Protobuf type google.cloud.recommender.v1beta1.Operation

OperationGroup

Group of operations that need to be performed atomically.

Protobuf type google.cloud.recommender.v1beta1.OperationGroup

OperationGroup.Builder

Group of operations that need to be performed atomically.

Protobuf type google.cloud.recommender.v1beta1.OperationGroup

Recommendation

A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc

Protobuf type google.cloud.recommender.v1beta1.Recommendation

Recommendation.Builder

A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc

Protobuf type google.cloud.recommender.v1beta1.Recommendation

Recommendation.InsightReference

Reference to an associated insight.

Protobuf type google.cloud.recommender.v1beta1.Recommendation.InsightReference

Recommendation.InsightReference.Builder

Reference to an associated insight.

Protobuf type google.cloud.recommender.v1beta1.Recommendation.InsightReference

RecommendationContent

Contains what resources are changing and how they are changing.

Protobuf type google.cloud.recommender.v1beta1.RecommendationContent

RecommendationContent.Builder

Contains what resources are changing and how they are changing.

Protobuf type google.cloud.recommender.v1beta1.RecommendationContent

RecommendationName

RecommendationName.BillingAccountLocationRecommenderRecommendationBuilder

Builder for billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}.

RecommendationName.Builder

Builder for projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}.

RecommendationName.FolderLocationRecommenderRecommendationBuilder

Builder for folders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}.

RecommendationName.OrganizationLocationRecommenderRecommendationBuilder

Builder for organizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}.

RecommendationOuterClass

RecommendationStateInfo

Information for state. Contains state and metadata.

Protobuf type google.cloud.recommender.v1beta1.RecommendationStateInfo

RecommendationStateInfo.Builder

Information for state. Contains state and metadata.

Protobuf type google.cloud.recommender.v1beta1.RecommendationStateInfo

RecommenderClient

Service Description: Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

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 (RecommenderClient recommenderClient = RecommenderClient.create()) {
   InsightName name =
       InsightName.ofProjectLocationInsightTypeInsightName(
           "[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
   Insight response = recommenderClient.getInsight(name);
 }
 

Note: close() needs to be called on the RecommenderClient 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 RecommenderSettings 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
 RecommenderSettings recommenderSettings =
     RecommenderSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RecommenderClient recommenderClient = RecommenderClient.create(recommenderSettings);
 

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
 RecommenderSettings recommenderSettings =
     RecommenderSettings.newBuilder().setEndpoint(myEndpoint).build();
 RecommenderClient recommenderClient = RecommenderClient.create(recommenderSettings);
 

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
 RecommenderSettings recommenderSettings = RecommenderSettings.newHttpJsonBuilder().build();
 RecommenderClient recommenderClient = RecommenderClient.create(recommenderSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

RecommenderClient.ListInsightsFixedSizeCollection

RecommenderClient.ListInsightsPage

RecommenderClient.ListInsightsPagedResponse

RecommenderClient.ListRecommendationsFixedSizeCollection

RecommenderClient.ListRecommendationsPage

RecommenderClient.ListRecommendationsPagedResponse

RecommenderConfig

Configuration for a Recommender.

Protobuf type google.cloud.recommender.v1beta1.RecommenderConfig

RecommenderConfig.Builder

Configuration for a Recommender.

Protobuf type google.cloud.recommender.v1beta1.RecommenderConfig

RecommenderConfigName

RecommenderConfigName.Builder

Builder for projects/{project}/locations/{location}/recommenders/{recommender}/config.

RecommenderConfigName.OrganizationLocationRecommenderBuilder

Builder for organizations/{organization}/locations/{location}/recommenders/{recommender}/config.

RecommenderConfigProto

RecommenderGenerationConfig

A Configuration to customize the generation of recommendations. Eg, customizing the lookback period considered when generating a recommendation.

Protobuf type google.cloud.recommender.v1beta1.RecommenderGenerationConfig

RecommenderGenerationConfig.Builder

A Configuration to customize the generation of recommendations. Eg, customizing the lookback period considered when generating a recommendation.

Protobuf type google.cloud.recommender.v1beta1.RecommenderGenerationConfig

RecommenderGrpc

Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

RecommenderGrpc.RecommenderBlockingStub

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

Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

RecommenderGrpc.RecommenderFutureStub

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

Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

RecommenderGrpc.RecommenderImplBase

Base class for the server implementation of the service Recommender.

Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

RecommenderGrpc.RecommenderStub

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

Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

RecommenderName

RecommenderName.BillingAccountLocationRecommenderBuilder

Builder for billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}.

RecommenderName.Builder

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

RecommenderName.FolderLocationRecommenderBuilder

Builder for folders/{folder}/locations/{location}/recommenders/{recommender}.

RecommenderName.OrganizationLocationRecommenderBuilder

Builder for organizations/{organization}/locations/{location}/recommenders/{recommender}.

RecommenderProto

RecommenderSettings

Settings class to configure an instance of RecommenderClient.

The default instance has everything set to sensible defaults:

  • The default service address (recommender.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 getInsight 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
 RecommenderSettings.Builder recommenderSettingsBuilder = RecommenderSettings.newBuilder();
 recommenderSettingsBuilder
     .getInsightSettings()
     .setRetrySettings(
         recommenderSettingsBuilder
             .getInsightSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 RecommenderSettings recommenderSettings = recommenderSettingsBuilder.build();
 

RecommenderSettings.Builder

Builder for RecommenderSettings.

SecurityProjection

Contains various ways of describing the impact on Security.

Protobuf type google.cloud.recommender.v1beta1.SecurityProjection

SecurityProjection.Builder

Contains various ways of describing the impact on Security.

Protobuf type google.cloud.recommender.v1beta1.SecurityProjection

SustainabilityProjection

Contains metadata about how much sustainability a recommendation can save or incur.

Protobuf type google.cloud.recommender.v1beta1.SustainabilityProjection

SustainabilityProjection.Builder

Contains metadata about how much sustainability a recommendation can save or incur.

Protobuf type google.cloud.recommender.v1beta1.SustainabilityProjection

UpdateInsightTypeConfigRequest

Request for the UpdateInsightTypeConfig method.

Protobuf type google.cloud.recommender.v1beta1.UpdateInsightTypeConfigRequest

UpdateInsightTypeConfigRequest.Builder

Request for the UpdateInsightTypeConfig method.

Protobuf type google.cloud.recommender.v1beta1.UpdateInsightTypeConfigRequest

UpdateRecommenderConfigRequest

Request for the UpdateRecommenderConfig method.

Protobuf type google.cloud.recommender.v1beta1.UpdateRecommenderConfigRequest

UpdateRecommenderConfigRequest.Builder

Request for the UpdateRecommenderConfig method.

Protobuf type google.cloud.recommender.v1beta1.UpdateRecommenderConfigRequest

ValueMatcher

Contains various matching options for values for a GCP resource field.

Protobuf type google.cloud.recommender.v1beta1.ValueMatcher

ValueMatcher.Builder

Contains various matching options for values for a GCP resource field.

Protobuf type google.cloud.recommender.v1beta1.ValueMatcher

Interfaces

CostProjectionOrBuilder

GetInsightRequestOrBuilder

GetInsightTypeConfigRequestOrBuilder

GetRecommendationRequestOrBuilder

GetRecommenderConfigRequestOrBuilder

ImpactOrBuilder

Insight.RecommendationReferenceOrBuilder

InsightOrBuilder

InsightStateInfoOrBuilder

InsightTypeConfigOrBuilder

InsightTypeGenerationConfigOrBuilder

ListInsightsRequestOrBuilder

ListInsightsResponseOrBuilder

ListRecommendationsRequestOrBuilder

ListRecommendationsResponseOrBuilder

MarkInsightAcceptedRequestOrBuilder

MarkRecommendationClaimedRequestOrBuilder

MarkRecommendationFailedRequestOrBuilder

MarkRecommendationSucceededRequestOrBuilder

OperationGroupOrBuilder

OperationOrBuilder

Recommendation.InsightReferenceOrBuilder

RecommendationContentOrBuilder

RecommendationOrBuilder

RecommendationStateInfoOrBuilder

RecommenderConfigOrBuilder

RecommenderGenerationConfigOrBuilder

RecommenderGrpc.AsyncService

Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.

SecurityProjectionOrBuilder

SustainabilityProjectionOrBuilder

UpdateInsightTypeConfigRequestOrBuilder

UpdateRecommenderConfigRequestOrBuilder

ValueMatcherOrBuilder

Enums

Impact.Category

The category of the impact.

Protobuf enum google.cloud.recommender.v1beta1.Impact.Category

Impact.ProjectionCase

Insight.Category

Insight category.

Protobuf enum google.cloud.recommender.v1beta1.Insight.Category

Insight.Severity

Insight severity levels.

Protobuf enum google.cloud.recommender.v1beta1.Insight.Severity

InsightStateInfo.State

Represents insight state.

Protobuf enum google.cloud.recommender.v1beta1.InsightStateInfo.State

Operation.PathValueCase

Recommendation.Priority

Recommendation priority levels.

Protobuf enum google.cloud.recommender.v1beta1.Recommendation.Priority

RecommendationStateInfo.State

Represents Recommendation State.

Protobuf enum google.cloud.recommender.v1beta1.RecommendationStateInfo.State

ValueMatcher.MatchVariantCase