blob: 884211a2c4b3b133b9675e7988480b8153e27d10 [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.insightTypes.html">insightTypes</a> . <a href="recommender_v1.organizations.locations.insightTypes.insights.html">insights</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 insight. Requires the recommender.*.get IAM permission for the specified insight type.</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 insights for a Cloud project. Requires the recommender.*.list IAM permission for the specified insight type.</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="#markAccepted">markAccepted(name, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="close">close()</code>
95 <pre>Close httplib2 connections.</pre>
96</div>
97
98<div class="method">
99 <code class="details" id="get">get(name, x__xgafv=None)</code>
100 <pre>Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
101
102Args:
103 name: string, Required. Name of the insight. (required)
104 x__xgafv: string, V1 error format.
105 Allowed values
106 1 - v1 error format
107 2 - v2 error format
108
109Returns:
110 An object of the form:
111
112 { # An insight along with the information used to derive the insight. The insight may have associated recomendations as well.
113 &quot;associatedRecommendations&quot;: [ # Recommendations derived from this insight.
114 { # Reference to an associated recommendation.
115 &quot;recommendation&quot;: &quot;A String&quot;, # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]
116 },
117 ],
118 &quot;category&quot;: &quot;A String&quot;, # Category being targeted by the insight.
119 &quot;content&quot;: { # A struct of custom fields to explain the insight. Example: &quot;grantedPermissionsCount&quot;: &quot;1000&quot;
120 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
121 },
122 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
123 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Insight. Provides optimistic locking when updating states.
124 &quot;insightSubtype&quot;: &quot;A String&quot;, # Insight subtype. Insight content schema will be stable for a given subtype.
125 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Timestamp of the latest data used to generate the insight.
126 &quot;name&quot;: &quot;A String&quot;, # Name of the insight.
127 &quot;observationPeriod&quot;: &quot;A String&quot;, # Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).
128 &quot;stateInfo&quot;: { # Information related to insight state. # Information state and metadata.
129 &quot;state&quot;: &quot;A String&quot;, # Insight state.
130 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
131 &quot;a_key&quot;: &quot;A String&quot;,
132 },
133 },
134 &quot;targetResources&quot;: [ # Fully qualified resource names that this insight is targeting.
135 &quot;A String&quot;,
136 ],
137}</pre>
138</div>
139
140<div class="method">
141 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
142 <pre>Lists insights for a Cloud project. Requires the recommender.*.list IAM permission for the specified insight type.
143
144Args:
145 parent: string, Required. The container resource on which to execute the request. Acceptable formats: 1. &quot;projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]&quot;, LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) (required)
146 filter: string, Optional. Filter expression to restrict the insights returned. Supported filter fields: state Eg: `state:&quot;DISMISSED&quot; or state:&quot;ACTIVE&quot;
147 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.
148 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.
149 x__xgafv: string, V1 error format.
150 Allowed values
151 1 - v1 error format
152 2 - v2 error format
153
154Returns:
155 An object of the form:
156
157 { # Response to the `ListInsights` method.
158 &quot;insights&quot;: [ # The set of insights for the `parent` resource.
159 { # An insight along with the information used to derive the insight. The insight may have associated recomendations as well.
160 &quot;associatedRecommendations&quot;: [ # Recommendations derived from this insight.
161 { # Reference to an associated recommendation.
162 &quot;recommendation&quot;: &quot;A String&quot;, # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]
163 },
164 ],
165 &quot;category&quot;: &quot;A String&quot;, # Category being targeted by the insight.
166 &quot;content&quot;: { # A struct of custom fields to explain the insight. Example: &quot;grantedPermissionsCount&quot;: &quot;1000&quot;
167 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
168 },
169 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
170 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Insight. Provides optimistic locking when updating states.
171 &quot;insightSubtype&quot;: &quot;A String&quot;, # Insight subtype. Insight content schema will be stable for a given subtype.
172 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Timestamp of the latest data used to generate the insight.
173 &quot;name&quot;: &quot;A String&quot;, # Name of the insight.
174 &quot;observationPeriod&quot;: &quot;A String&quot;, # Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).
175 &quot;stateInfo&quot;: { # Information related to insight state. # Information state and metadata.
176 &quot;state&quot;: &quot;A String&quot;, # Insight state.
177 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
178 &quot;a_key&quot;: &quot;A String&quot;,
179 },
180 },
181 &quot;targetResources&quot;: [ # Fully qualified resource names that this insight is targeting.
182 &quot;A String&quot;,
183 ],
184 },
185 ],
186 &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.
187}</pre>
188</div>
189
190<div class="method">
191 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
192 <pre>Retrieves the next page of results.
193
194Args:
195 previous_request: The request for the previous page. (required)
196 previous_response: The response from the request for the previous page. (required)
197
198Returns:
199 A request object that you can call &#x27;execute()&#x27; on to request the next
200 page. Returns None if there are no more items in the collection.
201 </pre>
202</div>
203
204<div class="method">
205 <code class="details" id="markAccepted">markAccepted(name, body=None, x__xgafv=None)</code>
206 <pre>Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
207
208Args:
209 name: string, Required. Name of the insight. (required)
210 body: object, The request body.
211 The object takes the form of:
212
213{ # Request for the `MarkInsightAccepted` method.
214 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Insight. Provides optimistic locking.
215 &quot;stateMetadata&quot;: { # Optional. State properties user wish to include with this state. Full replace of the current state_metadata.
216 &quot;a_key&quot;: &quot;A String&quot;,
217 },
218}
219
220 x__xgafv: string, V1 error format.
221 Allowed values
222 1 - v1 error format
223 2 - v2 error format
224
225Returns:
226 An object of the form:
227
228 { # An insight along with the information used to derive the insight. The insight may have associated recomendations as well.
229 &quot;associatedRecommendations&quot;: [ # Recommendations derived from this insight.
230 { # Reference to an associated recommendation.
231 &quot;recommendation&quot;: &quot;A String&quot;, # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]
232 },
233 ],
234 &quot;category&quot;: &quot;A String&quot;, # Category being targeted by the insight.
235 &quot;content&quot;: { # A struct of custom fields to explain the insight. Example: &quot;grantedPermissionsCount&quot;: &quot;1000&quot;
236 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
237 },
238 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
239 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Insight. Provides optimistic locking when updating states.
240 &quot;insightSubtype&quot;: &quot;A String&quot;, # Insight subtype. Insight content schema will be stable for a given subtype.
241 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Timestamp of the latest data used to generate the insight.
242 &quot;name&quot;: &quot;A String&quot;, # Name of the insight.
243 &quot;observationPeriod&quot;: &quot;A String&quot;, # Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).
244 &quot;stateInfo&quot;: { # Information related to insight state. # Information state and metadata.
245 &quot;state&quot;: &quot;A String&quot;, # Insight state.
246 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
247 &quot;a_key&quot;: &quot;A String&quot;,
248 },
249 },
250 &quot;targetResources&quot;: [ # Fully qualified resource names that this insight is targeting.
251 &quot;A String&quot;,
252 ],
253}</pre>
254</div>
255
256</body></html>