- Resource: Recommendation
- Impact
- Category
- CostProjection
- RecommendationContent
- OperationGroup
- Operation
- ValueMatcher
- RecommendationStateInfo
- State
- InsightReference
- 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, accurate to nanoseconds. Example: |
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. |
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. |
Impact
Contains the impact a recommendation can have for a given category.
JSON representation | |
---|---|
{ "category": enum ( |
Fields | |
---|---|
category |
Category that is being targeted. |
costProjection |
Use with CategoryType.COST |
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. |
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. |
duration |
Duration for which this cost applies. A duration in seconds with up to nine fractional digits, terminated by ' |
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. |
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 'and', '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
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 |
ValueMatcher
Contains various matching options for values for a GCP resource field.
JSON representation | |
---|---|
{ "matchesPattern": string } |
Fields | |
---|---|
matchesPattern |
To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch |
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 a Cloud project. |
|
Marks the Recommendation State as Claimed. |
|
Marks the Recommendation State as Failed. |
|
Marks the Recommendation State as Succeeded. |