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