blob: e2234e99a93f6dc257f75e392a838cbd0fa67e11 [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>
yoshi-code-bot4c9ccb02021-05-27 00:38:02 -070085<p class="firstline">Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.</p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080086<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 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700130 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
131 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
132 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
133 },
134 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800135 },
136 ],
137 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
138 { # Reference to an associated insight.
139 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
140 },
141 ],
142 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
143 &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.
144 { # Group of operations that need to be performed atomically.
145 &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.
146 { # 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-code-bot4c9ccb02021-05-27 00:38:02 -0700147 &quot;action&quot;: &quot;A String&quot;, # Type of this operation. Contains one of &#x27;add&#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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800148 &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;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.
150 &quot;a_key&quot;: &quot;&quot;,
151 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800152 &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 -0800153 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
154 &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
155 },
156 },
157 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
158 &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
159 &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.
160 &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`.
161 &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.
162 &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.
163 &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
164 },
165 },
166 ],
167 },
168 ],
169 },
170 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
171 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
172 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
173 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
174 &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.
175 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
176 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
177 &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.
178 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
179 &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.
180 &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.
181 },
182 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
183 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700184 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
185 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
186 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
187 },
188 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800189 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700190 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800191 &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;
192 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
193 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
194 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
195 &quot;a_key&quot;: &quot;A String&quot;,
196 },
197 },
198}</pre>
199</div>
200
201<div class="method">
202 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
yoshi-code-bot4c9ccb02021-05-27 00:38:02 -0700203 <pre>Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800204
205Args:
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700206 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-botc2cd3262021-05-16 02:16:04 -0700207 filter: string, Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` (These expressions are based on the filter language described at https://google.aip.dev/160)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800208 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.
209 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.
210 x__xgafv: string, V1 error format.
211 Allowed values
212 1 - v1 error format
213 2 - v2 error format
214
215Returns:
216 An object of the form:
217
218 { # Response to the `ListRecommendations` method.
219 &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.
220 &quot;recommendations&quot;: [ # The set of recommendations for the `parent` resource.
221 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
222 &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.
223 { # Contains the impact a recommendation can have for a given category.
224 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
225 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
226 &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.
227 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
228 &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.
229 &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.
230 },
231 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
232 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700233 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
234 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
235 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
236 },
237 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800238 },
239 ],
240 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
241 { # Reference to an associated insight.
242 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
243 },
244 ],
245 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
246 &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.
247 { # Group of operations that need to be performed atomically.
248 &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.
249 { # 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-code-bot4c9ccb02021-05-27 00:38:02 -0700250 &quot;action&quot;: &quot;A String&quot;, # Type of this operation. Contains one of &#x27;add&#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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800251 &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.
252 &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.
253 &quot;a_key&quot;: &quot;&quot;,
254 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800255 &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 -0800256 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
257 &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
258 },
259 },
260 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
261 &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
262 &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.
263 &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`.
264 &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.
265 &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.
266 &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
267 },
268 },
269 ],
270 },
271 ],
272 },
273 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
274 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
275 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
276 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
277 &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.
278 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
279 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
280 &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.
281 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
282 &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.
283 &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.
284 },
285 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
286 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700287 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
288 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
289 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
290 },
291 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800292 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700293 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800294 &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;
295 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
296 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
297 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
298 &quot;a_key&quot;: &quot;A String&quot;,
299 },
300 },
301 },
302 ],
303}</pre>
304</div>
305
306<div class="method">
307 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
308 <pre>Retrieves the next page of results.
309
310Args:
311 previous_request: The request for the previous page. (required)
312 previous_response: The response from the request for the previous page. (required)
313
314Returns:
315 A request object that you can call &#x27;execute()&#x27; on to request the next
316 page. Returns None if there are no more items in the collection.
317 </pre>
318</div>
319
320<div class="method">
321 <code class="details" id="markClaimed">markClaimed(name, body=None, x__xgafv=None)</code>
322 <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.
323
324Args:
325 name: string, Required. Name of the recommendation. (required)
326 body: object, The request body.
327 The object takes the form of:
328
329{ # Request for the `MarkRecommendationClaimed` Method.
330 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
331 &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}$/.
332 &quot;a_key&quot;: &quot;A String&quot;,
333 },
334}
335
336 x__xgafv: string, V1 error format.
337 Allowed values
338 1 - v1 error format
339 2 - v2 error format
340
341Returns:
342 An object of the form:
343
344 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
345 &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.
346 { # Contains the impact a recommendation can have for a given category.
347 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
348 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
349 &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.
350 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
351 &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.
352 &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.
353 },
354 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
355 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700356 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
357 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
358 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
359 },
360 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800361 },
362 ],
363 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
364 { # Reference to an associated insight.
365 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
366 },
367 ],
368 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
369 &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.
370 { # Group of operations that need to be performed atomically.
371 &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.
372 { # 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-code-bot4c9ccb02021-05-27 00:38:02 -0700373 &quot;action&quot;: &quot;A String&quot;, # Type of this operation. Contains one of &#x27;add&#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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800374 &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.
375 &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.
376 &quot;a_key&quot;: &quot;&quot;,
377 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800378 &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 -0800379 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
380 &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
381 },
382 },
383 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
384 &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
385 &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.
386 &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`.
387 &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.
388 &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.
389 &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
390 },
391 },
392 ],
393 },
394 ],
395 },
396 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
397 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
398 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
399 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
400 &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.
401 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
402 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
403 &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.
404 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
405 &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.
406 &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.
407 },
408 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
409 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700410 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
411 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
412 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
413 },
414 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800415 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700416 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800417 &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;
418 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
419 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
420 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
421 &quot;a_key&quot;: &quot;A String&quot;,
422 },
423 },
424}</pre>
425</div>
426
427<div class="method">
428 <code class="details" id="markFailed">markFailed(name, body=None, x__xgafv=None)</code>
429 <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.
430
431Args:
432 name: string, Required. Name of the recommendation. (required)
433 body: object, The request body.
434 The object takes the form of:
435
436{ # Request for the `MarkRecommendationFailed` Method.
437 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
438 &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}$/.
439 &quot;a_key&quot;: &quot;A String&quot;,
440 },
441}
442
443 x__xgafv: string, V1 error format.
444 Allowed values
445 1 - v1 error format
446 2 - v2 error format
447
448Returns:
449 An object of the form:
450
451 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
452 &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.
453 { # Contains the impact a recommendation can have for a given category.
454 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
455 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
456 &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.
457 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
458 &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.
459 &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.
460 },
461 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
462 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700463 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
464 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
465 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
466 },
467 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800468 },
469 ],
470 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
471 { # Reference to an associated insight.
472 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
473 },
474 ],
475 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
476 &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.
477 { # Group of operations that need to be performed atomically.
478 &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.
479 { # 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-code-bot4c9ccb02021-05-27 00:38:02 -0700480 &quot;action&quot;: &quot;A String&quot;, # Type of this operation. Contains one of &#x27;add&#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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800481 &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.
482 &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.
483 &quot;a_key&quot;: &quot;&quot;,
484 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800485 &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 -0800486 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
487 &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
488 },
489 },
490 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
491 &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
492 &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.
493 &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`.
494 &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.
495 &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.
496 &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
497 },
498 },
499 ],
500 },
501 ],
502 },
503 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
504 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
505 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
506 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
507 &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.
508 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
509 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
510 &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.
511 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
512 &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.
513 &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.
514 },
515 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
516 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700517 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
518 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
519 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
520 },
521 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800522 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700523 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800524 &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;
525 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
526 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
527 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
528 &quot;a_key&quot;: &quot;A String&quot;,
529 },
530 },
531}</pre>
532</div>
533
534<div class="method">
535 <code class="details" id="markSucceeded">markSucceeded(name, body=None, x__xgafv=None)</code>
536 <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.
537
538Args:
539 name: string, Required. Name of the recommendation. (required)
540 body: object, The request body.
541 The object takes the form of:
542
543{ # Request for the `MarkRecommendationSucceeded` Method.
544 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Recommendation. Provides optimistic locking.
545 &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}$/.
546 &quot;a_key&quot;: &quot;A String&quot;,
547 },
548}
549
550 x__xgafv: string, V1 error format.
551 Allowed values
552 1 - v1 error format
553 2 - v2 error format
554
555Returns:
556 An object of the form:
557
558 { # A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
559 &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.
560 { # Contains the impact a recommendation can have for a given category.
561 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
562 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
563 &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.
564 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
565 &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.
566 &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.
567 },
568 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
569 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700570 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
571 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
572 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
573 },
574 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800575 },
576 ],
577 &quot;associatedInsights&quot;: [ # Insights that led to this recommendation.
578 { # Reference to an associated insight.
579 &quot;insight&quot;: &quot;A String&quot;, # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
580 },
581 ],
582 &quot;content&quot;: { # Contains what resources are changing and how they are changing. # Content of the recommendation describing recommended changes to resources.
583 &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.
584 { # Group of operations that need to be performed atomically.
585 &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.
586 { # 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-code-bot4c9ccb02021-05-27 00:38:02 -0700587 &quot;action&quot;: &quot;A String&quot;, # Type of this operation. Contains one of &#x27;add&#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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800588 &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.
589 &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.
590 &quot;a_key&quot;: &quot;&quot;,
591 },
yoshi-code-bot69706592021-03-03 03:54:02 -0800592 &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 -0800593 &quot;a_key&quot;: { # Contains various matching options for values for a GCP resource field.
594 &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
595 },
596 },
597 &quot;resource&quot;: &quot;A String&quot;, # Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
598 &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
599 &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.
600 &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`.
601 &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.
602 &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.
603 &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
604 },
605 },
606 ],
607 },
608 ],
609 },
610 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
611 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Recommendation. Provides optimistic locking when updating states.
612 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Last time this recommendation was refreshed by the system that created it in the first place.
613 &quot;name&quot;: &quot;A String&quot;, # Name of recommendation.
614 &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.
615 &quot;category&quot;: &quot;A String&quot;, # Category that is being targeted.
616 &quot;costProjection&quot;: { # Contains metadata about how much money a recommendation can save or incur. # Use with CategoryType.COST
617 &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.
618 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
619 &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.
620 &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.
621 },
622 &quot;duration&quot;: &quot;A String&quot;, # Duration for which this cost applies.
623 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700624 &quot;securityProjection&quot;: { # Contains various ways of describing the impact on Security. # Use with CategoryType.SECURITY
625 &quot;details&quot;: { # Additional security impact details that is provided by the recommender.
626 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
627 },
628 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800629 },
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700630 &quot;priority&quot;: &quot;A String&quot;, # Recommendation&#x27;s priority.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800631 &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;
632 &quot;stateInfo&quot;: { # Information for state. Contains state and metadata. # Information for state. Contains state and metadata.
633 &quot;state&quot;: &quot;A String&quot;, # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
634 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
635 &quot;a_key&quot;: &quot;A String&quot;,
636 },
637 },
638}</pre>
639</div>
640
641</body></html>