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