Skip to main content

recommendations

Creates, updates, deletes, gets or lists a recommendations resource.

Overview

Namerecommendations
TypeResource
Idgoogle.recommender.recommendations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of recommendation.
additionalImpactarrayOptional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
associatedInsightsarrayInsights that led to this recommendation.
contentobjectContent of the recommendation describing recommended changes to resources. (id: GoogleCloudRecommenderV1RecommendationContent)
descriptionstringFree-form human readable summary in English. The maximum length is 500 characters.
etagstringFingerprint of the Recommendation. Provides optimistic locking when updating states.
lastRefreshTimestring (google-datetime)Last time this recommendation was refreshed by the system that created it in the first place.
primaryImpactobjectThe primary impact that this recommendation can have while trying to optimize for one category. (id: GoogleCloudRecommenderV1Impact)
prioritystringRecommendation's priority.
recommenderSubtypestringContains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to content or primary_impact.category are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
stateInfoobjectInformation for state. Contains state and metadata. (id: GoogleCloudRecommenderV1RecommendationStateInfo)
targetResourcesarrayFully qualified resource names that this recommendation is targeting.
xorGroupIdstringCorresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_recommenders_recommendations_getselectprojectsId, locationsId, recommendersId, recommendationsIdGets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
billing_accounts_locations_recommenders_recommendations_getselectbillingAccountsId, locationsId, recommendersId, recommendationsIdGets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
folders_locations_recommenders_recommendations_getselectfoldersId, locationsId, recommendersId, recommendationsIdGets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
organizations_locations_recommenders_recommendations_getselectorganizationsId, locationsId, recommendersId, recommendationsIdGets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
projects_locations_recommenders_recommendations_listselectprojectsId, locationsId, recommendersIdpageSize, pageToken, filterLists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
billing_accounts_locations_recommenders_recommendations_listselectbillingAccountsId, locationsId, recommendersIdpageSize, pageToken, filterLists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
folders_locations_recommenders_recommendations_listselectfoldersId, locationsId, recommendersIdpageSize, pageToken, filterLists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
organizations_locations_recommenders_recommendations_listselectorganizationsId, locationsId, recommendersIdpageSize, pageToken, filterLists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
projects_locations_recommenders_recommendations_mark_dismissedexecprojectsId, locationsId, recommendersId, recommendationsIdMark 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.
projects_locations_recommenders_recommendations_mark_claimedexecprojectsId, locationsId, recommendersId, recommendationsIdMarks 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.
projects_locations_recommenders_recommendations_mark_succeededexecprojectsId, locationsId, recommendersId, recommendationsIdMarks 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.
projects_locations_recommenders_recommendations_mark_failedexecprojectsId, locationsId, recommendersId, recommendationsIdMarks 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.
billing_accounts_locations_recommenders_recommendations_mark_dismissedexecbillingAccountsId, locationsId, recommendersId, recommendationsIdMark 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.
billing_accounts_locations_recommenders_recommendations_mark_claimedexecbillingAccountsId, locationsId, recommendersId, recommendationsIdMarks 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.
billing_accounts_locations_recommenders_recommendations_mark_succeededexecbillingAccountsId, locationsId, recommendersId, recommendationsIdMarks 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.
billing_accounts_locations_recommenders_recommendations_mark_failedexecbillingAccountsId, locationsId, recommendersId, recommendationsIdMarks 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.
folders_locations_recommenders_recommendations_mark_dismissedexecfoldersId, locationsId, recommendersId, recommendationsIdMark 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.
folders_locations_recommenders_recommendations_mark_claimedexecfoldersId, locationsId, recommendersId, recommendationsIdMarks 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.
folders_locations_recommenders_recommendations_mark_succeededexecfoldersId, locationsId, recommendersId, recommendationsIdMarks 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.
folders_locations_recommenders_recommendations_mark_failedexecfoldersId, locationsId, recommendersId, recommendationsIdMarks 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.
organizations_locations_recommenders_recommendations_mark_dismissedexecorganizationsId, locationsId, recommendersId, recommendationsIdMark 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.
organizations_locations_recommenders_recommendations_mark_claimedexecorganizationsId, locationsId, recommendersId, recommendationsIdMarks 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.
organizations_locations_recommenders_recommendations_mark_succeededexecorganizationsId, locationsId, recommendersId, recommendationsIdMarks 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.
organizations_locations_recommenders_recommendations_mark_failedexecorganizationsId, locationsId, recommendersId, recommendationsIdMarks 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

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
billingAccountsIdstring
foldersIdstring
locationsIdstring
organizationsIdstring
projectsIdstring
recommendationsIdstring
recommendersIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.

SELECT
name,
additionalImpact,
associatedInsights,
content,
description,
etag,
lastRefreshTime,
primaryImpact,
priority,
recommenderSubtype,
stateInfo,
targetResources,
xorGroupId
FROM google.recommender.recommendations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND recommendersId = '{{ recommendersId }}' -- required
AND recommendationsId = '{{ recommendationsId }}' -- required;

Lifecycle Methods

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.

EXEC google.recommender.recommendations.projects_locations_recommenders_recommendations_mark_dismissed 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@recommendersId='{{ recommendersId }}' --required,
@recommendationsId='{{ recommendationsId }}' --required
@@json=
'{
"etag": "{{ etag }}"
}';