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"> |
| 81 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</a></code></p> |
| 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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 113 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 114 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 115 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 116 | "a_key": "A String", |
| 117 | }, |
| 118 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 119 | "associatedInsights": [ # Insights that led to this recommendation. |
| 120 | { # Reference to an associated insight. |
| 121 | "insight": "A String", # Insight resource name, e.g. |
| 122 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 123 | }, |
| 124 | ], |
| 125 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 126 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 127 | # that, all operations within one group are expected to be performed |
| 128 | # atomically and in an order. |
| 129 | { # Group of operations that need to be performed atomically. |
| 130 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 131 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 132 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 133 | # with support for: |
| 134 | # |
| 135 | # * Custom filters for describing partial array patch. |
| 136 | # * Extended path values for describing nested arrays. |
| 137 | # * Custom fields for describing the resource for which the operation is being |
| 138 | # described. |
| 139 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 140 | # 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^] | 141 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 142 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 143 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 144 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 145 | # compute.googleapis.com/Instance |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 146 | "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 |
| 147 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 148 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 149 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 150 | # used with RE2::FullMatch |
| 151 | }, |
| 152 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 153 | # resource level, then path should be "/". This field is always populated. |
| 154 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 155 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 156 | # for 'test' operation. An exact match must be performed. |
| 157 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 158 | # different resources of the same type. Example: A resource clone can be |
| 159 | # done via action = 'copy', path = "/", from = "/", |
| 160 | # source_resource = <source> and resource_name = <target>. |
| 161 | # This field is empty for all other values of `action`. |
| 162 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 163 | # field referes to array elements. This is meant to support value matching |
| 164 | # beyond exact match. To perform exact match, use path_filters. |
| 165 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 166 | # must be performed. |
| 167 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 168 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 169 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 170 | # used with RE2::FullMatch |
| 171 | }, |
| 172 | }, |
| 173 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 174 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 175 | # always populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 176 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 177 | # elements in order to narrow down to a single unique element that is being |
| 178 | # tested/modified. |
| 179 | # This is intended to be an exact match per filter. To perform advanced |
| 180 | # matching, use path_value_matchers. |
| 181 | # |
| 182 | # * Example: { |
| 183 | # "/versions/*/name" : "it-123" |
| 184 | # "/versions/*/targetSize/percent": 20 |
| 185 | # } |
| 186 | # * Example: { |
| 187 | # "/bindings/*/role": "roles/admin" |
| 188 | # "/bindings/*/condition" : null |
| 189 | # } |
| 190 | # * Example: { |
| 191 | # "/bindings/*/role": "roles/admin" |
| 192 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 193 | # } |
| 194 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 195 | # must be performed. |
| 196 | "a_key": "", |
| 197 | }, |
| 198 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 199 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 200 | }, |
| 201 | ], |
| 202 | }, |
| 203 | ], |
| 204 | }, |
| 205 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 206 | # same recommender. Subtype is a function of content and impact, meaning a |
| 207 | # new subtype might be added when significant changes to `content` or |
| 208 | # `primary_impact.category` are introduced. See the Recommenders section |
| 209 | # to see a list of subtypes for a given Recommender. |
| 210 | # |
| 211 | # Examples: |
| 212 | # For recommender = "google.iam.policy.Recommender", |
| 213 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 214 | "name": "A String", # Name of recommendation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 215 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 216 | # trying to optimize for the primary category. These may be positive |
| 217 | # or negative. |
| 218 | { # Contains the impact a recommendation can have for a given category. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 219 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 220 | "duration": "A String", # Duration for which this cost applies. |
| 221 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 222 | # units indicate cost savings and positive cost units indicate increase. |
| 223 | # See google.type.Money documentation for positive/negative units. |
| 224 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 225 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 226 | # If `units` is positive, `nanos` must be positive or zero. |
| 227 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 228 | # If `units` is negative, `nanos` must be negative or zero. |
| 229 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 230 | "units": "A String", # The whole units of the amount. |
| 231 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 232 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 233 | }, |
| 234 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 235 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 236 | }, |
| 237 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 238 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 239 | # optimize for one category. |
| 240 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 241 | "duration": "A String", # Duration for which this cost applies. |
| 242 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 243 | # units indicate cost savings and positive cost units indicate increase. |
| 244 | # See google.type.Money documentation for positive/negative units. |
| 245 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 246 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 247 | # If `units` is positive, `nanos` must be positive or zero. |
| 248 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 249 | # If `units` is negative, `nanos` must be negative or zero. |
| 250 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 251 | "units": "A String", # The whole units of the amount. |
| 252 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 253 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 254 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 255 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 256 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 257 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 258 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 259 | # updating states. |
| 260 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 261 | # in the first place. |
| 262 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 263 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 264 | }</pre> |
| 265 | </div> |
| 266 | |
| 267 | <div class="method"> |
| 268 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</code> |
| 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. |
| 284 | pageToken: string, Optional. If present, retrieves the next batch of results from the preceding call to |
| 285 | this method. `page_token` must be the value of `next_page_token` from the |
| 286 | previous response. The values of other method parameters must be identical |
| 287 | to those in the previous call. |
| 288 | filter: string, Filter expression to restrict the recommendations returned. Supported |
| 289 | filter fields: state_info.state |
| 290 | Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED" |
| 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 | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 300 | "recommendations": [ # The set of recommendations for the `parent` resource. |
| 301 | { # A recommendation along with a suggested action. E.g., a rightsizing |
| 302 | # recommendation for an underutilized VM, IAM role recommendations, etc |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 303 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 304 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 305 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 306 | "a_key": "A String", |
| 307 | }, |
| 308 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 309 | "associatedInsights": [ # Insights that led to this recommendation. |
| 310 | { # Reference to an associated insight. |
| 311 | "insight": "A String", # Insight resource name, e.g. |
| 312 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 313 | }, |
| 314 | ], |
| 315 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 316 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 317 | # that, all operations within one group are expected to be performed |
| 318 | # atomically and in an order. |
| 319 | { # Group of operations that need to be performed atomically. |
| 320 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 321 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 322 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 323 | # with support for: |
| 324 | # |
| 325 | # * Custom filters for describing partial array patch. |
| 326 | # * Extended path values for describing nested arrays. |
| 327 | # * Custom fields for describing the resource for which the operation is being |
| 328 | # described. |
| 329 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 330 | # 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^] | 331 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 332 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 333 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 334 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 335 | # compute.googleapis.com/Instance |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 336 | "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 |
| 337 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 338 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 339 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 340 | # used with RE2::FullMatch |
| 341 | }, |
| 342 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 343 | # resource level, then path should be "/". This field is always populated. |
| 344 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 345 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 346 | # for 'test' operation. An exact match must be performed. |
| 347 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 348 | # different resources of the same type. Example: A resource clone can be |
| 349 | # done via action = 'copy', path = "/", from = "/", |
| 350 | # source_resource = <source> and resource_name = <target>. |
| 351 | # This field is empty for all other values of `action`. |
| 352 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 353 | # field referes to array elements. This is meant to support value matching |
| 354 | # beyond exact match. To perform exact match, use path_filters. |
| 355 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 356 | # must be performed. |
| 357 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 358 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 359 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 360 | # used with RE2::FullMatch |
| 361 | }, |
| 362 | }, |
| 363 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 364 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 365 | # always populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 366 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 367 | # elements in order to narrow down to a single unique element that is being |
| 368 | # tested/modified. |
| 369 | # This is intended to be an exact match per filter. To perform advanced |
| 370 | # matching, use path_value_matchers. |
| 371 | # |
| 372 | # * Example: { |
| 373 | # "/versions/*/name" : "it-123" |
| 374 | # "/versions/*/targetSize/percent": 20 |
| 375 | # } |
| 376 | # * Example: { |
| 377 | # "/bindings/*/role": "roles/admin" |
| 378 | # "/bindings/*/condition" : null |
| 379 | # } |
| 380 | # * Example: { |
| 381 | # "/bindings/*/role": "roles/admin" |
| 382 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 383 | # } |
| 384 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 385 | # must be performed. |
| 386 | "a_key": "", |
| 387 | }, |
| 388 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 389 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 390 | }, |
| 391 | ], |
| 392 | }, |
| 393 | ], |
| 394 | }, |
| 395 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 396 | # same recommender. Subtype is a function of content and impact, meaning a |
| 397 | # new subtype might be added when significant changes to `content` or |
| 398 | # `primary_impact.category` are introduced. See the Recommenders section |
| 399 | # to see a list of subtypes for a given Recommender. |
| 400 | # |
| 401 | # Examples: |
| 402 | # For recommender = "google.iam.policy.Recommender", |
| 403 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 404 | "name": "A String", # Name of recommendation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 405 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 406 | # trying to optimize for the primary category. These may be positive |
| 407 | # or negative. |
| 408 | { # Contains the impact a recommendation can have for a given category. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 409 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 410 | "duration": "A String", # Duration for which this cost applies. |
| 411 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 412 | # units indicate cost savings and positive cost units indicate increase. |
| 413 | # See google.type.Money documentation for positive/negative units. |
| 414 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 415 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 416 | # If `units` is positive, `nanos` must be positive or zero. |
| 417 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 418 | # If `units` is negative, `nanos` must be negative or zero. |
| 419 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 420 | "units": "A String", # The whole units of the amount. |
| 421 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 422 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 423 | }, |
| 424 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 425 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 426 | }, |
| 427 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 428 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 429 | # optimize for one category. |
| 430 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 431 | "duration": "A String", # Duration for which this cost applies. |
| 432 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 433 | # units indicate cost savings and positive cost units indicate increase. |
| 434 | # See google.type.Money documentation for positive/negative units. |
| 435 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 436 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 437 | # If `units` is positive, `nanos` must be positive or zero. |
| 438 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 439 | # If `units` is negative, `nanos` must be negative or zero. |
| 440 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 441 | "units": "A String", # The whole units of the amount. |
| 442 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 443 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 444 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 445 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 446 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 447 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 448 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 449 | # updating states. |
| 450 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 451 | # in the first place. |
| 452 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 453 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 454 | }, |
| 455 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 456 | "nextPageToken": "A String", # A token that can be used to request the next page of results. This field is |
| 457 | # empty if there are no additional results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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. |
| 494 | "etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking. |
| 495 | "stateMetadata": { # State properties to include with this state. Overwrites any existing |
| 496 | # `state_metadata`. |
| 497 | # Keys must match the regex /^a-z0-9{0,62}$/. |
| 498 | # Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. |
| 499 | "a_key": "A String", |
| 500 | }, |
| 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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 513 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 514 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 515 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 516 | "a_key": "A String", |
| 517 | }, |
| 518 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 519 | "associatedInsights": [ # Insights that led to this recommendation. |
| 520 | { # Reference to an associated insight. |
| 521 | "insight": "A String", # Insight resource name, e.g. |
| 522 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 523 | }, |
| 524 | ], |
| 525 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 526 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 527 | # that, all operations within one group are expected to be performed |
| 528 | # atomically and in an order. |
| 529 | { # Group of operations that need to be performed atomically. |
| 530 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 531 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 532 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 533 | # with support for: |
| 534 | # |
| 535 | # * Custom filters for describing partial array patch. |
| 536 | # * Extended path values for describing nested arrays. |
| 537 | # * Custom fields for describing the resource for which the operation is being |
| 538 | # described. |
| 539 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 540 | # 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^] | 541 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 542 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 543 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 544 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 545 | # compute.googleapis.com/Instance |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 546 | "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 |
| 547 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 548 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 549 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 550 | # used with RE2::FullMatch |
| 551 | }, |
| 552 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 553 | # resource level, then path should be "/". This field is always populated. |
| 554 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 555 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 556 | # for 'test' operation. An exact match must be performed. |
| 557 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 558 | # different resources of the same type. Example: A resource clone can be |
| 559 | # done via action = 'copy', path = "/", from = "/", |
| 560 | # source_resource = <source> and resource_name = <target>. |
| 561 | # This field is empty for all other values of `action`. |
| 562 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 563 | # field referes to array elements. This is meant to support value matching |
| 564 | # beyond exact match. To perform exact match, use path_filters. |
| 565 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 566 | # must be performed. |
| 567 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 568 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 569 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 570 | # used with RE2::FullMatch |
| 571 | }, |
| 572 | }, |
| 573 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 574 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 575 | # always populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 576 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 577 | # elements in order to narrow down to a single unique element that is being |
| 578 | # tested/modified. |
| 579 | # This is intended to be an exact match per filter. To perform advanced |
| 580 | # matching, use path_value_matchers. |
| 581 | # |
| 582 | # * Example: { |
| 583 | # "/versions/*/name" : "it-123" |
| 584 | # "/versions/*/targetSize/percent": 20 |
| 585 | # } |
| 586 | # * Example: { |
| 587 | # "/bindings/*/role": "roles/admin" |
| 588 | # "/bindings/*/condition" : null |
| 589 | # } |
| 590 | # * Example: { |
| 591 | # "/bindings/*/role": "roles/admin" |
| 592 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 593 | # } |
| 594 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 595 | # must be performed. |
| 596 | "a_key": "", |
| 597 | }, |
| 598 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 599 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 600 | }, |
| 601 | ], |
| 602 | }, |
| 603 | ], |
| 604 | }, |
| 605 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 606 | # same recommender. Subtype is a function of content and impact, meaning a |
| 607 | # new subtype might be added when significant changes to `content` or |
| 608 | # `primary_impact.category` are introduced. See the Recommenders section |
| 609 | # to see a list of subtypes for a given Recommender. |
| 610 | # |
| 611 | # Examples: |
| 612 | # For recommender = "google.iam.policy.Recommender", |
| 613 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 614 | "name": "A String", # Name of recommendation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 615 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 616 | # trying to optimize for the primary category. These may be positive |
| 617 | # or negative. |
| 618 | { # Contains the impact a recommendation can have for a given category. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 619 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 620 | "duration": "A String", # Duration for which this cost applies. |
| 621 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 622 | # units indicate cost savings and positive cost units indicate increase. |
| 623 | # See google.type.Money documentation for positive/negative units. |
| 624 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 625 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 626 | # If `units` is positive, `nanos` must be positive or zero. |
| 627 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 628 | # If `units` is negative, `nanos` must be negative or zero. |
| 629 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 630 | "units": "A String", # The whole units of the amount. |
| 631 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 632 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 633 | }, |
| 634 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 635 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 636 | }, |
| 637 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 638 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 639 | # optimize for one category. |
| 640 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 641 | "duration": "A String", # Duration for which this cost applies. |
| 642 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 643 | # units indicate cost savings and positive cost units indicate increase. |
| 644 | # See google.type.Money documentation for positive/negative units. |
| 645 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 646 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 647 | # If `units` is positive, `nanos` must be positive or zero. |
| 648 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 649 | # If `units` is negative, `nanos` must be negative or zero. |
| 650 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 651 | "units": "A String", # The whole units of the amount. |
| 652 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 653 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 654 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 655 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 656 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 657 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 658 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 659 | # updating states. |
| 660 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 661 | # in the first place. |
| 662 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 663 | # characters. |
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. |
| 687 | "etag": "A String", # Required. Fingerprint of the Recommendation. Provides optimistic locking. |
| 688 | "stateMetadata": { # State properties to include with this state. Overwrites any existing |
| 689 | # `state_metadata`. |
| 690 | # Keys must match the regex /^a-z0-9{0,62}$/. |
| 691 | # Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/. |
| 692 | "a_key": "A String", |
| 693 | }, |
| 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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 706 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 707 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 708 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 709 | "a_key": "A String", |
| 710 | }, |
| 711 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 712 | "associatedInsights": [ # Insights that led to this recommendation. |
| 713 | { # Reference to an associated insight. |
| 714 | "insight": "A String", # Insight resource name, e.g. |
| 715 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 716 | }, |
| 717 | ], |
| 718 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 719 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 720 | # that, all operations within one group are expected to be performed |
| 721 | # atomically and in an order. |
| 722 | { # Group of operations that need to be performed atomically. |
| 723 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 724 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 725 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 726 | # with support for: |
| 727 | # |
| 728 | # * Custom filters for describing partial array patch. |
| 729 | # * Extended path values for describing nested arrays. |
| 730 | # * Custom fields for describing the resource for which the operation is being |
| 731 | # described. |
| 732 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 733 | # 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^] | 734 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 735 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 736 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 737 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 738 | # compute.googleapis.com/Instance |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 739 | "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 |
| 740 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 741 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 742 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 743 | # used with RE2::FullMatch |
| 744 | }, |
| 745 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 746 | # resource level, then path should be "/". This field is always populated. |
| 747 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 748 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 749 | # for 'test' operation. An exact match must be performed. |
| 750 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 751 | # different resources of the same type. Example: A resource clone can be |
| 752 | # done via action = 'copy', path = "/", from = "/", |
| 753 | # source_resource = <source> and resource_name = <target>. |
| 754 | # This field is empty for all other values of `action`. |
| 755 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 756 | # field referes to array elements. This is meant to support value matching |
| 757 | # beyond exact match. To perform exact match, use path_filters. |
| 758 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 759 | # must be performed. |
| 760 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 761 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 762 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 763 | # used with RE2::FullMatch |
| 764 | }, |
| 765 | }, |
| 766 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 767 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 768 | # always populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 769 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 770 | # elements in order to narrow down to a single unique element that is being |
| 771 | # tested/modified. |
| 772 | # This is intended to be an exact match per filter. To perform advanced |
| 773 | # matching, use path_value_matchers. |
| 774 | # |
| 775 | # * Example: { |
| 776 | # "/versions/*/name" : "it-123" |
| 777 | # "/versions/*/targetSize/percent": 20 |
| 778 | # } |
| 779 | # * Example: { |
| 780 | # "/bindings/*/role": "roles/admin" |
| 781 | # "/bindings/*/condition" : null |
| 782 | # } |
| 783 | # * Example: { |
| 784 | # "/bindings/*/role": "roles/admin" |
| 785 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 786 | # } |
| 787 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 788 | # must be performed. |
| 789 | "a_key": "", |
| 790 | }, |
| 791 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 792 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 793 | }, |
| 794 | ], |
| 795 | }, |
| 796 | ], |
| 797 | }, |
| 798 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 799 | # same recommender. Subtype is a function of content and impact, meaning a |
| 800 | # new subtype might be added when significant changes to `content` or |
| 801 | # `primary_impact.category` are introduced. See the Recommenders section |
| 802 | # to see a list of subtypes for a given Recommender. |
| 803 | # |
| 804 | # Examples: |
| 805 | # For recommender = "google.iam.policy.Recommender", |
| 806 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 807 | "name": "A String", # Name of recommendation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 808 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 809 | # trying to optimize for the primary category. These may be positive |
| 810 | # or negative. |
| 811 | { # Contains the impact a recommendation can have for a given category. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 812 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 813 | "duration": "A String", # Duration for which this cost applies. |
| 814 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 815 | # units indicate cost savings and positive cost units indicate increase. |
| 816 | # See google.type.Money documentation for positive/negative units. |
| 817 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 818 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 819 | # If `units` is positive, `nanos` must be positive or zero. |
| 820 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 821 | # If `units` is negative, `nanos` must be negative or zero. |
| 822 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 823 | "units": "A String", # The whole units of the amount. |
| 824 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 825 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 826 | }, |
| 827 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 828 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 829 | }, |
| 830 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 831 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 832 | # optimize for one category. |
| 833 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 834 | "duration": "A String", # Duration for which this cost applies. |
| 835 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 836 | # units indicate cost savings and positive cost units indicate increase. |
| 837 | # See google.type.Money documentation for positive/negative units. |
| 838 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 839 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 840 | # If `units` is positive, `nanos` must be positive or zero. |
| 841 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 842 | # If `units` is negative, `nanos` must be negative or zero. |
| 843 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 844 | "units": "A String", # The whole units of the amount. |
| 845 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 846 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 847 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 848 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 849 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 850 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 851 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 852 | # updating states. |
| 853 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 854 | # in the first place. |
| 855 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 856 | # characters. |
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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 899 | "stateInfo": { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata. |
| 900 | "state": "A String", # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. |
| 901 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 902 | "a_key": "A String", |
| 903 | }, |
| 904 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 905 | "associatedInsights": [ # Insights that led to this recommendation. |
| 906 | { # Reference to an associated insight. |
| 907 | "insight": "A String", # Insight resource name, e.g. |
| 908 | # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] |
| 909 | }, |
| 910 | ], |
| 911 | "content": { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources. |
| 912 | "operationGroups": [ # Operations to one or more Google Cloud resources grouped in such a way |
| 913 | # that, all operations within one group are expected to be performed |
| 914 | # atomically and in an order. |
| 915 | { # Group of operations that need to be performed atomically. |
| 916 | "operations": [ # List of operations across one or more resources that belong to this group. |
| 917 | # Loosely based on RFC6902 and should be performed in the order they appear. |
| 918 | { # Contains an operation for a resource loosely based on the JSON-PATCH format |
| 919 | # with support for: |
| 920 | # |
| 921 | # * Custom filters for describing partial array patch. |
| 922 | # * Extended path values for describing nested arrays. |
| 923 | # * Custom fields for describing the resource for which the operation is being |
| 924 | # described. |
| 925 | # * Allows extension to custom operations not natively supported by RFC6902. |
| 926 | # 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^] | 927 | "resource": "A String", # Contains the fully qualified resource name. This field is always populated. |
| 928 | # ex: //cloudresourcemanager.googleapis.com/projects/foo. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 929 | "resourceType": "A String", # Type of GCP resource being modified/tested. This field is always populated. |
| 930 | # Example: cloudresourcemanager.googleapis.com/Project, |
| 931 | # compute.googleapis.com/Instance |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 932 | "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 |
| 933 | # 'path' field. Either this or `value` will be set for 'test' operation. |
| 934 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 935 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 936 | # used with RE2::FullMatch |
| 937 | }, |
| 938 | "path": "A String", # Path to the target field being operated on. If the operation is at the |
| 939 | # resource level, then path should be "/". This field is always populated. |
| 940 | "value": "", # Value for the `path` field. Will be set for actions:'add'/'replace'. |
| 941 | # Maybe set for action: 'test'. Either this or `value_matcher` will be set |
| 942 | # for 'test' operation. An exact match must be performed. |
| 943 | "sourceResource": "A String", # Can be set with action 'copy' to copy resource configuration across |
| 944 | # different resources of the same type. Example: A resource clone can be |
| 945 | # done via action = 'copy', path = "/", from = "/", |
| 946 | # source_resource = <source> and resource_name = <target>. |
| 947 | # This field is empty for all other values of `action`. |
| 948 | "pathValueMatchers": { # Similar to path_filters, this contains set of filters to apply if `path` |
| 949 | # field referes to array elements. This is meant to support value matching |
| 950 | # beyond exact match. To perform exact match, use path_filters. |
| 951 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 952 | # must be performed. |
| 953 | "a_key": { # Contains various matching options for values for a GCP resource field. |
| 954 | "matchesPattern": "A String", # To be used for full regex matching. The regular expression is using the |
| 955 | # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be |
| 956 | # used with RE2::FullMatch |
| 957 | }, |
| 958 | }, |
| 959 | "action": "A String", # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', |
| 960 | # 'copy', 'test' and 'custom' operations. This field is case-insensitive and |
| 961 | # always populated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 962 | "pathFilters": { # Set of filters to apply if `path` refers to array elements or nested array |
| 963 | # elements in order to narrow down to a single unique element that is being |
| 964 | # tested/modified. |
| 965 | # This is intended to be an exact match per filter. To perform advanced |
| 966 | # matching, use path_value_matchers. |
| 967 | # |
| 968 | # * Example: { |
| 969 | # "/versions/*/name" : "it-123" |
| 970 | # "/versions/*/targetSize/percent": 20 |
| 971 | # } |
| 972 | # * Example: { |
| 973 | # "/bindings/*/role": "roles/admin" |
| 974 | # "/bindings/*/condition" : null |
| 975 | # } |
| 976 | # * Example: { |
| 977 | # "/bindings/*/role": "roles/admin" |
| 978 | # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] |
| 979 | # } |
| 980 | # When both path_filters and path_value_matchers are set, an implicit AND |
| 981 | # must be performed. |
| 982 | "a_key": "", |
| 983 | }, |
| 984 | "sourcePath": "A String", # Can be set with action 'copy' or 'move' to indicate the source field within |
| 985 | # resource or source_resource, ignored if provided for other operation types. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 986 | }, |
| 987 | ], |
| 988 | }, |
| 989 | ], |
| 990 | }, |
| 991 | "recommenderSubtype": "A String", # Contains an identifier for a subtype of recommendations produced for the |
| 992 | # same recommender. Subtype is a function of content and impact, meaning a |
| 993 | # new subtype might be added when significant changes to `content` or |
| 994 | # `primary_impact.category` are introduced. See the Recommenders section |
| 995 | # to see a list of subtypes for a given Recommender. |
| 996 | # |
| 997 | # Examples: |
| 998 | # For recommender = "google.iam.policy.Recommender", |
| 999 | # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1000 | "name": "A String", # Name of recommendation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1001 | "additionalImpact": [ # Optional set of additional impact that this recommendation may have when |
| 1002 | # trying to optimize for the primary category. These may be positive |
| 1003 | # or negative. |
| 1004 | { # Contains the impact a recommendation can have for a given category. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1005 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 1006 | "duration": "A String", # Duration for which this cost applies. |
| 1007 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 1008 | # units indicate cost savings and positive cost units indicate increase. |
| 1009 | # See google.type.Money documentation for positive/negative units. |
| 1010 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 1011 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1012 | # If `units` is positive, `nanos` must be positive or zero. |
| 1013 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1014 | # If `units` is negative, `nanos` must be negative or zero. |
| 1015 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1016 | "units": "A String", # The whole units of the amount. |
| 1017 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1018 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1019 | }, |
| 1020 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1021 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1022 | }, |
| 1023 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1024 | "primaryImpact": { # Contains the impact a recommendation can have for a given category. # The primary impact that this recommendation can have while trying to |
| 1025 | # optimize for one category. |
| 1026 | "costProjection": { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST |
| 1027 | "duration": "A String", # Duration for which this cost applies. |
| 1028 | "cost": { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost |
| 1029 | # units indicate cost savings and positive cost units indicate increase. |
| 1030 | # See google.type.Money documentation for positive/negative units. |
| 1031 | "nanos": 42, # Number of nano (10^-9) units of the amount. |
| 1032 | # The value must be between -999,999,999 and +999,999,999 inclusive. |
| 1033 | # If `units` is positive, `nanos` must be positive or zero. |
| 1034 | # If `units` is zero, `nanos` can be positive, zero, or negative. |
| 1035 | # If `units` is negative, `nanos` must be negative or zero. |
| 1036 | # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 1037 | "units": "A String", # The whole units of the amount. |
| 1038 | # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| 1039 | "currencyCode": "A String", # The 3-letter currency code defined in ISO 4217. |
| 1040 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1041 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1042 | "category": "A String", # Category that is being targeted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1043 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1044 | "etag": "A String", # Fingerprint of the Recommendation. Provides optimistic locking when |
| 1045 | # updating states. |
| 1046 | "lastRefreshTime": "A String", # Last time this recommendation was refreshed by the system that created it |
| 1047 | # in the first place. |
| 1048 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 |
| 1049 | # characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1050 | }</pre> |
| 1051 | </div> |
| 1052 | |
| 1053 | </body></html> |