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