REST Resource: projects.locations.insightTypes.insights

Resource: Insight

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

JSON representation
{
  "name": string,
  "description": string,
  "targetResources": [
    string
  ],
  "insightSubtype": string,
  "content": {
    object
  },
  "lastRefreshTime": string,
  "observationPeriod": string,
  "stateInfo": {
    object (InsightStateInfo)
  },
  "category": enum (Category),
  "etag": string,
  "associatedRecommendations": [
    {
      object (RecommendationReference)
    }
  ]
}
Fields
name

string

Name of the insight.

description

string

Free-form human readable summary in English. The maximum length is 500 characters.

targetResources[]

string

Fully qualified resource names that this insight is targeting.

insightSubtype

string

Insight subtype. Insight content schema will be stable for a given subtype.

content

object (Struct format)

A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000"

lastRefreshTime

string (Timestamp format)

Timestamp of the latest data used to generate the insight.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

observationPeriod

string (Duration format)

Observation period that led to the insight. The source data used to generate the insight ends at lastRefreshTime and begins at (lastRefreshTime - observationPeriod).

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

stateInfo

object (InsightStateInfo)

Information state and metadata.

category

enum (Category)

Category being targeted by the insight.

etag

string

Fingerprint of the Insight. Provides optimistic locking when updating states.

associatedRecommendations[]

object (RecommendationReference)

Recommendations derived from this insight.

InsightStateInfo

Information related to insight state.

JSON representation
{
  "state": enum (State),
  "stateMetadata": {
    string: string,
    ...
  }
}
Fields
state

enum (State)

Insight state.

stateMetadata

map (key: string, value: string)

A map of metadata for the state, provided by user or automations systems.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

State

Represents insight state.

Enums
STATE_UNSPECIFIED Unspecified state.
ACTIVE Insight is active. Content for ACTIVE insights can be updated by Google. ACTIVE insights can be marked DISMISSED OR ACCEPTED.
ACCEPTED Some action has been taken based on this insight. Insights become accepted when a recommendation derived from the insight has been marked CLAIMED, SUCCEEDED, or FAILED. ACTIVE insights can also be marked ACCEPTED explicitly. Content for ACCEPTED insights is immutable. ACCEPTED insights can only be marked ACCEPTED (which may update state metadata).
DISMISSED Insight is dismissed. Content for DISMISSED insights can be updated by Google. DISMISSED insights can be marked as ACTIVE.

Category

Insight category.

Enums
CATEGORY_UNSPECIFIED Unspecified category.
COST The insight is related to cost.
SECURITY The insight is related to security.
PERFORMANCE The insight is related to performance.
MANAGEABILITY This insight is related to manageability.

RecommendationReference

Reference to an associated recommendation.

JSON representation
{
  "recommendation": string
}
Fields
recommendation

string

Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]

Methods

get

Gets the requested insight.

list

Lists insights for a Cloud project.

markAccepted

Marks the Insight State as Accepted.