blob: ad86eb47e53a76e2b6dcd4f257c0f186890af1c2 [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>
yoshi-code-bot4c9ccb02021-05-27 00:38:02 -070085<p class="firstline">Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.</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="#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).
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700128 &quot;severity&quot;: &quot;A String&quot;, # Insight&#x27;s severity.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800129 &quot;stateInfo&quot;: { # Information related to insight state. # Information state and metadata.
130 &quot;state&quot;: &quot;A String&quot;, # Insight state.
131 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
132 &quot;a_key&quot;: &quot;A String&quot;,
133 },
134 },
135 &quot;targetResources&quot;: [ # Fully qualified resource names that this insight is targeting.
136 &quot;A String&quot;,
137 ],
138}</pre>
139</div>
140
141<div class="method">
142 <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 -0700143 <pre>Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800144
145Args:
yoshi-code-bot3dd15272021-04-21 15:07:48 -0700146 parent: string, Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 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)
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700147 filter: string, Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800148 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.
149 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.
150 x__xgafv: string, V1 error format.
151 Allowed values
152 1 - v1 error format
153 2 - v2 error format
154
155Returns:
156 An object of the form:
157
158 { # Response to the `ListInsights` method.
159 &quot;insights&quot;: [ # The set of insights for the `parent` resource.
160 { # An insight along with the information used to derive the insight. The insight may have associated recomendations as well.
161 &quot;associatedRecommendations&quot;: [ # Recommendations derived from this insight.
162 { # Reference to an associated recommendation.
163 &quot;recommendation&quot;: &quot;A String&quot;, # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]
164 },
165 ],
166 &quot;category&quot;: &quot;A String&quot;, # Category being targeted by the insight.
167 &quot;content&quot;: { # A struct of custom fields to explain the insight. Example: &quot;grantedPermissionsCount&quot;: &quot;1000&quot;
168 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
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 Insight. Provides optimistic locking when updating states.
172 &quot;insightSubtype&quot;: &quot;A String&quot;, # Insight subtype. Insight content schema will be stable for a given subtype.
173 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Timestamp of the latest data used to generate the insight.
174 &quot;name&quot;: &quot;A String&quot;, # Name of the insight.
175 &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).
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700176 &quot;severity&quot;: &quot;A String&quot;, # Insight&#x27;s severity.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800177 &quot;stateInfo&quot;: { # Information related to insight state. # Information state and metadata.
178 &quot;state&quot;: &quot;A String&quot;, # Insight state.
179 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
180 &quot;a_key&quot;: &quot;A String&quot;,
181 },
182 },
183 &quot;targetResources&quot;: [ # Fully qualified resource names that this insight is targeting.
184 &quot;A String&quot;,
185 ],
186 },
187 ],
188 &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.
189}</pre>
190</div>
191
192<div class="method">
193 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
194 <pre>Retrieves the next page of results.
195
196Args:
197 previous_request: The request for the previous page. (required)
198 previous_response: The response from the request for the previous page. (required)
199
200Returns:
201 A request object that you can call &#x27;execute()&#x27; on to request the next
202 page. Returns None if there are no more items in the collection.
203 </pre>
204</div>
205
206<div class="method">
207 <code class="details" id="markAccepted">markAccepted(name, body=None, x__xgafv=None)</code>
208 <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.
209
210Args:
211 name: string, Required. Name of the insight. (required)
212 body: object, The request body.
213 The object takes the form of:
214
215{ # Request for the `MarkInsightAccepted` method.
216 &quot;etag&quot;: &quot;A String&quot;, # Required. Fingerprint of the Insight. Provides optimistic locking.
217 &quot;stateMetadata&quot;: { # Optional. State properties user wish to include with this state. Full replace of the current state_metadata.
218 &quot;a_key&quot;: &quot;A String&quot;,
219 },
220}
221
222 x__xgafv: string, V1 error format.
223 Allowed values
224 1 - v1 error format
225 2 - v2 error format
226
227Returns:
228 An object of the form:
229
230 { # An insight along with the information used to derive the insight. The insight may have associated recomendations as well.
231 &quot;associatedRecommendations&quot;: [ # Recommendations derived from this insight.
232 { # Reference to an associated recommendation.
233 &quot;recommendation&quot;: &quot;A String&quot;, # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]
234 },
235 ],
236 &quot;category&quot;: &quot;A String&quot;, # Category being targeted by the insight.
237 &quot;content&quot;: { # A struct of custom fields to explain the insight. Example: &quot;grantedPermissionsCount&quot;: &quot;1000&quot;
238 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
239 },
240 &quot;description&quot;: &quot;A String&quot;, # Free-form human readable summary in English. The maximum length is 500 characters.
241 &quot;etag&quot;: &quot;A String&quot;, # Fingerprint of the Insight. Provides optimistic locking when updating states.
242 &quot;insightSubtype&quot;: &quot;A String&quot;, # Insight subtype. Insight content schema will be stable for a given subtype.
243 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # Timestamp of the latest data used to generate the insight.
244 &quot;name&quot;: &quot;A String&quot;, # Name of the insight.
245 &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).
yoshi-code-botbfa2f1c2021-05-08 07:21:27 -0700246 &quot;severity&quot;: &quot;A String&quot;, # Insight&#x27;s severity.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800247 &quot;stateInfo&quot;: { # Information related to insight state. # Information state and metadata.
248 &quot;state&quot;: &quot;A String&quot;, # Insight state.
249 &quot;stateMetadata&quot;: { # A map of metadata for the state, provided by user or automations systems.
250 &quot;a_key&quot;: &quot;A String&quot;,
251 },
252 },
253 &quot;targetResources&quot;: [ # Fully qualified resource names that this insight is targeting.
254 &quot;A String&quot;,
255 ],
256}</pre>
257</div>
258
259</body></html>