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:
|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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:
|
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 |
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:
|
filter |
std::string const &
Filter expression to restrict the recommendations returned. Supported filter fields: |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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.
|
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 |
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 |
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 |
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 |
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 |
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 |
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.
|
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 |
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 |
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 |
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 |
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 |
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 |