Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="recommender_v1beta1.html">Recommender API</a> . <a href="recommender_v1beta1.projects.html">projects</a> . <a href="recommender_v1beta1.projects.locations.html">locations</a> . <a href="recommender_v1beta1.projects.locations.recommenders.html">recommenders</a> . <a href="recommender_v1beta1.projects.locations.recommenders.recommendations.html">recommendations</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Gets the requested recommendation. Requires the recommender.*.get</p> |
| 80 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 81 | <code><a href="#list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 82 | <p class="firstline">Lists recommendations for a Cloud project. Requires the recommender.*.list</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 85 | <p class="firstline">Retrieves the next page of results.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#markClaimed">markClaimed(name, body=None, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Marks the Recommendation State as Claimed. Users can use this method to</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#markFailed">markFailed(name, body=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Marks the Recommendation State as Failed. Users can use this method to</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Marks the Recommendation State as Succeeded. Users can use this method to</p> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
| 97 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 98 | <pre>Gets the requested recommendation. Requires the recommender.*.get |
| 99 | IAM permission for the specified recommender. |
| 100 | |
| 101 | Args: |
| 102 | name: string, Required. Name of the recommendation. (required) |
| 103 | x__xgafv: string, V1 error format. |
| 104 | Allowed values |
| 105 | 1 - v1 error format |
| 106 | 2 - v2 error format |
| 107 | |
| 108 | Returns: |
| 109 | An object of the form: |
| 110 | |
| 111 | { # A recommendation along with a suggested action. E.g., a rightsizing |
| 112 | # recommendation for an underutilized VM, IAM role recommendations, etc |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 113 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 114 | # trying to optimize for the primary category. These may be positive |
| 115 | # or negative. |
| 116 | { # Contains the impact a recommendation can have for a given category. |
| 117 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 118 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 119 | # units indicate cost savings and positive cost units indicate increase. |
| 120 | # See google.type.Money documentation for positive/negative units. |
| 121 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 122 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 123 | # If `units` is positive, `nanos` must be positive or zero. |
| 124 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 125 | # If `units` is negative, `nanos` must be negative or zero. |
| 126 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 127 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 128 | "units": "A String", # The whole units of the amount. |
| 129 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 130 | }, |
| 131 | "duration": "A String", # Duration for which this cost applies. |
| 132 | }, |
| 133 | "category": "A String", # Category that is being targeted. |
| 134 | }, |
| 135 | ], |
| 136 | "name": "A String", # Name of recommendation. |
| 137 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 138 | # updating states. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 139 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 140 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 141 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 142 | "a_key": "A String", |
| 143 | }, |
| 144 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 145 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 146 | # optimize for one category. |
| 147 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 148 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 149 | # units indicate cost savings and positive cost units indicate increase. |
| 150 | # See google.type.Money documentation for positive/negative units. |
| 151 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 152 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 153 | # If `units` is positive, `nanos` must be positive or zero. |
| 154 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 155 | # If `units` is negative, `nanos` must be negative or zero. |
| 156 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 157 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 158 | "units": "A String", # The whole units of the amount. |
| 159 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 160 | }, |
| 161 | "duration": "A String", # Duration for which this cost applies. |
| 162 | }, |
| 163 | "category": "A String", # Category that is being targeted. |
| 164 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 165 | "associatedInsights": [ # Insights that led to this recommendation. |
| 166 | { # Reference to an associated insight. |
| 167 | "insight": "A String", # Insight resource name, e.g. |
| 168 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 169 | }, |
| 170 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 171 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 172 | # in the first place. |
| 173 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 174 | # same recommender. Subtype is a function of content and impact, meaning a |
| 175 | # new subtype might be added when significant changes to `content` or |
| 176 | # `primary_impact.category` are introduced. See the Recommenders section |
| 177 | # to see a list of subtypes for a given Recommender. |
| 178 | # |
| 179 | # Examples: |
| 180 | # For recommender = "google.iam.policy.Recommender", |
| 181 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
| 182 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 183 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 184 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 185 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 186 | # that, all operations within one group are expected to be performed |
| 187 | # atomically and in an order. |
| 188 | { # Group of operations that need to be performed atomically. |
| 189 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 190 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 191 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 192 | # with support for: |
| 193 | # |
| 194 | # * Custom filters for describing partial array patch. |
| 195 | # * Extended path values for describing nested arrays. |
| 196 | # * Custom fields for describing the resource for which the operation is being |
| 197 | # described. |
| 198 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 199 | # See https://tools.ietf.org/html/rfc6902 for details on the original RFC. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 200 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 201 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 202 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 203 | # different resources of the same type. Example: A resource clone can be |
| 204 | # done via action = 'copy', path = "/", from = "/", |
| 205 | # source_resource = <source> and resource_name = <target>. |
| 206 | # This field is empty for all other values of `action`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 207 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 208 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 209 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 210 | # elements in order to narrow down to a single unique element that is being |
| 211 | # tested/modified. |
| 212 | # This is intended to be an exact match per filter. To perform advanced |
| 213 | # matching, use path_value_matchers. |
| 214 | # |
| 215 | # * Example: { |
| 216 | # "/versions/*/name" : "it-123" |
| 217 | # "/versions/*/targetSize/percent": 20 |
| 218 | # } |
| 219 | # * Example: { |
| 220 | # "/bindings/*/role": "roles/admin" |
| 221 | # "/bindings/*/condition" : null |
| 222 | # } |
| 223 | # * Example: { |
| 224 | # "/bindings/*/role": "roles/admin" |
| 225 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 226 | # } |
| 227 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 228 | # must be performed. |
| 229 | "a_key": "", |
| 230 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 231 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 232 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 233 | # always populated. |
| 234 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 235 | # resource level, then path should be "/". This field is always populated. |
| 236 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 237 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 238 | # for 'test' operation. An exact match must be performed. |
| 239 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 240 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 241 | # compute.googleapis.com/Instance |
| 242 | "valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of |
| 243 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 244 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 245 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 246 | # used with RE2::FullMatch |
| 247 | }, |
| 248 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 249 | # field referes to array elements. This is meant to support value matching |
| 250 | # beyond exact match. To perform exact match, use path_filters. |
| 251 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 252 | # must be performed. |
| 253 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 254 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 255 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 256 | # used with RE2::FullMatch |
| 257 | }, |
| 258 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 259 | }, |
| 260 | ], |
| 261 | }, |
| 262 | ], |
| 263 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 264 | }</pre> |
| 265 | </div> |
| 266 | |
| 267 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 268 | <code class="details" id="list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 269 | <pre>Lists recommendations for a Cloud project. Requires the recommender.*.list |
| 270 | IAM permission for the specified recommender. |
| 271 | |
| 272 | Args: |
| 273 | parent: string, Required. The container resource on which to execute the request. |
| 274 | Acceptable formats: |
| 275 | |
| 276 | 1. |
| 277 | "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", |
| 278 | |
| 279 | LOCATION here refers to GCP Locations: |
| 280 | https://cloud.google.com/about/locations/ (required) |
| 281 | pageSize: integer, Optional. The maximum number of results to return from this request. Non-positive |
| 282 | values are ignored. If not specified, the server will determine the number |
| 283 | of results to return. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 284 | filter: string, Filter expression to restrict the recommendations returned. Supported |
| 285 | filter fields: state_info.state |
| 286 | Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 287 | pageToken: string, Optional. If present, retrieves the next batch of results from the preceding call to |
| 288 | this method. `page_token` must be the value of `next_page_token` from the |
| 289 | previous response. The values of other method parameters must be identical |
| 290 | to those in the previous call. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 291 | x__xgafv: string, V1 error format. |
| 292 | Allowed values |
| 293 | 1 - v1 error format |
| 294 | 2 - v2 error format |
| 295 | |
| 296 | Returns: |
| 297 | An object of the form: |
| 298 | |
| 299 | { # Response to the `ListRecommendations` method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 300 | "nextPageToken": "A String", # A token that can be used to request the next page of results. This field is |
| 301 | # empty if there are no additional results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 302 | "recommendations": [ # The set of recommendations for the `parent` resource. |
| 303 | { # A recommendation along with a suggested action. E.g., a rightsizing |
| 304 | # recommendation for an underutilized VM, IAM role recommendations, etc |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 305 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 306 | # trying to optimize for the primary category. These may be positive |
| 307 | # or negative. |
| 308 | { # Contains the impact a recommendation can have for a given category. |
| 309 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 310 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 311 | # units indicate cost savings and positive cost units indicate increase. |
| 312 | # See google.type.Money documentation for positive/negative units. |
| 313 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 314 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 315 | # If `units` is positive, `nanos` must be positive or zero. |
| 316 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 317 | # If `units` is negative, `nanos` must be negative or zero. |
| 318 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 319 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 320 | "units": "A String", # The whole units of the amount. |
| 321 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 322 | }, |
| 323 | "duration": "A String", # Duration for which this cost applies. |
| 324 | }, |
| 325 | "category": "A String", # Category that is being targeted. |
| 326 | }, |
| 327 | ], |
| 328 | "name": "A String", # Name of recommendation. |
| 329 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 330 | # updating states. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 331 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 332 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 333 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 334 | "a_key": "A String", |
| 335 | }, |
| 336 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 337 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 338 | # optimize for one category. |
| 339 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 340 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 341 | # units indicate cost savings and positive cost units indicate increase. |
| 342 | # See google.type.Money documentation for positive/negative units. |
| 343 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 344 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 345 | # If `units` is positive, `nanos` must be positive or zero. |
| 346 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 347 | # If `units` is negative, `nanos` must be negative or zero. |
| 348 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 349 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 350 | "units": "A String", # The whole units of the amount. |
| 351 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 352 | }, |
| 353 | "duration": "A String", # Duration for which this cost applies. |
| 354 | }, |
| 355 | "category": "A String", # Category that is being targeted. |
| 356 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 357 | "associatedInsights": [ # Insights that led to this recommendation. |
| 358 | { # Reference to an associated insight. |
| 359 | "insight": "A String", # Insight resource name, e.g. |
| 360 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 361 | }, |
| 362 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 363 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 364 | # in the first place. |
| 365 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 366 | # same recommender. Subtype is a function of content and impact, meaning a |
| 367 | # new subtype might be added when significant changes to `content` or |
| 368 | # `primary_impact.category` are introduced. See the Recommenders section |
| 369 | # to see a list of subtypes for a given Recommender. |
| 370 | # |
| 371 | # Examples: |
| 372 | # For recommender = "google.iam.policy.Recommender", |
| 373 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
| 374 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 375 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 376 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 377 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 378 | # that, all operations within one group are expected to be performed |
| 379 | # atomically and in an order. |
| 380 | { # Group of operations that need to be performed atomically. |
| 381 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 382 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 383 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 384 | # with support for: |
| 385 | # |
| 386 | # * Custom filters for describing partial array patch. |
| 387 | # * Extended path values for describing nested arrays. |
| 388 | # * Custom fields for describing the resource for which the operation is being |
| 389 | # described. |
| 390 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 391 | # See https://tools.ietf.org/html/rfc6902 for details on the original RFC. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 392 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 393 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 394 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 395 | # different resources of the same type. Example: A resource clone can be |
| 396 | # done via action = 'copy', path = "/", from = "/", |
| 397 | # source_resource = <source> and resource_name = <target>. |
| 398 | # This field is empty for all other values of `action`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 399 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 400 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 401 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 402 | # elements in order to narrow down to a single unique element that is being |
| 403 | # tested/modified. |
| 404 | # This is intended to be an exact match per filter. To perform advanced |
| 405 | # matching, use path_value_matchers. |
| 406 | # |
| 407 | # * Example: { |
| 408 | # "/versions/*/name" : "it-123" |
| 409 | # "/versions/*/targetSize/percent": 20 |
| 410 | # } |
| 411 | # * Example: { |
| 412 | # "/bindings/*/role": "roles/admin" |
| 413 | # "/bindings/*/condition" : null |
| 414 | # } |
| 415 | # * Example: { |
| 416 | # "/bindings/*/role": "roles/admin" |
| 417 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 418 | # } |
| 419 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 420 | # must be performed. |
| 421 | "a_key": "", |
| 422 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 423 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 424 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 425 | # always populated. |
| 426 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 427 | # resource level, then path should be "/". This field is always populated. |
| 428 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 429 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 430 | # for 'test' operation. An exact match must be performed. |
| 431 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 432 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 433 | # compute.googleapis.com/Instance |
| 434 | "valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of |
| 435 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 436 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 437 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 438 | # used with RE2::FullMatch |
| 439 | }, |
| 440 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 441 | # field referes to array elements. This is meant to support value matching |
| 442 | # beyond exact match. To perform exact match, use path_filters. |
| 443 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 444 | # must be performed. |
| 445 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 446 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 447 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 448 | # used with RE2::FullMatch |
| 449 | }, |
| 450 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 451 | }, |
| 452 | ], |
| 453 | }, |
| 454 | ], |
| 455 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 456 | }, |
| 457 | ], |
| 458 | }</pre> |
| 459 | </div> |
| 460 | |
| 461 | <div class="method"> |
| 462 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 463 | <pre>Retrieves the next page of results. |
| 464 | |
| 465 | Args: |
| 466 | previous_request: The request for the previous page. (required) |
| 467 | previous_response: The response from the request for the previous page. (required) |
| 468 | |
| 469 | Returns: |
| 470 | A request object that you can call 'execute()' on to request the next |
| 471 | page. Returns None if there are no more items in the collection. |
| 472 | </pre> |
| 473 | </div> |
| 474 | |
| 475 | <div class="method"> |
| 476 | <code class="details" id="markClaimed">markClaimed(name, body=None, x__xgafv=None)</code> |
| 477 | <pre>Marks the Recommendation State as Claimed. Users can use this method to |
| 478 | indicate to the Recommender API that they are starting to apply the |
| 479 | recommendation themselves. This stops the recommendation content from being |
| 480 | updated. Associated insights are frozen and placed in the ACCEPTED state. |
| 481 | |
| 482 | MarkRecommendationClaimed can be applied to recommendations in CLAIMED or |
| 483 | ACTIVE state. |
| 484 | |
| 485 | Requires the recommender.*.update IAM permission for the specified |
| 486 | recommender. |
| 487 | |
| 488 | Args: |
| 489 | name: string, Required. Name of the recommendation. (required) |
| 490 | body: object, The request body. |
| 491 | The object takes the form of: |
| 492 | |
| 493 | { # Request for the `MarkRecommendationClaimed` Method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 494 | "stateMetadata": { # State properties to include with this state. Overwrites any existing |
| 495 | # `state_metadata`. |
| 496 | # Keys must match the regex /^a-z0-9{0,62}$/. |
| 497 | # Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. |
| 498 | "a_key": "A String", |
| 499 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 500 | "etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 501 | } |
| 502 | |
| 503 | x__xgafv: string, V1 error format. |
| 504 | Allowed values |
| 505 | 1 - v1 error format |
| 506 | 2 - v2 error format |
| 507 | |
| 508 | Returns: |
| 509 | An object of the form: |
| 510 | |
| 511 | { # A recommendation along with a suggested action. E.g., a rightsizing |
| 512 | # recommendation for an underutilized VM, IAM role recommendations, etc |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 513 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 514 | # trying to optimize for the primary category. These may be positive |
| 515 | # or negative. |
| 516 | { # Contains the impact a recommendation can have for a given category. |
| 517 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 518 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 519 | # units indicate cost savings and positive cost units indicate increase. |
| 520 | # See google.type.Money documentation for positive/negative units. |
| 521 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 522 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 523 | # If `units` is positive, `nanos` must be positive or zero. |
| 524 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 525 | # If `units` is negative, `nanos` must be negative or zero. |
| 526 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 527 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 528 | "units": "A String", # The whole units of the amount. |
| 529 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 530 | }, |
| 531 | "duration": "A String", # Duration for which this cost applies. |
| 532 | }, |
| 533 | "category": "A String", # Category that is being targeted. |
| 534 | }, |
| 535 | ], |
| 536 | "name": "A String", # Name of recommendation. |
| 537 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 538 | # updating states. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 539 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 540 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 541 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 542 | "a_key": "A String", |
| 543 | }, |
| 544 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 545 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 546 | # optimize for one category. |
| 547 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 548 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 549 | # units indicate cost savings and positive cost units indicate increase. |
| 550 | # See google.type.Money documentation for positive/negative units. |
| 551 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 552 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 553 | # If `units` is positive, `nanos` must be positive or zero. |
| 554 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 555 | # If `units` is negative, `nanos` must be negative or zero. |
| 556 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 557 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 558 | "units": "A String", # The whole units of the amount. |
| 559 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 560 | }, |
| 561 | "duration": "A String", # Duration for which this cost applies. |
| 562 | }, |
| 563 | "category": "A String", # Category that is being targeted. |
| 564 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 565 | "associatedInsights": [ # Insights that led to this recommendation. |
| 566 | { # Reference to an associated insight. |
| 567 | "insight": "A String", # Insight resource name, e.g. |
| 568 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 569 | }, |
| 570 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 571 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 572 | # in the first place. |
| 573 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 574 | # same recommender. Subtype is a function of content and impact, meaning a |
| 575 | # new subtype might be added when significant changes to `content` or |
| 576 | # `primary_impact.category` are introduced. See the Recommenders section |
| 577 | # to see a list of subtypes for a given Recommender. |
| 578 | # |
| 579 | # Examples: |
| 580 | # For recommender = "google.iam.policy.Recommender", |
| 581 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
| 582 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 583 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 584 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 585 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 586 | # that, all operations within one group are expected to be performed |
| 587 | # atomically and in an order. |
| 588 | { # Group of operations that need to be performed atomically. |
| 589 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 590 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 591 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 592 | # with support for: |
| 593 | # |
| 594 | # * Custom filters for describing partial array patch. |
| 595 | # * Extended path values for describing nested arrays. |
| 596 | # * Custom fields for describing the resource for which the operation is being |
| 597 | # described. |
| 598 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 599 | # See https://tools.ietf.org/html/rfc6902 for details on the original RFC. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 600 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 601 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 602 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 603 | # different resources of the same type. Example: A resource clone can be |
| 604 | # done via action = 'copy', path = "/", from = "/", |
| 605 | # source_resource = <source> and resource_name = <target>. |
| 606 | # This field is empty for all other values of `action`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 607 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 608 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 609 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 610 | # elements in order to narrow down to a single unique element that is being |
| 611 | # tested/modified. |
| 612 | # This is intended to be an exact match per filter. To perform advanced |
| 613 | # matching, use path_value_matchers. |
| 614 | # |
| 615 | # * Example: { |
| 616 | # "/versions/*/name" : "it-123" |
| 617 | # "/versions/*/targetSize/percent": 20 |
| 618 | # } |
| 619 | # * Example: { |
| 620 | # "/bindings/*/role": "roles/admin" |
| 621 | # "/bindings/*/condition" : null |
| 622 | # } |
| 623 | # * Example: { |
| 624 | # "/bindings/*/role": "roles/admin" |
| 625 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 626 | # } |
| 627 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 628 | # must be performed. |
| 629 | "a_key": "", |
| 630 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 631 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 632 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 633 | # always populated. |
| 634 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 635 | # resource level, then path should be "/". This field is always populated. |
| 636 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 637 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 638 | # for 'test' operation. An exact match must be performed. |
| 639 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 640 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 641 | # compute.googleapis.com/Instance |
| 642 | "valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of |
| 643 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 644 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 645 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 646 | # used with RE2::FullMatch |
| 647 | }, |
| 648 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 649 | # field referes to array elements. This is meant to support value matching |
| 650 | # beyond exact match. To perform exact match, use path_filters. |
| 651 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 652 | # must be performed. |
| 653 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 654 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 655 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 656 | # used with RE2::FullMatch |
| 657 | }, |
| 658 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 659 | }, |
| 660 | ], |
| 661 | }, |
| 662 | ], |
| 663 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 664 | }</pre> |
| 665 | </div> |
| 666 | |
| 667 | <div class="method"> |
| 668 | <code class="details" id="markFailed">markFailed(name, body=None, x__xgafv=None)</code> |
| 669 | <pre>Marks the Recommendation State as Failed. Users can use this method to |
| 670 | indicate to the Recommender API that they have applied the recommendation |
| 671 | themselves, and the operation failed. This stops the recommendation content |
| 672 | from being updated. Associated insights are frozen and placed in the |
| 673 | ACCEPTED state. |
| 674 | |
| 675 | MarkRecommendationFailed can be applied to recommendations in ACTIVE, |
| 676 | CLAIMED, SUCCEEDED, or FAILED state. |
| 677 | |
| 678 | Requires the recommender.*.update IAM permission for the specified |
| 679 | recommender. |
| 680 | |
| 681 | Args: |
| 682 | name: string, Required. Name of the recommendation. (required) |
| 683 | body: object, The request body. |
| 684 | The object takes the form of: |
| 685 | |
| 686 | { # Request for the `MarkRecommendationFailed` Method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 687 | "stateMetadata": { # State properties to include with this state. Overwrites any existing |
| 688 | # `state_metadata`. |
| 689 | # Keys must match the regex /^a-z0-9{0,62}$/. |
| 690 | # Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. |
| 691 | "a_key": "A String", |
| 692 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 693 | "etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 694 | } |
| 695 | |
| 696 | x__xgafv: string, V1 error format. |
| 697 | Allowed values |
| 698 | 1 - v1 error format |
| 699 | 2 - v2 error format |
| 700 | |
| 701 | Returns: |
| 702 | An object of the form: |
| 703 | |
| 704 | { # A recommendation along with a suggested action. E.g., a rightsizing |
| 705 | # recommendation for an underutilized VM, IAM role recommendations, etc |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 706 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 707 | # trying to optimize for the primary category. These may be positive |
| 708 | # or negative. |
| 709 | { # Contains the impact a recommendation can have for a given category. |
| 710 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 711 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 712 | # units indicate cost savings and positive cost units indicate increase. |
| 713 | # See google.type.Money documentation for positive/negative units. |
| 714 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 715 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 716 | # If `units` is positive, `nanos` must be positive or zero. |
| 717 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 718 | # If `units` is negative, `nanos` must be negative or zero. |
| 719 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 720 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 721 | "units": "A String", # The whole units of the amount. |
| 722 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 723 | }, |
| 724 | "duration": "A String", # Duration for which this cost applies. |
| 725 | }, |
| 726 | "category": "A String", # Category that is being targeted. |
| 727 | }, |
| 728 | ], |
| 729 | "name": "A String", # Name of recommendation. |
| 730 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 731 | # updating states. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 732 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 733 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 734 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 735 | "a_key": "A String", |
| 736 | }, |
| 737 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 738 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 739 | # optimize for one category. |
| 740 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 741 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 742 | # units indicate cost savings and positive cost units indicate increase. |
| 743 | # See google.type.Money documentation for positive/negative units. |
| 744 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 745 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 746 | # If `units` is positive, `nanos` must be positive or zero. |
| 747 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 748 | # If `units` is negative, `nanos` must be negative or zero. |
| 749 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 750 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 751 | "units": "A String", # The whole units of the amount. |
| 752 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 753 | }, |
| 754 | "duration": "A String", # Duration for which this cost applies. |
| 755 | }, |
| 756 | "category": "A String", # Category that is being targeted. |
| 757 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 758 | "associatedInsights": [ # Insights that led to this recommendation. |
| 759 | { # Reference to an associated insight. |
| 760 | "insight": "A String", # Insight resource name, e.g. |
| 761 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 762 | }, |
| 763 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 764 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 765 | # in the first place. |
| 766 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 767 | # same recommender. Subtype is a function of content and impact, meaning a |
| 768 | # new subtype might be added when significant changes to `content` or |
| 769 | # `primary_impact.category` are introduced. See the Recommenders section |
| 770 | # to see a list of subtypes for a given Recommender. |
| 771 | # |
| 772 | # Examples: |
| 773 | # For recommender = "google.iam.policy.Recommender", |
| 774 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
| 775 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 776 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 777 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 778 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 779 | # that, all operations within one group are expected to be performed |
| 780 | # atomically and in an order. |
| 781 | { # Group of operations that need to be performed atomically. |
| 782 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 783 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 784 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 785 | # with support for: |
| 786 | # |
| 787 | # * Custom filters for describing partial array patch. |
| 788 | # * Extended path values for describing nested arrays. |
| 789 | # * Custom fields for describing the resource for which the operation is being |
| 790 | # described. |
| 791 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 792 | # See https://tools.ietf.org/html/rfc6902 for details on the original RFC. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 793 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 794 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 795 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 796 | # different resources of the same type. Example: A resource clone can be |
| 797 | # done via action = 'copy', path = "/", from = "/", |
| 798 | # source_resource = <source> and resource_name = <target>. |
| 799 | # This field is empty for all other values of `action`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 800 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 801 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 802 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 803 | # elements in order to narrow down to a single unique element that is being |
| 804 | # tested/modified. |
| 805 | # This is intended to be an exact match per filter. To perform advanced |
| 806 | # matching, use path_value_matchers. |
| 807 | # |
| 808 | # * Example: { |
| 809 | # "/versions/*/name" : "it-123" |
| 810 | # "/versions/*/targetSize/percent": 20 |
| 811 | # } |
| 812 | # * Example: { |
| 813 | # "/bindings/*/role": "roles/admin" |
| 814 | # "/bindings/*/condition" : null |
| 815 | # } |
| 816 | # * Example: { |
| 817 | # "/bindings/*/role": "roles/admin" |
| 818 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 819 | # } |
| 820 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 821 | # must be performed. |
| 822 | "a_key": "", |
| 823 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 824 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 825 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 826 | # always populated. |
| 827 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 828 | # resource level, then path should be "/". This field is always populated. |
| 829 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 830 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 831 | # for 'test' operation. An exact match must be performed. |
| 832 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 833 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 834 | # compute.googleapis.com/Instance |
| 835 | "valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of |
| 836 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 837 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 838 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 839 | # used with RE2::FullMatch |
| 840 | }, |
| 841 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 842 | # field referes to array elements. This is meant to support value matching |
| 843 | # beyond exact match. To perform exact match, use path_filters. |
| 844 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 845 | # must be performed. |
| 846 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 847 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 848 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 849 | # used with RE2::FullMatch |
| 850 | }, |
| 851 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 852 | }, |
| 853 | ], |
| 854 | }, |
| 855 | ], |
| 856 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 857 | }</pre> |
| 858 | </div> |
| 859 | |
| 860 | <div class="method"> |
| 861 | <code class="details" id="markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</code> |
| 862 | <pre>Marks the Recommendation State as Succeeded. Users can use this method to |
| 863 | indicate to the Recommender API that they have applied the recommendation |
| 864 | themselves, and the operation was successful. This stops the recommendation |
| 865 | content from being updated. Associated insights are frozen and placed in |
| 866 | the ACCEPTED state. |
| 867 | |
| 868 | MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, |
| 869 | CLAIMED, SUCCEEDED, or FAILED state. |
| 870 | |
| 871 | Requires the recommender.*.update IAM permission for the specified |
| 872 | recommender. |
| 873 | |
| 874 | Args: |
| 875 | name: string, Required. Name of the recommendation. (required) |
| 876 | body: object, The request body. |
| 877 | The object takes the form of: |
| 878 | |
| 879 | { # Request for the `MarkRecommendationSucceeded` Method. |
| 880 | "etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking. |
| 881 | "stateMetadata": { # State properties to include with this state. Overwrites any existing |
| 882 | # `state_metadata`. |
| 883 | # Keys must match the regex /^a-z0-9{0,62}$/. |
| 884 | # Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. |
| 885 | "a_key": "A String", |
| 886 | }, |
| 887 | } |
| 888 | |
| 889 | x__xgafv: string, V1 error format. |
| 890 | Allowed values |
| 891 | 1 - v1 error format |
| 892 | 2 - v2 error format |
| 893 | |
| 894 | Returns: |
| 895 | An object of the form: |
| 896 | |
| 897 | { # A recommendation along with a suggested action. E.g., a rightsizing |
| 898 | # recommendation for an underutilized VM, IAM role recommendations, etc |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 899 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 900 | # trying to optimize for the primary category. These may be positive |
| 901 | # or negative. |
| 902 | { # Contains the impact a recommendation can have for a given category. |
| 903 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 904 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 905 | # units indicate cost savings and positive cost units indicate increase. |
| 906 | # See google.type.Money documentation for positive/negative units. |
| 907 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 908 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 909 | # If `units` is positive, `nanos` must be positive or zero. |
| 910 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 911 | # If `units` is negative, `nanos` must be negative or zero. |
| 912 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 913 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 914 | "units": "A String", # The whole units of the amount. |
| 915 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 916 | }, |
| 917 | "duration": "A String", # Duration for which this cost applies. |
| 918 | }, |
| 919 | "category": "A String", # Category that is being targeted. |
| 920 | }, |
| 921 | ], |
| 922 | "name": "A String", # Name of recommendation. |
| 923 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 924 | # updating states. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 925 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 926 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 927 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 928 | "a_key": "A String", |
| 929 | }, |
| 930 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 931 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 932 | # optimize for one category. |
| 933 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 934 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 935 | # units indicate cost savings and positive cost units indicate increase. |
| 936 | # See google.type.Money documentation for positive/negative units. |
| 937 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 938 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 939 | # If `units` is positive, `nanos` must be positive or zero. |
| 940 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 941 | # If `units` is negative, `nanos` must be negative or zero. |
| 942 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 943 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 944 | "units": "A String", # The whole units of the amount. |
| 945 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 946 | }, |
| 947 | "duration": "A String", # Duration for which this cost applies. |
| 948 | }, |
| 949 | "category": "A String", # Category that is being targeted. |
| 950 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 951 | "associatedInsights": [ # Insights that led to this recommendation. |
| 952 | { # Reference to an associated insight. |
| 953 | "insight": "A String", # Insight resource name, e.g. |
| 954 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 955 | }, |
| 956 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 957 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 958 | # in the first place. |
| 959 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 960 | # same recommender. Subtype is a function of content and impact, meaning a |
| 961 | # new subtype might be added when significant changes to `content` or |
| 962 | # `primary_impact.category` are introduced. See the Recommenders section |
| 963 | # to see a list of subtypes for a given Recommender. |
| 964 | # |
| 965 | # Examples: |
| 966 | # For recommender = "google.iam.policy.Recommender", |
| 967 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
| 968 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 969 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 970 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 971 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 972 | # that, all operations within one group are expected to be performed |
| 973 | # atomically and in an order. |
| 974 | { # Group of operations that need to be performed atomically. |
| 975 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 976 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 977 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 978 | # with support for: |
| 979 | # |
| 980 | # * Custom filters for describing partial array patch. |
| 981 | # * Extended path values for describing nested arrays. |
| 982 | # * Custom fields for describing the resource for which the operation is being |
| 983 | # described. |
| 984 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 985 | # See https://tools.ietf.org/html/rfc6902 for details on the original RFC. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 986 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 987 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 988 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 989 | # different resources of the same type. Example: A resource clone can be |
| 990 | # done via action = 'copy', path = "/", from = "/", |
| 991 | # source_resource = <source> and resource_name = <target>. |
| 992 | # This field is empty for all other values of `action`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 993 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 994 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 995 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 996 | # elements in order to narrow down to a single unique element that is being |
| 997 | # tested/modified. |
| 998 | # This is intended to be an exact match per filter. To perform advanced |
| 999 | # matching, use path_value_matchers. |
| 1000 | # |
| 1001 | # * Example: { |
| 1002 | # "/versions/*/name" : "it-123" |
| 1003 | # "/versions/*/targetSize/percent": 20 |
| 1004 | # } |
| 1005 | # * Example: { |
| 1006 | # "/bindings/*/role": "roles/admin" |
| 1007 | # "/bindings/*/condition" : null |
| 1008 | # } |
| 1009 | # * Example: { |
| 1010 | # "/bindings/*/role": "roles/admin" |
| 1011 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 1012 | # } |
| 1013 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 1014 | # must be performed. |
| 1015 | "a_key": "", |
| 1016 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1017 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 1018 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 1019 | # always populated. |
| 1020 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 1021 | # resource level, then path should be "/". This field is always populated. |
| 1022 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 1023 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 1024 | # for 'test' operation. An exact match must be performed. |
| 1025 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 1026 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 1027 | # compute.googleapis.com/Instance |
| 1028 | "valueMatcher": { # Contains various matching options for values for a GCP resource field. # Can be set for action 'test' for advanced matching for the value of |
| 1029 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 1030 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 1031 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 1032 | # used with RE2::FullMatch |
| 1033 | }, |
| 1034 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 1035 | # field referes to array elements. This is meant to support value matching |
| 1036 | # beyond exact match. To perform exact match, use path_filters. |
| 1037 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 1038 | # must be performed. |
| 1039 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 1040 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 1041 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 1042 | # used with RE2::FullMatch |
| 1043 | }, |
| 1044 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1045 | }, |
| 1046 | ], |
| 1047 | }, |
| 1048 | ], |
| 1049 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1050 | }</pre> |
| 1051 | </div> |
| 1052 | |
| 1053 | </body></html> |