- Resource: Recommendation
- Methods
Resource: Recommendation
A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
JSON representation |
---|
{ "name": string, "description": string, "recommenderSubtype": string, "lastRefreshTime": string, "primaryImpact": { object ( |
Fields | |
---|---|
name |
Name of recommendation. |
description |
Free-form human readable summary in English. The maximum length is 500 characters. |
recommenderSubtype |
Contains 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 Examples: For recommender = "google.iam.policy.Recommender", recommenderSubtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
lastRefreshTime |
Last time this recommendation was refreshed by the system that created it in the first place. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
primaryImpact |
The primary impact that this recommendation can have while trying to optimize for one category. |
additionalImpact[] |
Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative. |
priority |
Recommendation's priority. |
content |
Content of the recommendation describing recommended changes to resources. |
stateInfo |
Information for state. Contains state and metadata. |
etag |
Fingerprint of the Recommendation. Provides optimistic locking when updating states. |
associatedInsights[] |
Insights that led to this recommendation. |
xorGroupId |
Corresponds 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. |
Impact
Contains the impact a recommendation can have for a given category.
JSON representation |
---|
{ "category": enum ( |
Fields | |
---|---|
category |
Category that is being targeted. |
Union field projection . Contains projections (if any) for this category. projection can be only one of the following: |
|
costProjection |
Use with CategoryType.COST |
securityProjection |
Use with CategoryType.SECURITY |
sustainabilityProjection |
Use with CategoryType.SUSTAINABILITY |
reliabilityProjection |
Use with CategoryType.RELIABILITY |
Category
The category of the impact.
Enums | |
---|---|
CATEGORY_UNSPECIFIED |
Default unspecified category. Don't use directly. |
COST |
Indicates a potential increase or decrease in cost. |
SECURITY |
Indicates a potential increase or decrease in security. |
PERFORMANCE |
Indicates a potential increase or decrease in performance. |
MANAGEABILITY |
Indicates a potential increase or decrease in manageability. |
SUSTAINABILITY |
Indicates a potential increase or decrease in sustainability. |
RELIABILITY |
Indicates a potential increase or decrease in reliability. |
CostProjection
Contains metadata about how much money a recommendation can save or incur.
JSON representation |
---|
{ "cost": { object ( |
Fields | |
---|---|
cost |
An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices. |
duration |
Duration for which this cost applies. A duration in seconds with up to nine fractional digits, ending with ' |
costInLocalCurrency |
The approximate cost savings in the billing account's local currency. |
SecurityProjection
Contains various ways of describing the impact on Security.
JSON representation |
---|
{ "details": { object } } |
Fields | |
---|---|
details |
Additional security impact details that is provided by the recommender. |
SustainabilityProjection
Contains metadata about how much sustainability a recommendation can save or incur.
JSON representation |
---|
{ "kgCO2e": number, "duration": string } |
Fields | |
---|---|
kgCO2e |
Carbon Footprint generated in kg of CO2 equivalent. Chose kgCO2e so that the name renders correctly in camelCase (kgCO2e). |
duration |
Duration for which this sustainability applies. A duration in seconds with up to nine fractional digits, ending with ' |
ReliabilityProjection
Contains information on the impact of a reliability recommendation.
JSON representation |
---|
{
"risks": [
enum ( |
Fields | |
---|---|
risks[] |
Reliability risks mitigated by this recommendation. |
details |
Per-recommender projection. |
RiskType
The risk associated with the reliability issue.
Enums | |
---|---|
RISK_TYPE_UNSPECIFIED |
Default unspecified risk. Don't use directly. |
SERVICE_DISRUPTION |
Potential service downtime. |
DATA_LOSS |
Potential data loss. |
ACCESS_DENY |
Potential access denial. The service is still up but some or all clients can't access it. |
Priority
Recommendation priority levels.
Enums | |
---|---|
PRIORITY_UNSPECIFIED |
Recommendation has unspecified priority. |
P4 |
Recommendation has P4 priority (lowest priority). |
P3 |
Recommendation has P3 priority (second lowest priority). |
P2 |
Recommendation has P2 priority (second highest priority). |
P1 |
Recommendation has P1 priority (highest priority). |
RecommendationContent
Contains what resources are changing and how they are changing.
JSON representation |
---|
{
"operationGroups": [
{
object ( |
Fields | |
---|---|
operationGroups[] |
Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order. |
overview |
Condensed overview information about the recommendation. |
OperationGroup
Group of operations that need to be performed atomically.
JSON representation |
---|
{
"operations": [
{
object ( |
Fields | |
---|---|
operations[] |
List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear. |
Operation
Contains an operation for a resource loosely based on the JSON-PATCH format with support for:
- Custom filters for describing partial array patch.
- Extended path values for describing nested arrays.
- Custom fields for describing the resource for which the operation is being described.
- Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
JSON representation |
---|
{ "action": string, "resourceType": string, "resource": string, "path": string, "sourceResource": string, "sourcePath": string, "pathFilters": { string: value, ... }, "pathValueMatchers": { string: { object ( |
Fields | |
---|---|
action |
Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and custom operations. This field is case-insensitive and always populated. |
resourceType |
Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance |
resource |
Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo. |
path |
Path to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated. |
sourceResource |
Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", sourceResource = |
sourcePath |
Can be set with action 'copy' or 'move' to indicate the source field within resource or sourceResource, ignored if provided for other operation types. |
pathFilters |
Set of filters to apply if
When both pathFilters and pathValueMatchers are set, an implicit AND must be performed. An object containing a list of |
pathValueMatchers |
Similar to pathFilters, this contains set of filters to apply if An object containing a list of |
Union field path_value . One of the fields in the following block will be set and intend to describe a value for 'path' field. path_value can be only one of the following: |
|
value |
Value for the |
valueMatcher |
Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or |
RecommendationStateInfo
Information for state. Contains state and metadata.
JSON representation |
---|
{
"state": enum ( |
Fields | |
---|---|
state |
The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
stateMetadata |
A map of metadata for the state, provided by user or automations systems. An object containing a list of |
State
Represents Recommendation State.
Enums | |
---|---|
STATE_UNSPECIFIED |
Default state. Don't use directly. |
ACTIVE |
Recommendation is active and can be applied. Recommendations content can be updated by Google. ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. |
CLAIMED |
Recommendation is in claimed state. Recommendations content is immutable and cannot be updated by Google. CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. |
SUCCEEDED |
Recommendation is in succeeded state. Recommendations content is immutable and cannot be updated by Google. SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED. |
FAILED |
Recommendation is in failed state. Recommendations content is immutable and cannot be updated by Google. FAILED recommendations can be marked as SUCCEEDED, or FAILED. |
DISMISSED |
Recommendation is in dismissed state. Recommendation content can be updated by Google. DISMISSED recommendations can be marked as ACTIVE. |
InsightReference
Reference to an associated insight.
JSON representation |
---|
{ "insight": string } |
Fields | |
---|---|
insight |
Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
Methods |
|
---|---|
|
Gets the requested recommendation. |
|
Lists recommendations for the specified Cloud Resource. |
|
Marks the Recommendation State as Claimed. |
|
Mark the Recommendation State as Dismissed. |
|
Marks the Recommendation State as Failed. |
|
Marks the Recommendation State as Succeeded. |