blob: f73f8ce1640d8e4f0a58bf138be547dea8d2cbae [file] [log] [blame]
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="recommender_v1.html">Recommender API</a> . <a href="recommender_v1.projects.html">projects</a> . <a href="recommender_v1.projects.locations.html">locations</a> . <a href="recommender_v1.projects.locations.recommenders.html">recommenders</a> . <a href="recommender_v1.projects.locations.recommenders.recommendations.html">recommendations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070080<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070081 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.</p>
83<p class="toc_element">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -080084 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Lists recommendations for a Cloud project. Requires the recommender.*.list IAM permission for the specified recommender.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070086<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
90 <code><a href="#markClaimed">markClaimed(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070092<p class="toc_element">
93 <code><a href="#markFailed">markFailed(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070095<p class="toc_element">
96 <code><a href="#markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.</p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070098<h3>Method Details</h3>
99<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700105 <code class="details" id="get">get(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <pre>Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700107
108Args:
109 name: string, Required. Name of the recommendation. (required)
110 x__xgafv: string, V1 error format.
111 Allowed values
112 1 - v1 error format
113 2 - v2 error format
114
115Returns:
116 An object of the form:
117
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800119 &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 optimize for one category.
120 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
121 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800122 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800123 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800124 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800125 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
126 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700127 },
128 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800129 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800130 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
131 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
132 { # Group of operations that need to be performed atomically.
133 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
134 { # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800135 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field referes to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
136 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
137 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
138 },
139 },
140 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: { &quot;/versions/*/name&quot; : &quot;it-123&quot; &quot;/versions/*/targetSize/percent&quot;: 20 } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/condition&quot; : null } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/members/*&quot; : [&quot;x@example.com&quot;, &quot;y@example.com&quot;] } When both path_filters and path_value_matchers are set, an implicit AND must be performed.
141 &quot;a_key&quot;: &quot;&quot;,
142 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800143 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
144 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
145 &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 &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
146 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
147 },
148 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the resource level, then path should be &quot;/&quot;. This field is always populated.
149 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;. Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set for &#x27;test&#x27; operation. An exact match must be performed.
150 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;, source_resource = and resource_name = . This field is empty for all other values of `action`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800151 &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 resource or source_resource, ignored if provided for other operation types.
152 &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;, &#x27;copy&#x27;, &#x27;test&#x27; and custom operations. This field is case-insensitive and always populated.
153 },
154 ],
155 },
156 ],
157 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800158 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
159 { # Reference to an associated insight.
160 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
161 },
162 ],
163 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
164 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
165 &quot;a_key&quot;: &quot;A String&quot;,
166 },
167 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
168 },
169 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
170 { # Contains the impact a recommendation can have for a given category.
171 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
172 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
173 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
174 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
175 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
176 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
177 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
178 },
179 },
180 },
181 ],
182 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = &quot;google.iam.policy.Recommender&quot;, recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
183 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
184 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
185 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
186 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700187 }</pre>
188</div>
189
190<div class="method">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800191 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700192 <pre>Lists recommendations for a Cloud project. Requires the recommender.*.list IAM permission for the specified recommender.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700193
194Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700195 parent: string, Required. The container resource on which to execute the request. Acceptable formats: 1. &quot;projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]&quot;, LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. (required)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800196 filter: string, Filter expression to restrict the recommendations returned. Supported filter fields: state_info.state Eg: `state_info.state:&quot;DISMISSED&quot; or state_info.state:&quot;FAILED&quot;
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800197 pageSize: integer, Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.
198 pageToken: string, Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700199 x__xgafv: string, V1 error format.
200 Allowed values
201 1 - v1 error format
202 2 - v2 error format
203
204Returns:
205 An object of the form:
206
207 { # Response to the `ListRecommendations` method.
208 &quot;recommendations&quot;: [ # The set of recommendations for the `parent` resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700209 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800210 &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 optimize for one category.
211 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
212 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800213 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800214 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800215 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800216 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
217 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700218 },
219 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800220 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800221 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
222 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
223 { # Group of operations that need to be performed atomically.
224 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
225 { # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800226 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field referes to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
227 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
228 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
229 },
230 },
231 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: { &quot;/versions/*/name&quot; : &quot;it-123&quot; &quot;/versions/*/targetSize/percent&quot;: 20 } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/condition&quot; : null } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/members/*&quot; : [&quot;x@example.com&quot;, &quot;y@example.com&quot;] } When both path_filters and path_value_matchers are set, an implicit AND must be performed.
232 &quot;a_key&quot;: &quot;&quot;,
233 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800234 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
235 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
236 &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 &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
237 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
238 },
239 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the resource level, then path should be &quot;/&quot;. This field is always populated.
240 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;. Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set for &#x27;test&#x27; operation. An exact match must be performed.
241 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;, source_resource = and resource_name = . This field is empty for all other values of `action`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800242 &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 resource or source_resource, ignored if provided for other operation types.
243 &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;, &#x27;copy&#x27;, &#x27;test&#x27; and custom operations. This field is case-insensitive and always populated.
244 },
245 ],
246 },
247 ],
248 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800249 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
250 { # Reference to an associated insight.
251 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
252 },
253 ],
254 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
255 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
256 &quot;a_key&quot;: &quot;A String&quot;,
257 },
258 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
259 },
260 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
261 { # Contains the impact a recommendation can have for a given category.
262 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
263 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
264 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
265 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
266 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
267 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
268 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
269 },
270 },
271 },
272 ],
273 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = &quot;google.iam.policy.Recommender&quot;, recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
274 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
275 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
276 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
277 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700278 },
279 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800280 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token that can be used to request the next page of results. This field is empty if there are no additional results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700281 }</pre>
282</div>
283
284<div class="method">
285 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
286 <pre>Retrieves the next page of results.
287
288Args:
289 previous_request: The request for the previous page. (required)
290 previous_response: The response from the request for the previous page. (required)
291
292Returns:
293 A request object that you can call &#x27;execute()&#x27; on to request the next
294 page. Returns None if there are no more items in the collection.
295 </pre>
296</div>
297
298<div class="method">
299 <code class="details" id="markClaimed">markClaimed(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700300 <pre>Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700301
302Args:
303 name: string, Required. Name of the recommendation. (required)
304 body: object, The request body.
305 The object takes the form of:
306
307{ # Request for the `MarkRecommendationClaimed` Method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700308 &quot;stateMetadata&quot;: { # State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex /^a-z0-9{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700309 &quot;a_key&quot;: &quot;A String&quot;,
310 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800311 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700312 }
313
314 x__xgafv: string, V1 error format.
315 Allowed values
316 1 - v1 error format
317 2 - v2 error format
318
319Returns:
320 An object of the form:
321
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700322 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800323 &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 optimize for one category.
324 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
325 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800326 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800327 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800328 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800329 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
330 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700331 },
332 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800333 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800334 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
335 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
336 { # Group of operations that need to be performed atomically.
337 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
338 { # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800339 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field referes to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
340 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
341 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
342 },
343 },
344 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: { &quot;/versions/*/name&quot; : &quot;it-123&quot; &quot;/versions/*/targetSize/percent&quot;: 20 } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/condition&quot; : null } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/members/*&quot; : [&quot;x@example.com&quot;, &quot;y@example.com&quot;] } When both path_filters and path_value_matchers are set, an implicit AND must be performed.
345 &quot;a_key&quot;: &quot;&quot;,
346 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800347 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
348 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
349 &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 &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
350 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
351 },
352 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the resource level, then path should be &quot;/&quot;. This field is always populated.
353 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;. Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set for &#x27;test&#x27; operation. An exact match must be performed.
354 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;, source_resource = and resource_name = . This field is empty for all other values of `action`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800355 &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 resource or source_resource, ignored if provided for other operation types.
356 &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;, &#x27;copy&#x27;, &#x27;test&#x27; and custom operations. This field is case-insensitive and always populated.
357 },
358 ],
359 },
360 ],
361 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800362 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
363 { # Reference to an associated insight.
364 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
365 },
366 ],
367 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
368 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
369 &quot;a_key&quot;: &quot;A String&quot;,
370 },
371 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
372 },
373 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
374 { # Contains the impact a recommendation can have for a given category.
375 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
376 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
377 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
378 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
379 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
380 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
381 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
382 },
383 },
384 },
385 ],
386 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = &quot;google.iam.policy.Recommender&quot;, recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
387 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
388 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
389 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
390 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700391 }</pre>
392</div>
393
394<div class="method">
395 <code class="details" id="markFailed">markFailed(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700396 <pre>Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700397
398Args:
399 name: string, Required. Name of the recommendation. (required)
400 body: object, The request body.
401 The object takes the form of:
402
403{ # Request for the `MarkRecommendationFailed` Method.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800404 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700405 &quot;stateMetadata&quot;: { # State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex /^a-z0-9{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700406 &quot;a_key&quot;: &quot;A String&quot;,
407 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700408 }
409
410 x__xgafv: string, V1 error format.
411 Allowed values
412 1 - v1 error format
413 2 - v2 error format
414
415Returns:
416 An object of the form:
417
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700418 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800419 &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 optimize for one category.
420 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
421 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800422 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800423 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800424 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800425 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
426 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700427 },
428 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800429 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800430 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
431 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
432 { # Group of operations that need to be performed atomically.
433 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
434 { # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800435 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field referes to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
436 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
437 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
438 },
439 },
440 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: { &quot;/versions/*/name&quot; : &quot;it-123&quot; &quot;/versions/*/targetSize/percent&quot;: 20 } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/condition&quot; : null } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/members/*&quot; : [&quot;x@example.com&quot;, &quot;y@example.com&quot;] } When both path_filters and path_value_matchers are set, an implicit AND must be performed.
441 &quot;a_key&quot;: &quot;&quot;,
442 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800443 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
444 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
445 &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 &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
446 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
447 },
448 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the resource level, then path should be &quot;/&quot;. This field is always populated.
449 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;. Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set for &#x27;test&#x27; operation. An exact match must be performed.
450 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;, source_resource = and resource_name = . This field is empty for all other values of `action`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800451 &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 resource or source_resource, ignored if provided for other operation types.
452 &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;, &#x27;copy&#x27;, &#x27;test&#x27; and custom operations. This field is case-insensitive and always populated.
453 },
454 ],
455 },
456 ],
457 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800458 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
459 { # Reference to an associated insight.
460 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
461 },
462 ],
463 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
464 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
465 &quot;a_key&quot;: &quot;A String&quot;,
466 },
467 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
468 },
469 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
470 { # Contains the impact a recommendation can have for a given category.
471 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
472 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
473 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
474 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
475 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
476 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
477 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
478 },
479 },
480 },
481 ],
482 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = &quot;google.iam.policy.Recommender&quot;, recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
483 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
484 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
485 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
486 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700487 }</pre>
488</div>
489
490<div class="method">
491 <code class="details" id="markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700492 <pre>Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700493
494Args:
495 name: string, Required. Name of the recommendation. (required)
496 body: object, The request body.
497 The object takes the form of:
498
499{ # Request for the `MarkRecommendationSucceeded` Method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700500 &quot;stateMetadata&quot;: { # State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex /^a-z0-9{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700501 &quot;a_key&quot;: &quot;A String&quot;,
502 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800503 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700504 }
505
506 x__xgafv: string, V1 error format.
507 Allowed values
508 1 - v1 error format
509 2 - v2 error format
510
511Returns:
512 An object of the form:
513
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700514 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800515 &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 optimize for one category.
516 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
517 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800518 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800519 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800520 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800521 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
522 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700523 },
524 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800525 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800526 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
527 &quot;operationGroups&quot;: [ # Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
528 { # Group of operations that need to be performed atomically.
529 &quot;operations&quot;: [ # List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
530 { # Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800531 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field referes to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
532 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
533 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
534 },
535 },
536 &quot;pathFilters&quot;: { # Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: { &quot;/versions/*/name&quot; : &quot;it-123&quot; &quot;/versions/*/targetSize/percent&quot;: 20 } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/condition&quot; : null } * Example: { &quot;/bindings/*/role&quot;: &quot;roles/owner&quot; &quot;/bindings/*/members/*&quot; : [&quot;x@example.com&quot;, &quot;y@example.com&quot;] } When both path_filters and path_value_matchers are set, an implicit AND must be performed.
537 &quot;a_key&quot;: &quot;&quot;,
538 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800539 &quot;resourceType&quot;: &quot;A String&quot;, # Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
540 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
541 &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 &#x27;path&#x27; field. Either this or `value` will be set for &#x27;test&#x27; operation.
542 &quot;matchesPattern&quot;: &quot;A String&quot;, # To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
543 },
544 &quot;path&quot;: &quot;A String&quot;, # Path to the target field being operated on. If the operation is at the resource level, then path should be &quot;/&quot;. This field is always populated.
545 &quot;value&quot;: &quot;&quot;, # Value for the `path` field. Will be set for actions:&#x27;add&#x27;/&#x27;replace&#x27;. Maybe set for action: &#x27;test&#x27;. Either this or `value_matcher` will be set for &#x27;test&#x27; operation. An exact match must be performed.
546 &quot;sourceResource&quot;: &quot;A String&quot;, # Can be set with action &#x27;copy&#x27; to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = &#x27;copy&#x27;, path = &quot;/&quot;, from = &quot;/&quot;, source_resource = and resource_name = . This field is empty for all other values of `action`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800547 &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 resource or source_resource, ignored if provided for other operation types.
548 &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;, &#x27;copy&#x27;, &#x27;test&#x27; and custom operations. This field is case-insensitive and always populated.
549 },
550 ],
551 },
552 ],
553 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800554 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
555 { # Reference to an associated insight.
556 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
557 },
558 ],
559 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
560 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
561 &quot;a_key&quot;: &quot;A String&quot;,
562 },
563 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
564 },
565 &quot;additionalImpact&quot;: [ # Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
566 { # Contains the impact a recommendation can have for a given category.
567 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
568 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
569 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
570 &quot;cost&quot;: { # Represents an amount of money with its currency type. # An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
571 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
572 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
573 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
574 },
575 },
576 },
577 ],
578 &quot;recommenderSubtype&quot;: &quot;A String&quot;, # Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = &quot;google.iam.policy.Recommender&quot;, recommender_subtype can be one of &quot;REMOVE_ROLE&quot;/&quot;REPLACE_ROLE&quot;
579 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
580 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
581 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
582 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700583 }</pre>
584</div>
585
586</body></html>