blob: 748539b45190bdd4cb003e66b09a98e4e558005a [file] [log] [blame]
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001<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.organizations.html">organizations</a> . <a href="recommender_v1.organizations.locations.html">locations</a> . <a href="recommender_v1.organizations.locations.recommenders.html">recommenders</a> . <a href="recommender_v1.organizations.locations.recommenders.recommendations.html">recommendations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81 <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">
84 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Lists recommendations for a Cloud project. Requires the recommender.*.list IAM permission for the specified recommender.</p>
86<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>
91<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>
92<p class="toc_element">
93 <code><a href="#markFailed">markFailed(name, body=None, x__xgafv=None)</a></code></p>
94<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>
95<p class="toc_element">
96 <code><a href="#markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</a></code></p>
97<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>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
105 <code class="details" id="get">get(name, x__xgafv=None)</code>
106 <pre>Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
107
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
118 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
119 &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.
120 { # Contains the impact a recommendation can have for a given category.
121 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
122 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
123 &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.
124 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
125 &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.
126 &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.
127 },
128 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
129 },
130 },
131 ],
132 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
133 { # Reference to an associated insight.
134 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
135 },
136 ],
137 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
138 &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.
139 { # Group of operations that need to be performed atomically.
140 &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.
141 { # 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.
142 &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.
143 &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.
144 &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.
145 &quot;a_key&quot;: &quot;&quot;,
146 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800147 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field refers 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800148 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
149 &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
150 },
151 },
152 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
153 &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
154 &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.
155 &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`.
156 &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.
157 &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.
158 &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
159 },
160 },
161 ],
162 },
163 ],
164 },
165 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
166 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
167 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
168 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
169 &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.
170 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
171 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
172 &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.
173 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
174 &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.
175 &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.
176 },
177 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
178 },
179 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700180 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800181 &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;
182 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
183 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
184 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
185 &quot;a_key&quot;: &quot;A String&quot;,
186 },
187 },
188}</pre>
189</div>
190
191<div class="method">
192 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
193 <pre>Lists recommendations for a Cloud project. Requires the recommender.*.list IAM permission for the specified recommender.
194
195Args:
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700196 parent: string, Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 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-code-botb6dc1b92021-03-02 11:49:08 -0800197 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;
198 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.
199 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.
200 x__xgafv: string, V1 error format.
201 Allowed values
202 1 - v1 error format
203 2 - v2 error format
204
205Returns:
206 An object of the form:
207
208 { # Response to the `ListRecommendations` method.
209 &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.
210 &quot;recommendations&quot;: [ # The set of recommendations for the `parent` resource.
211 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
212 &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.
213 { # Contains the impact a recommendation can have for a given category.
214 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
215 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
216 &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.
217 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
218 &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.
219 &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.
220 },
221 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
222 },
223 },
224 ],
225 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
226 { # Reference to an associated insight.
227 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
228 },
229 ],
230 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
231 &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.
232 { # Group of operations that need to be performed atomically.
233 &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.
234 { # 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.
235 &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.
236 &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.
237 &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.
238 &quot;a_key&quot;: &quot;&quot;,
239 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800240 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field refers 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800241 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
242 &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
243 },
244 },
245 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
246 &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
247 &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.
248 &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`.
249 &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.
250 &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.
251 &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
252 },
253 },
254 ],
255 },
256 ],
257 },
258 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
259 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
260 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
261 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
262 &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.
263 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
264 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
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;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
267 &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.
268 &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.
269 },
270 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
271 },
272 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700273 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800274 &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;
275 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
276 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
277 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
278 &quot;a_key&quot;: &quot;A String&quot;,
279 },
280 },
281 },
282 ],
283}</pre>
284</div>
285
286<div class="method">
287 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
288 <pre>Retrieves the next page of results.
289
290Args:
291 previous_request: The request for the previous page. (required)
292 previous_response: The response from the request for the previous page. (required)
293
294Returns:
295 A request object that you can call &#x27;execute()&#x27; on to request the next
296 page. Returns None if there are no more items in the collection.
297 </pre>
298</div>
299
300<div class="method">
301 <code class="details" id="markClaimed">markClaimed(name, body=None, x__xgafv=None)</code>
302 <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.
303
304Args:
305 name: string, Required. Name of the recommendation. (required)
306 body: object, The request body.
307 The object takes the form of:
308
309{ # Request for the `MarkRecommendationClaimed` Method.
310 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
311 &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}$/.
312 &quot;a_key&quot;: &quot;A String&quot;,
313 },
314}
315
316 x__xgafv: string, V1 error format.
317 Allowed values
318 1 - v1 error format
319 2 - v2 error format
320
321Returns:
322 An object of the form:
323
324 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
325 &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.
326 { # Contains the impact a recommendation can have for a given category.
327 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
328 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
329 &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.
330 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
331 &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.
332 &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.
333 },
334 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
335 },
336 },
337 ],
338 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
339 { # Reference to an associated insight.
340 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
341 },
342 ],
343 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
344 &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.
345 { # Group of operations that need to be performed atomically.
346 &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.
347 { # 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.
348 &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.
349 &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.
350 &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.
351 &quot;a_key&quot;: &quot;&quot;,
352 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800353 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field refers 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800354 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
355 &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
356 },
357 },
358 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
359 &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
360 &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.
361 &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`.
362 &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.
363 &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.
364 &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
365 },
366 },
367 ],
368 },
369 ],
370 },
371 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
372 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
373 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
374 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
375 &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.
376 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
377 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
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;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
380 &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.
381 &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.
382 },
383 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
384 },
385 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700386 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800387 &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;
388 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
389 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
390 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
391 &quot;a_key&quot;: &quot;A String&quot;,
392 },
393 },
394}</pre>
395</div>
396
397<div class="method">
398 <code class="details" id="markFailed">markFailed(name, body=None, x__xgafv=None)</code>
399 <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.
400
401Args:
402 name: string, Required. Name of the recommendation. (required)
403 body: object, The request body.
404 The object takes the form of:
405
406{ # Request for the `MarkRecommendationFailed` Method.
407 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
408 &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}$/.
409 &quot;a_key&quot;: &quot;A String&quot;,
410 },
411}
412
413 x__xgafv: string, V1 error format.
414 Allowed values
415 1 - v1 error format
416 2 - v2 error format
417
418Returns:
419 An object of the form:
420
421 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
422 &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.
423 { # Contains the impact a recommendation can have for a given category.
424 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
425 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
426 &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.
427 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
428 &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.
429 &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.
430 },
431 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
432 },
433 },
434 ],
435 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
436 { # Reference to an associated insight.
437 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
438 },
439 ],
440 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
441 &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.
442 { # Group of operations that need to be performed atomically.
443 &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.
444 { # 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.
445 &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.
446 &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.
447 &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.
448 &quot;a_key&quot;: &quot;&quot;,
449 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800450 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field refers 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800451 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
452 &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
453 },
454 },
455 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
456 &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
457 &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.
458 &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`.
459 &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.
460 &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.
461 &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
462 },
463 },
464 ],
465 },
466 ],
467 },
468 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
469 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
470 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
471 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
472 &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.
473 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
474 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
475 &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.
476 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
477 &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.
478 &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.
479 },
480 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
481 },
482 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700483 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800484 &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;
485 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
486 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
487 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
488 &quot;a_key&quot;: &quot;A String&quot;,
489 },
490 },
491}</pre>
492</div>
493
494<div class="method">
495 <code class="details" id="markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</code>
496 <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.
497
498Args:
499 name: string, Required. Name of the recommendation. (required)
500 body: object, The request body.
501 The object takes the form of:
502
503{ # Request for the `MarkRecommendationSucceeded` Method.
504 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
505 &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}$/.
506 &quot;a_key&quot;: &quot;A String&quot;,
507 },
508}
509
510 x__xgafv: string, V1 error format.
511 Allowed values
512 1 - v1 error format
513 2 - v2 error format
514
515Returns:
516 An object of the form:
517
518 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
519 &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.
520 { # Contains the impact a recommendation can have for a given category.
521 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
522 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
523 &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.
524 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
525 &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.
526 &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.
527 },
528 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
529 },
530 },
531 ],
532 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
533 { # Reference to an associated insight.
534 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
535 },
536 ],
537 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
538 &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.
539 { # Group of operations that need to be performed atomically.
540 &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.
541 { # 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.
542 &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.
543 &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.
544 &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.
545 &quot;a_key&quot;: &quot;&quot;,
546 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800547 &quot;pathValueMatchers&quot;: { # Similar to path_filters, this contains set of filters to apply if `path` field refers 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800548 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
549 &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
550 },
551 },
552 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
553 &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
554 &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.
555 &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`.
556 &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.
557 &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.
558 &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
559 },
560 },
561 ],
562 },
563 ],
564 },
565 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
566 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
567 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
568 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
569 &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.
570 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
571 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
572 &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.
573 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
574 &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.
575 &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.
576 },
577 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
578 },
579 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700580 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800581 &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;
582 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
583 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
584 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
585 &quot;a_key&quot;: &quot;A String&quot;,
586 },
587 },
588}</pre>
589</div>
590
591</body></html>