Class RecommenderClient (2.16.0)

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.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

RecommenderClient(RecommenderClient const &)

Copy and move support

Parameter
Name Description
RecommenderClient const &

RecommenderClient(RecommenderClient &&)

Copy and move support

Parameter
Name Description
RecommenderClient &&

RecommenderClient(std::shared_ptr< RecommenderConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< RecommenderConnection >
opts Options

Operators

operator=(RecommenderClient const &)

Copy and move support

Parameter
Name Description
RecommenderClient const &
Returns
Type Description
RecommenderClient &

operator=(RecommenderClient &&)

Copy and move support

Parameter
Name Description
RecommenderClient &&
Returns
Type Description
RecommenderClient &

Functions

ListInsights(std::string const &, Options)

Lists insights for the specified Cloud Resource.

Requires the recommender.*.list IAM permission for the specified insight type.

Parameters
Name Description
parent std::string const &

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]
  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]
  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]
  • folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]
  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]
    LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::recommender::v1::Insight >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.recommender.v1.Insight, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListInsights(google::cloud::recommender::v1::ListInsightsRequest, Options)

Lists insights for the specified Cloud Resource.

Requires the recommender.*.list IAM permission for the specified insight type.

Parameters
Name Description
request google::cloud::recommender::v1::ListInsightsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.ListInsightsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::recommender::v1::Insight >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.recommender.v1.Insight, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetInsight(std::string const &, Options)

Gets the requested insight.

Requires the recommender.*.get IAM permission for the specified insight type.

Parameters
Name Description
name std::string const &

Required. Name of the insight.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Insight >

the result of the RPC. The response message type (google.cloud.recommender.v1.Insight) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetInsight(google::cloud::recommender::v1::GetInsightRequest const &, Options)

Gets the requested insight.

Requires the recommender.*.get IAM permission for the specified insight type.

Parameters
Name Description
request google::cloud::recommender::v1::GetInsightRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.GetInsightRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Insight >

the result of the RPC. The response message type (google.cloud.recommender.v1.Insight) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkInsightAccepted(std::string const &, std::map< std::string, std::string > const &, std::string const &, Options)

Marks the Insight State as Accepted.

Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.

MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.

Parameters
Name Description
name std::string const &

Required. Name of the insight.

state_metadata std::map< std::string, std::string > const &

Optional. State properties user wish to include with this state. Full replace of the current state_metadata.

etag std::string const &

Required. Fingerprint of the Insight. Provides optimistic locking.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Insight >

the result of the RPC. The response message type (google.cloud.recommender.v1.Insight) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkInsightAccepted(google::cloud::recommender::v1::MarkInsightAcceptedRequest const &, Options)

Marks the Insight State as Accepted.

Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.

MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.

Parameters
Name Description
request google::cloud::recommender::v1::MarkInsightAcceptedRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.MarkInsightAcceptedRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Insight >

the result of the RPC. The response message type (google.cloud.recommender.v1.Insight) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListRecommendations(std::string const &, Options)

Lists recommendations for the specified Cloud Resource.

Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
Name Description
parent std::string const &

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
    LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::recommender::v1::Recommendation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.recommender.v1.Recommendation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListRecommendations(std::string const &, std::string const &, Options)

Lists recommendations for the specified Cloud Resource.

Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
Name Description
parent std::string const &

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]
    LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.
filter std::string const &

