blob: f68c941c3286af9c63c658a913979f3c40d3532a [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="recommender_v1beta1.html">Recommender API</a> . <a href="recommender_v1beta1.projects.html">projects</a> . <a href="recommender_v1beta1.projects.locations.html">locations</a> . <a href="recommender_v1beta1.projects.locations.recommenders.html">recommenders</a> . <a href="recommender_v1beta1.projects.locations.recommenders.recommendations.html">recommendations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
79<p class="firstline">Gets the requested recommendation. Requires the recommender.*.get</p>
80<p class="toc_element">
81 <code><a href="#list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Lists recommendations for a Cloud project. Requires the recommender.*.list</p>
83<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#markClaimed">markClaimed(name, body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Marks the Recommendation State as Claimed. Users can use this method to</p>
89<p class="toc_element">
90 <code><a href="#markFailed">markFailed(name, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Marks the Recommendation State as Failed. Users can use this method to</p>
92<p class="toc_element">
93 <code><a href="#markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Marks the Recommendation State as Succeeded. Users can use this method to</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="get">get(name, x__xgafv=None)</code>
98 <pre>Gets the requested recommendation. Requires the recommender.*.get
99IAM permission for the specified recommender.
100
101Args:
102 name: string, Required. Name of the recommendation. (required)
103 x__xgafv: string, V1 error format.
104 Allowed values
105 1 - v1 error format
106 2 - v2 error format
107
108Returns:
109 An object of the form:
110
111 { # A recommendation along with a suggested action. E.g., a rightsizing
112 # recommendation for an underutilized VM, IAM role recommendations, etc
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700113 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
114 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
115 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
116 &quot;a_key&quot;: &quot;A String&quot;,
117 },
118 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
120 { # Reference to an associated insight.
121 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g.
122 # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
123 },
124 ],
125 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
126 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way
127 # that, all operations within one group are expected to be performed
128 # atomically and in an order.
129 { # Group of operations that need to be performed atomically.
130 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group.
131 # Loosely based on RFC6902 and should be performed in the order they appear.
132 { # Contains an operation for a resource loosely based on the JSON-PATCH format
133 # with support for:
134 #
135 # * Custom filters for describing partial array patch.
136 # * Extended path values for describing nested arrays.
137 # * Custom fields for describing the resource for which the operation is being
138 # described.
139 # * Allows extension to custom operations not natively supported by RFC6902.
140 # See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700141 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated.
142 # ex: //cloudresourcemanager.googleapis.com/projects/foo.
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated.
144 # Example: cloudresourcemanager.googleapis.com/Project,
145 # compute.googleapis.com/Instance
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700146 &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
147 # &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
148 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the
149 # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be
150 # used with RE2::FullMatch
151 },
152 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the
153 # resource level, then path should be &quot;/&quot;. This field is always populated.
154 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;.
155 # Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set
156 # for &#x27;test&#x27; operation. An exact match must be performed.
157 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across
158 # different resources of the same type. Example: A resource clone can be
159 # done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;,
160 # source_resource = &lt;source&gt; and resource_name = &lt;target&gt;.
161 # This field is empty for all other values of `action`.
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;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;,
174 # &#x27;copy&#x27;, &#x27;test&#x27; and &#x27;custom&#x27; operations. This field is case-insensitive and
175 # always populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array
177 # elements in order to narrow down to a single unique element that is being
178 # tested/modified.
179 # This is intended to be an exact match per filter. To perform advanced
180 # matching, use path_value_matchers.
181 #
182 # * Example: {
183 # &quot;/versions/*/name&quot; : &quot;it-123&quot;
184 # &quot;/versions/*/targetSize/percent&quot;: 20
185 # }
186 # * Example: {
187 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
188 # &quot;/bindings/*/condition&quot; : null
189 # }
190 # * Example: {
191 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
192 # &quot;/bindings/*/members/*&quot; : [&quot;x@google.com&quot;, &quot;y@google.com&quot;]
193 # }
194 # When both path_filters and path_value_matchers are set, an implicit AND
195 # must be performed.
196 &quot;a_key&quot;: &quot;&quot;,
197 },
198 &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
199 # resource or source_resource, ignored if provided for other operation types.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 },
201 ],
202 },
203 ],
204 },
205 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the
206 # same recommender. Subtype is a function of content and impact, meaning a
207 # new subtype might be added when significant changes to `content` or
208 # `primary_impact.category` are introduced. See the Recommenders section
209 # to see a list of subtypes for a given Recommender.
210 #
211 # Examples:
212 # For recommender = &quot;google.iam.policy.Recommender&quot;,
213 # recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700215 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when
216 # trying to optimize for the primary category. These may be positive
217 # or negative.
218 { # Contains the impact a recommendation can have for a given category.
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
220 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
221 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
222 # units indicate cost savings and positive cost units indicate increase.
223 # See google.type.Money documentation for positive/negative units.
224 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
225 # The value must be between -999,999,999 and +999,999,999 inclusive.
226 # If `units` is positive, `nanos` must be positive or zero.
227 # If `units` is zero, `nanos` can be positive, zero, or negative.
228 # If `units` is negative, `nanos` must be negative or zero.
229 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
231 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700232 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 },
234 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700235 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 },
237 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700238 &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
239 # optimize for one category.
240 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
241 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
242 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
243 # units indicate cost savings and positive cost units indicate increase.
244 # See google.type.Money documentation for positive/negative units.
245 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
246 # The value must be between -999,999,999 and +999,999,999 inclusive.
247 # If `units` is positive, `nanos` must be positive or zero.
248 # If `units` is zero, `nanos` can be positive, zero, or negative.
249 # If `units` is negative, `nanos` must be negative or zero.
250 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
251 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
252 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
253 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
254 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700255 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700256 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700258 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when
259 # updating states.
260 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it
261 # in the first place.
262 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500
263 # characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 }</pre>
265</div>
266
267<div class="method">
268 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</code>
269 <pre>Lists recommendations for a Cloud project. Requires the recommender.*.list
270IAM permission for the specified recommender.
271
272Args:
273 parent: string, Required. The container resource on which to execute the request.
274Acceptable formats:
275
2761.
277&quot;projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]&quot;,
278
279LOCATION here refers to GCP Locations:
280https://cloud.google.com/about/locations/ (required)
281 pageSize: integer, Optional. The maximum number of results to return from this request. Non-positive
282values are ignored. If not specified, the server will determine the number
283of results to return.
284 pageToken: string, Optional. If present, retrieves the next batch of results from the preceding call to
285this method. `page_token` must be the value of `next_page_token` from the
286previous response. The values of other method parameters must be identical
287to those in the previous call.
288 filter: string, Filter expression to restrict the recommendations returned. Supported
289filter fields: state_info.state
290Eg: `state_info.state:&quot;DISMISSED&quot; or state_info.state:&quot;FAILED&quot;
291 x__xgafv: string, V1 error format.
292 Allowed values
293 1 - v1 error format
294 2 - v2 error format
295
296Returns:
297 An object of the form:
298
299 { # Response to the `ListRecommendations` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 &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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700303 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
304 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
305 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
306 &quot;a_key&quot;: &quot;A String&quot;,
307 },
308 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
310 { # Reference to an associated insight.
311 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g.
312 # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
313 },
314 ],
315 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
316 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way
317 # that, all operations within one group are expected to be performed
318 # atomically and in an order.
319 { # Group of operations that need to be performed atomically.
320 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group.
321 # Loosely based on RFC6902 and should be performed in the order they appear.
322 { # Contains an operation for a resource loosely based on the JSON-PATCH format
323 # with support for:
324 #
325 # * Custom filters for describing partial array patch.
326 # * Extended path values for describing nested arrays.
327 # * Custom fields for describing the resource for which the operation is being
328 # described.
329 # * Allows extension to custom operations not natively supported by RFC6902.
330 # See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700331 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated.
332 # ex: //cloudresourcemanager.googleapis.com/projects/foo.
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated.
334 # Example: cloudresourcemanager.googleapis.com/Project,
335 # compute.googleapis.com/Instance
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700336 &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
337 # &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
338 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the
339 # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be
340 # used with RE2::FullMatch
341 },
342 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the
343 # resource level, then path should be &quot;/&quot;. This field is always populated.
344 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;.
345 # Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set
346 # for &#x27;test&#x27; operation. An exact match must be performed.
347 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across
348 # different resources of the same type. Example: A resource clone can be
349 # done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;,
350 # source_resource = &lt;source&gt; and resource_name = &lt;target&gt;.
351 # This field is empty for all other values of `action`.
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;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;,
364 # &#x27;copy&#x27;, &#x27;test&#x27; and &#x27;custom&#x27; operations. This field is case-insensitive and
365 # always populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array
367 # elements in order to narrow down to a single unique element that is being
368 # tested/modified.
369 # This is intended to be an exact match per filter. To perform advanced
370 # matching, use path_value_matchers.
371 #
372 # * Example: {
373 # &quot;/versions/*/name&quot; : &quot;it-123&quot;
374 # &quot;/versions/*/targetSize/percent&quot;: 20
375 # }
376 # * Example: {
377 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
378 # &quot;/bindings/*/condition&quot; : null
379 # }
380 # * Example: {
381 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
382 # &quot;/bindings/*/members/*&quot; : [&quot;x@google.com&quot;, &quot;y@google.com&quot;]
383 # }
384 # When both path_filters and path_value_matchers are set, an implicit AND
385 # must be performed.
386 &quot;a_key&quot;: &quot;&quot;,
387 },
388 &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
389 # resource or source_resource, ignored if provided for other operation types.
Bu Sun Kim65020912020-05-20 12:08:20 -0700390 },
391 ],
392 },
393 ],
394 },
395 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the
396 # same recommender. Subtype is a function of content and impact, meaning a
397 # new subtype might be added when significant changes to `content` or
398 # `primary_impact.category` are introduced. See the Recommenders section
399 # to see a list of subtypes for a given Recommender.
400 #
401 # Examples:
402 # For recommender = &quot;google.iam.policy.Recommender&quot;,
403 # recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700405 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when
406 # trying to optimize for the primary category. These may be positive
407 # or negative.
408 { # Contains the impact a recommendation can have for a given category.
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
410 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
411 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
412 # units indicate cost savings and positive cost units indicate increase.
413 # See google.type.Money documentation for positive/negative units.
414 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
415 # The value must be between -999,999,999 and +999,999,999 inclusive.
416 # If `units` is positive, `nanos` must be positive or zero.
417 # If `units` is zero, `nanos` can be positive, zero, or negative.
418 # If `units` is negative, `nanos` must be negative or zero.
419 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
421 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700422 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 },
424 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700425 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 },
427 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700428 &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
429 # optimize for one category.
430 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
431 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
432 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
433 # units indicate cost savings and positive cost units indicate increase.
434 # See google.type.Money documentation for positive/negative units.
435 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
436 # The value must be between -999,999,999 and +999,999,999 inclusive.
437 # If `units` is positive, `nanos` must be positive or zero.
438 # If `units` is zero, `nanos` can be positive, zero, or negative.
439 # If `units` is negative, `nanos` must be negative or zero.
440 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
441 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
442 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
443 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
444 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700445 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700446 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700448 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when
449 # updating states.
450 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it
451 # in the first place.
452 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500
453 # characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 },
455 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700456 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 }</pre>
459</div>
460
461<div class="method">
462 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
463 <pre>Retrieves the next page of results.
464
465Args:
466 previous_request: The request for the previous page. (required)
467 previous_response: The response from the request for the previous page. (required)
468
469Returns:
470 A request object that you can call &#x27;execute()&#x27; on to request the next
471 page. Returns None if there are no more items in the collection.
472 </pre>
473</div>
474
475<div class="method">
476 <code class="details" id="markClaimed">markClaimed(name, body=None, x__xgafv=None)</code>
477 <pre>Marks the Recommendation State as Claimed. Users can use this method to
478indicate to the Recommender API that they are starting to apply the
479recommendation themselves. This stops the recommendation content from being
480updated. Associated insights are frozen and placed in the ACCEPTED state.
481
482MarkRecommendationClaimed can be applied to recommendations in CLAIMED or
483ACTIVE state.
484
485Requires the recommender.*.update IAM permission for the specified
486recommender.
487
488Args:
489 name: string, Required. Name of the recommendation. (required)
490 body: object, The request body.
491 The object takes the form of:
492
493{ # Request for the `MarkRecommendationClaimed` Method.
494 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
495 &quot;stateMetadata&quot;: { # State properties to include with this state. Overwrites any existing
496 # `state_metadata`.
497 # Keys must match the regex /^a-z0-9{0,62}$/.
498 # Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
499 &quot;a_key&quot;: &quot;A String&quot;,
500 },
501 }
502
503 x__xgafv: string, V1 error format.
504 Allowed values
505 1 - v1 error format
506 2 - v2 error format
507
508Returns:
509 An object of the form:
510
511 { # A recommendation along with a suggested action. E.g., a rightsizing
512 # recommendation for an underutilized VM, IAM role recommendations, etc
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700513 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
514 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
515 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
516 &quot;a_key&quot;: &quot;A String&quot;,
517 },
518 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
520 { # Reference to an associated insight.
521 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g.
522 # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
523 },
524 ],
525 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
526 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way
527 # that, all operations within one group are expected to be performed
528 # atomically and in an order.
529 { # Group of operations that need to be performed atomically.
530 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group.
531 # Loosely based on RFC6902 and should be performed in the order they appear.
532 { # Contains an operation for a resource loosely based on the JSON-PATCH format
533 # with support for:
534 #
535 # * Custom filters for describing partial array patch.
536 # * Extended path values for describing nested arrays.
537 # * Custom fields for describing the resource for which the operation is being
538 # described.
539 # * Allows extension to custom operations not natively supported by RFC6902.
540 # See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700541 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated.
542 # ex: //cloudresourcemanager.googleapis.com/projects/foo.
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated.
544 # Example: cloudresourcemanager.googleapis.com/Project,
545 # compute.googleapis.com/Instance
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700546 &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
547 # &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
548 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the
549 # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be
550 # used with RE2::FullMatch
551 },
552 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the
553 # resource level, then path should be &quot;/&quot;. This field is always populated.
554 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;.
555 # Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set
556 # for &#x27;test&#x27; operation. An exact match must be performed.
557 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across
558 # different resources of the same type. Example: A resource clone can be
559 # done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;,
560 # source_resource = &lt;source&gt; and resource_name = &lt;target&gt;.
561 # This field is empty for all other values of `action`.
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;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;,
574 # &#x27;copy&#x27;, &#x27;test&#x27; and &#x27;custom&#x27; operations. This field is case-insensitive and
575 # always populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array
577 # elements in order to narrow down to a single unique element that is being
578 # tested/modified.
579 # This is intended to be an exact match per filter. To perform advanced
580 # matching, use path_value_matchers.
581 #
582 # * Example: {
583 # &quot;/versions/*/name&quot; : &quot;it-123&quot;
584 # &quot;/versions/*/targetSize/percent&quot;: 20
585 # }
586 # * Example: {
587 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
588 # &quot;/bindings/*/condition&quot; : null
589 # }
590 # * Example: {
591 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
592 # &quot;/bindings/*/members/*&quot; : [&quot;x@google.com&quot;, &quot;y@google.com&quot;]
593 # }
594 # When both path_filters and path_value_matchers are set, an implicit AND
595 # must be performed.
596 &quot;a_key&quot;: &quot;&quot;,
597 },
598 &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
599 # resource or source_resource, ignored if provided for other operation types.
Bu Sun Kim65020912020-05-20 12:08:20 -0700600 },
601 ],
602 },
603 ],
604 },
605 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the
606 # same recommender. Subtype is a function of content and impact, meaning a
607 # new subtype might be added when significant changes to `content` or
608 # `primary_impact.category` are introduced. See the Recommenders section
609 # to see a list of subtypes for a given Recommender.
610 #
611 # Examples:
612 # For recommender = &quot;google.iam.policy.Recommender&quot;,
613 # recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when
616 # trying to optimize for the primary category. These may be positive
617 # or negative.
618 { # Contains the impact a recommendation can have for a given category.
Bu Sun Kim65020912020-05-20 12:08:20 -0700619 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
620 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
621 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
622 # units indicate cost savings and positive cost units indicate increase.
623 # See google.type.Money documentation for positive/negative units.
624 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
625 # The value must be between -999,999,999 and +999,999,999 inclusive.
626 # If `units` is positive, `nanos` must be positive or zero.
627 # If `units` is zero, `nanos` can be positive, zero, or negative.
628 # If `units` is negative, `nanos` must be negative or zero.
629 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
631 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700632 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 },
634 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700635 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 },
637 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700638 &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
639 # optimize for one category.
640 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
641 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
642 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
643 # units indicate cost savings and positive cost units indicate increase.
644 # See google.type.Money documentation for positive/negative units.
645 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
646 # The value must be between -999,999,999 and +999,999,999 inclusive.
647 # If `units` is positive, `nanos` must be positive or zero.
648 # If `units` is zero, `nanos` can be positive, zero, or negative.
649 # If `units` is negative, `nanos` must be negative or zero.
650 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
651 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
652 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
653 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
654 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700656 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700658 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when
659 # updating states.
660 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it
661 # in the first place.
662 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500
663 # characters.
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.
687 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
688 &quot;stateMetadata&quot;: { # State properties to include with this state. Overwrites any existing
689 # `state_metadata`.
690 # Keys must match the regex /^a-z0-9{0,62}$/.
691 # Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
692 &quot;a_key&quot;: &quot;A String&quot;,
693 },
694 }
695
696 x__xgafv: string, V1 error format.
697 Allowed values
698 1 - v1 error format
699 2 - v2 error format
700
701Returns:
702 An object of the form:
703
704 { # A recommendation along with a suggested action. E.g., a rightsizing
705 # recommendation for an underutilized VM, IAM role recommendations, etc
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700706 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
707 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
708 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
709 &quot;a_key&quot;: &quot;A String&quot;,
710 },
711 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
713 { # Reference to an associated insight.
714 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g.
715 # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
716 },
717 ],
718 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
719 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way
720 # that, all operations within one group are expected to be performed
721 # atomically and in an order.
722 { # Group of operations that need to be performed atomically.
723 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group.
724 # Loosely based on RFC6902 and should be performed in the order they appear.
725 { # Contains an operation for a resource loosely based on the JSON-PATCH format
726 # with support for:
727 #
728 # * Custom filters for describing partial array patch.
729 # * Extended path values for describing nested arrays.
730 # * Custom fields for describing the resource for which the operation is being
731 # described.
732 # * Allows extension to custom operations not natively supported by RFC6902.
733 # See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700734 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated.
735 # ex: //cloudresourcemanager.googleapis.com/projects/foo.
Bu Sun Kim65020912020-05-20 12:08:20 -0700736 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated.
737 # Example: cloudresourcemanager.googleapis.com/Project,
738 # compute.googleapis.com/Instance
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700739 &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
740 # &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
741 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the
742 # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be
743 # used with RE2::FullMatch
744 },
745 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the
746 # resource level, then path should be &quot;/&quot;. This field is always populated.
747 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;.
748 # Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set
749 # for &#x27;test&#x27; operation. An exact match must be performed.
750 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across
751 # different resources of the same type. Example: A resource clone can be
752 # done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;,
753 # source_resource = &lt;source&gt; and resource_name = &lt;target&gt;.
754 # This field is empty for all other values of `action`.
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;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;,
767 # &#x27;copy&#x27;, &#x27;test&#x27; and &#x27;custom&#x27; operations. This field is case-insensitive and
768 # always populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array
770 # elements in order to narrow down to a single unique element that is being
771 # tested/modified.
772 # This is intended to be an exact match per filter. To perform advanced
773 # matching, use path_value_matchers.
774 #
775 # * Example: {
776 # &quot;/versions/*/name&quot; : &quot;it-123&quot;
777 # &quot;/versions/*/targetSize/percent&quot;: 20
778 # }
779 # * Example: {
780 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
781 # &quot;/bindings/*/condition&quot; : null
782 # }
783 # * Example: {
784 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
785 # &quot;/bindings/*/members/*&quot; : [&quot;x@google.com&quot;, &quot;y@google.com&quot;]
786 # }
787 # When both path_filters and path_value_matchers are set, an implicit AND
788 # must be performed.
789 &quot;a_key&quot;: &quot;&quot;,
790 },
791 &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
792 # resource or source_resource, ignored if provided for other operation types.
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 },
794 ],
795 },
796 ],
797 },
798 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the
799 # same recommender. Subtype is a function of content and impact, meaning a
800 # new subtype might be added when significant changes to `content` or
801 # `primary_impact.category` are introduced. See the Recommenders section
802 # to see a list of subtypes for a given Recommender.
803 #
804 # Examples:
805 # For recommender = &quot;google.iam.policy.Recommender&quot;,
806 # recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700807 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700808 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when
809 # trying to optimize for the primary category. These may be positive
810 # or negative.
811 { # Contains the impact a recommendation can have for a given category.
Bu Sun Kim65020912020-05-20 12:08:20 -0700812 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
813 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
814 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
815 # units indicate cost savings and positive cost units indicate increase.
816 # See google.type.Money documentation for positive/negative units.
817 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
818 # The value must be between -999,999,999 and +999,999,999 inclusive.
819 # If `units` is positive, `nanos` must be positive or zero.
820 # If `units` is zero, `nanos` can be positive, zero, or negative.
821 # If `units` is negative, `nanos` must be negative or zero.
822 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Bu Sun Kim65020912020-05-20 12:08:20 -0700823 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
824 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700825 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -0700826 },
827 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700828 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 },
830 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700831 &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
832 # optimize for one category.
833 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
834 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
835 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
836 # units indicate cost savings and positive cost units indicate increase.
837 # See google.type.Money documentation for positive/negative units.
838 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
839 # The value must be between -999,999,999 and +999,999,999 inclusive.
840 # If `units` is positive, `nanos` must be positive or zero.
841 # If `units` is zero, `nanos` can be positive, zero, or negative.
842 # If `units` is negative, `nanos` must be negative or zero.
843 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
844 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
845 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
846 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
847 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700849 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700851 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when
852 # updating states.
853 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it
854 # in the first place.
855 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500
856 # characters.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700899 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
900 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
901 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
902 &quot;a_key&quot;: &quot;A String&quot;,
903 },
904 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
906 { # Reference to an associated insight.
907 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g.
908 # projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
909 },
910 ],
911 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
912 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way
913 # that, all operations within one group are expected to be performed
914 # atomically and in an order.
915 { # Group of operations that need to be performed atomically.
916 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group.
917 # Loosely based on RFC6902 and should be performed in the order they appear.
918 { # Contains an operation for a resource loosely based on the JSON-PATCH format
919 # with support for:
920 #
921 # * Custom filters for describing partial array patch.
922 # * Extended path values for describing nested arrays.
923 # * Custom fields for describing the resource for which the operation is being
924 # described.
925 # * Allows extension to custom operations not natively supported by RFC6902.
926 # See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700927 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated.
928 # ex: //cloudresourcemanager.googleapis.com/projects/foo.
Bu Sun Kim65020912020-05-20 12:08:20 -0700929 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated.
930 # Example: cloudresourcemanager.googleapis.com/Project,
931 # compute.googleapis.com/Instance
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700932 &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
933 # &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
934 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the
935 # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be
936 # used with RE2::FullMatch
937 },
938 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the
939 # resource level, then path should be &quot;/&quot;. This field is always populated.
940 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;.
941 # Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set
942 # for &#x27;test&#x27; operation. An exact match must be performed.
943 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across
944 # different resources of the same type. Example: A resource clone can be
945 # done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;,
946 # source_resource = &lt;source&gt; and resource_name = &lt;target&gt;.
947 # This field is empty for all other values of `action`.
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;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;,
960 # &#x27;copy&#x27;, &#x27;test&#x27; and &#x27;custom&#x27; operations. This field is case-insensitive and
961 # always populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700962 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array
963 # elements in order to narrow down to a single unique element that is being
964 # tested/modified.
965 # This is intended to be an exact match per filter. To perform advanced
966 # matching, use path_value_matchers.
967 #
968 # * Example: {
969 # &quot;/versions/*/name&quot; : &quot;it-123&quot;
970 # &quot;/versions/*/targetSize/percent&quot;: 20
971 # }
972 # * Example: {
973 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
974 # &quot;/bindings/*/condition&quot; : null
975 # }
976 # * Example: {
977 # &quot;/bindings/*/role&quot;: &quot;roles/admin&quot;
978 # &quot;/bindings/*/members/*&quot; : [&quot;x@google.com&quot;, &quot;y@google.com&quot;]
979 # }
980 # When both path_filters and path_value_matchers are set, an implicit AND
981 # must be performed.
982 &quot;a_key&quot;: &quot;&quot;,
983 },
984 &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
985 # resource or source_resource, ignored if provided for other operation types.
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 },
987 ],
988 },
989 ],
990 },
991 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the
992 # same recommender. Subtype is a function of content and impact, meaning a
993 # new subtype might be added when significant changes to `content` or
994 # `primary_impact.category` are introduced. See the Recommenders section
995 # to see a list of subtypes for a given Recommender.
996 #
997 # Examples:
998 # For recommender = &quot;google.iam.policy.Recommender&quot;,
999 # recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001001 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when
1002 # trying to optimize for the primary category. These may be positive
1003 # or negative.
1004 { # Contains the impact a recommendation can have for a given category.
Bu Sun Kim65020912020-05-20 12:08:20 -07001005 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
1006 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
1007 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
1008 # units indicate cost savings and positive cost units indicate increase.
1009 # See google.type.Money documentation for positive/negative units.
1010 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
1011 # The value must be between -999,999,999 and +999,999,999 inclusive.
1012 # If `units` is positive, `nanos` must be positive or zero.
1013 # If `units` is zero, `nanos` can be positive, zero, or negative.
1014 # If `units` is negative, `nanos` must be negative or zero.
1015 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
1017 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001018 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
Bu Sun Kim65020912020-05-20 12:08:20 -07001019 },
1020 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001021 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 },
1023 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001024 &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
1025 # optimize for one category.
1026 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
1027 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
1028 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost
1029 # units indicate cost savings and positive cost units indicate increase.
1030 # See google.type.Money documentation for positive/negative units.
1031 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount.
1032 # The value must be between -999,999,999 and +999,999,999 inclusive.
1033 # If `units` is positive, `nanos` must be positive or zero.
1034 # If `units` is zero, `nanos` can be positive, zero, or negative.
1035 # If `units` is negative, `nanos` must be negative or zero.
1036 # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1037 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount.
1038 # For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
1039 &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in ISO 4217.
1040 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001042 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001043 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001044 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when
1045 # updating states.
1046 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it
1047 # in the first place.
1048 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500
1049 # characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 }</pre>
1051</div>
1052
1053</body></html>