Skip to main content

insights

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

Overview

Nameinsights
TypeResource
Idgoogle.recommender.insights

Fields

NameDatatypeDescription
namestringIdentifier. Name of the insight.
descriptionstringFree-form human readable summary in English. The maximum length is 500 characters.
associatedRecommendationsarrayRecommendations derived from this insight.
categorystringCategory being targeted by the insight.
contentobjectA struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000"
etagstringFingerprint of the Insight. Provides optimistic locking when updating states.
insightSubtypestringInsight subtype. Insight content schema will be stable for a given subtype.
lastRefreshTimestringTimestamp of the latest data used to generate the insight.
observationPeriodstringObservation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).
severitystringInsight's severity.
stateInfoobjectInformation related to insight state.
targetResourcesarrayFully qualified resource names that this insight is targeting.

Methods

NameAccessible byRequired ParamsDescription
billing_accounts_locations_insight_types_insights_getSELECTbillingAccountsId, insightTypesId, insightsId, locationsIdGets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
billing_accounts_locations_insight_types_insights_listSELECTbillingAccountsId, insightTypesId, locationsIdLists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
folders_locations_insight_types_insights_getSELECTfoldersId, insightTypesId, insightsId, locationsIdGets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
folders_locations_insight_types_insights_listSELECTfoldersId, insightTypesId, locationsIdLists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
organizations_locations_insight_types_insights_getSELECTinsightTypesId, insightsId, locationsId, organizationsIdGets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
organizations_locations_insight_types_insights_listSELECTinsightTypesId, locationsId, organizationsIdLists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
projects_locations_insight_types_insights_getSELECTinsightTypesId, insightsId, locationsId, projectsIdGets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
projects_locations_insight_types_insights_listSELECTinsightTypesId, locationsId, projectsIdLists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
billing_accounts_locations_insight_types_insights_mark_acceptedEXECbillingAccountsId, insightTypesId, insightsId, locationsIdMarks 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.
folders_locations_insight_types_insights_mark_acceptedEXECfoldersId, insightTypesId, insightsId, locationsIdMarks 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.
organizations_locations_insight_types_insights_mark_acceptedEXECinsightTypesId, insightsId, locationsId, organizationsIdMarks 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.
projects_locations_insight_types_insights_mark_acceptedEXECinsightTypesId, insightsId, locationsId, projectsIdMarks 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.

SELECT examples

Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.

SELECT
name,
description,
associatedRecommendations,
category,
content,
etag,
insightSubtype,
lastRefreshTime,
observationPeriod,
severity,
stateInfo,
targetResources
FROM google.recommender.insights
WHERE foldersId = '{{ foldersId }}'
AND insightTypesId = '{{ insightTypesId }}'
AND locationsId = '{{ locationsId }}';