Filter expression to restrict the recommendations returned. Supported filter fields:

  • state_info.state
  • recommenderSubtype
  • priority
    Examples:
  • stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED
  • recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE
  • priority = P1 OR priority = P2
  • stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
    (These expressions are based on the filter language described at https://google.aip.dev/160)
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::recommender::v1::Recommendation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.recommender.v1.Recommendation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListRecommendations(google::cloud::recommender::v1::ListRecommendationsRequest, Options)

Lists recommendations for the specified Cloud Resource.

Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
Name Description
request google::cloud::recommender::v1::ListRecommendationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.ListRecommendationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::recommender::v1::Recommendation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.recommender.v1.Recommendation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetRecommendation(std::string const &, Options)

Gets the requested recommendation.

Requires the recommender.*.get IAM permission for the specified recommender.

Parameters
Name Description
name std::string const &

Required. Name of the recommendation.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetRecommendation(google::cloud::recommender::v1::GetRecommendationRequest const &, Options)

Gets the requested recommendation.

Requires the recommender.*.get IAM permission for the specified recommender.

Parameters
Name Description
request google::cloud::recommender::v1::GetRecommendationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.GetRecommendationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkRecommendationDismissed(google::cloud::recommender::v1::MarkRecommendationDismissedRequest const &, Options)

Mark the Recommendation State as Dismissed.

Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED.

MarkRecommendationDismissed can be applied to recommendations in ACTIVE state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
request google::cloud::recommender::v1::MarkRecommendationDismissedRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.MarkRecommendationDismissedRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkRecommendationClaimed(std::string const &, std::map< std::string, std::string > const &, std::string const &, Options)

Marks the Recommendation State as Claimed.

Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.

MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
name std::string const &

Required. Name of the recommendation.

state_metadata std::map< std::string, std::string > const &

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etag std::string const &

Required. Fingerprint of the Recommendation. Provides optimistic locking.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkRecommendationClaimed(google::cloud::recommender::v1::MarkRecommendationClaimedRequest const &, Options)

Marks the Recommendation State as Claimed.

Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.

MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
request google::cloud::recommender::v1::MarkRecommendationClaimedRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.MarkRecommendationClaimedRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkRecommendationSucceeded(std::string const &, std::map< std::string, std::string > const &, std::string const &, Options)

Marks the Recommendation State as Succeeded.

Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.

MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
name std::string const &

Required. Name of the recommendation.

state_metadata std::map< std::string, std::string > const &

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etag std::string const &

Required. Fingerprint of the Recommendation. Provides optimistic locking.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkRecommendationSucceeded(google::cloud::recommender::v1::MarkRecommendationSucceededRequest const &, Options)

Marks the Recommendation State as Succeeded.

Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.

MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
request google::cloud::recommender::v1::MarkRecommendationSucceededRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.MarkRecommendationSucceededRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkRecommendationFailed(std::string const &, std::map< std::string, std::string > const &, std::string const &, Options)

Marks the Recommendation State as Failed.

Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.

MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
name std::string const &

Required. Name of the recommendation.

state_metadata std::map< std::string, std::string > const &

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etag std::string const &

Required. Fingerprint of the Recommendation. Provides optimistic locking.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

MarkRecommendationFailed(google::cloud::recommender::v1::MarkRecommendationFailedRequest const &, Options)

Marks the Recommendation State as Failed.

Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.

MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
request google::cloud::recommender::v1::MarkRecommendationFailedRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.MarkRecommendationFailedRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::Recommendation >

the result of the RPC. The response message type (google.cloud.recommender.v1.Recommendation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetRecommenderConfig(std::string const &, Options)

Gets the requested Recommender Config.

There is only one instance of the config for each Recommender.

Parameters
Name Description
name std::string const &

Required. Name of the Recommendation Config to get.
Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::RecommenderConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.RecommenderConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetRecommenderConfig(google::cloud::recommender::v1::GetRecommenderConfigRequest const &, Options)

Gets the requested Recommender Config.

There is only one instance of the config for each Recommender.

Parameters
Name Description
request google::cloud::recommender::v1::GetRecommenderConfigRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.GetRecommenderConfigRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::RecommenderConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.RecommenderConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateRecommenderConfig(google::cloud::recommender::v1::RecommenderConfig const &, google::protobuf::FieldMask const &, Options)

Updates a Recommender Config.

This will create a new revision of the config.

Parameters
Name Description
recommender_config google::cloud::recommender::v1::RecommenderConfig const &

Required. The RecommenderConfig to update.

update_mask google::protobuf::FieldMask const &

The list of fields to be updated.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::RecommenderConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.RecommenderConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateRecommenderConfig(google::cloud::recommender::v1::UpdateRecommenderConfigRequest const &, Options)

Updates a Recommender Config.

This will create a new revision of the config.

Parameters
Name Description
request google::cloud::recommender::v1::UpdateRecommenderConfigRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.UpdateRecommenderConfigRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::RecommenderConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.RecommenderConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetInsightTypeConfig(std::string const &, Options)

Gets the requested InsightTypeConfig.

There is only one instance of the config for each InsightType.

Parameters
Name Description
name std::string const &

Required. Name of the InsightTypeConfig to get.
Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::InsightTypeConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.InsightTypeConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetInsightTypeConfig(google::cloud::recommender::v1::GetInsightTypeConfigRequest const &, Options)

Gets the requested InsightTypeConfig.

There is only one instance of the config for each InsightType.

Parameters
Name Description
request google::cloud::recommender::v1::GetInsightTypeConfigRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.GetInsightTypeConfigRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::InsightTypeConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.InsightTypeConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateInsightTypeConfig(google::cloud::recommender::v1::InsightTypeConfig const &, google::protobuf::FieldMask const &, Options)

Updates an InsightTypeConfig change.

This will create a new revision of the config.

Parameters
Name Description
insight_type_config google::cloud::recommender::v1::InsightTypeConfig const &

Required. The InsightTypeConfig to update.

update_mask google::protobuf::FieldMask const &

The list of fields to be updated.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::InsightTypeConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.InsightTypeConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateInsightTypeConfig(google::cloud::recommender::v1::UpdateInsightTypeConfigRequest const &, Options)

Updates an InsightTypeConfig change.

This will create a new revision of the config.

Parameters
Name Description
request google::cloud::recommender::v1::UpdateInsightTypeConfigRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.recommender.v1.UpdateInsightTypeConfigRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::recommender::v1::InsightTypeConfig >

the result of the RPC. The response message type (google.cloud.recommender.v1.InsightTypeConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.