Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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_v1beta1.html">Recommender API</a> . <a href="recommender_v1beta1.projects.html">projects</a> . <a href="recommender_v1beta1.projects.locations.html">locations</a> . <a href="recommender_v1beta1.projects.locations.insightTypes.html">insightTypes</a> . <a href="recommender_v1beta1.projects.locations.insightTypes.insights.html">insights</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 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"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 84 | <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 85 | <p class="firstline">Lists insights for a Cloud project. Requires the recommender.*.list IAM permission for the specified insight type.</p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 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> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 94 | <code class="details" id="close">close()</code> |
| 95 | <pre>Close httplib2 connections.</pre> |
| 96 | </div> |
| 97 | |
| 98 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 99 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 100 | <pre>Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 101 | |
| 102 | Args: |
| 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 | |
| 109 | Returns: |
| 110 | An object of the form: |
| 111 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 112 | { # An insight along with the information used to derive the insight. The insight may have associated recomendations as well. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 113 | "associatedRecommendations": [ # Recommendations derived from this insight. |
| 114 | { # Reference to an associated recommendation. |
| 115 | "recommendation": "A String", # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 116 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 117 | ], |
| 118 | "category": "A String", # Category being targeted by the insight. |
| 119 | "content": { # A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000" |
| 120 | "a_key": "", # Properties of the object. |
| 121 | }, |
| 122 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters. |
| 123 | "etag": "A String", # Fingerprint of the Insight. Provides optimistic locking when updating states. |
| 124 | "insightSubtype": "A String", # Insight subtype. Insight content schema will be stable for a given subtype. |
| 125 | "lastRefreshTime": "A String", # Timestamp of the latest data used to generate the insight. |
| 126 | "name": "A String", # Name of the insight. |
| 127 | "observationPeriod": "A String", # 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-bot | bfa2f1c | 2021-05-08 07:21:27 -0700 | [diff] [blame] | 128 | "severity": "A String", # Insight's severity. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 129 | "stateInfo": { # Information related to insight state. # Information state and metadata. |
| 130 | "state": "A String", # Insight state. |
| 131 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 132 | "a_key": "A String", |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 133 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 134 | }, |
| 135 | "targetResources": [ # Fully qualified resource names that this insight is targeting. |
| 136 | "A String", |
| 137 | ], |
| 138 | }</pre> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 139 | </div> |
| 140 | |
| 141 | <div class="method"> |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 142 | <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 143 | <pre>Lists insights for a Cloud project. Requires the recommender.*.list IAM permission for the specified insight type. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 144 | |
| 145 | Args: |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 146 | 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-bot | c2cd326 | 2021-05-16 02:16:04 -0700 | [diff] [blame^] | 147 | 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 Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 148 | 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. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 150 | x__xgafv: string, V1 error format. |
| 151 | Allowed values |
| 152 | 1 - v1 error format |
| 153 | 2 - v2 error format |
| 154 | |
| 155 | Returns: |
| 156 | An object of the form: |
| 157 | |
| 158 | { # Response to the `ListInsights` method. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 159 | "insights": [ # 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 | "associatedRecommendations": [ # Recommendations derived from this insight. |
| 162 | { # Reference to an associated recommendation. |
| 163 | "recommendation": "A String", # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 164 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 165 | ], |
| 166 | "category": "A String", # Category being targeted by the insight. |
| 167 | "content": { # A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000" |
| 168 | "a_key": "", # Properties of the object. |
| 169 | }, |
| 170 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters. |
| 171 | "etag": "A String", # Fingerprint of the Insight. Provides optimistic locking when updating states. |
| 172 | "insightSubtype": "A String", # Insight subtype. Insight content schema will be stable for a given subtype. |
| 173 | "lastRefreshTime": "A String", # Timestamp of the latest data used to generate the insight. |
| 174 | "name": "A String", # Name of the insight. |
| 175 | "observationPeriod": "A String", # 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-bot | bfa2f1c | 2021-05-08 07:21:27 -0700 | [diff] [blame] | 176 | "severity": "A String", # Insight's severity. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 177 | "stateInfo": { # Information related to insight state. # Information state and metadata. |
| 178 | "state": "A String", # Insight state. |
| 179 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 180 | "a_key": "A String", |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 181 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 182 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 183 | "targetResources": [ # Fully qualified resource names that this insight is targeting. |
| 184 | "A String", |
| 185 | ], |
| 186 | }, |
| 187 | ], |
| 188 | "nextPageToken": "A String", # 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> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | |
| 196 | Args: |
| 197 | previous_request: The request for the previous page. (required) |
| 198 | previous_response: The response from the request for the previous page. (required) |
| 199 | |
| 200 | Returns: |
| 201 | A request object that you can call 'execute()' 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> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 209 | |
| 210 | Args: |
| 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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 216 | "etag": "A String", # Required. Fingerprint of the Insight. Provides optimistic locking. |
| 217 | "stateMetadata": { # Optional. State properties user wish to include with this state. Full replace of the current state_metadata. |
| 218 | "a_key": "A String", |
| 219 | }, |
| 220 | } |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 221 | |
| 222 | x__xgafv: string, V1 error format. |
| 223 | Allowed values |
| 224 | 1 - v1 error format |
| 225 | 2 - v2 error format |
| 226 | |
| 227 | Returns: |
| 228 | An object of the form: |
| 229 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 230 | { # An insight along with the information used to derive the insight. The insight may have associated recomendations as well. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 231 | "associatedRecommendations": [ # Recommendations derived from this insight. |
| 232 | { # Reference to an associated recommendation. |
| 233 | "recommendation": "A String", # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 234 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 235 | ], |
| 236 | "category": "A String", # Category being targeted by the insight. |
| 237 | "content": { # A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000" |
| 238 | "a_key": "", # Properties of the object. |
| 239 | }, |
| 240 | "description": "A String", # Free-form human readable summary in English. The maximum length is 500 characters. |
| 241 | "etag": "A String", # Fingerprint of the Insight. Provides optimistic locking when updating states. |
| 242 | "insightSubtype": "A String", # Insight subtype. Insight content schema will be stable for a given subtype. |
| 243 | "lastRefreshTime": "A String", # Timestamp of the latest data used to generate the insight. |
| 244 | "name": "A String", # Name of the insight. |
| 245 | "observationPeriod": "A String", # 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-bot | bfa2f1c | 2021-05-08 07:21:27 -0700 | [diff] [blame] | 246 | "severity": "A String", # Insight's severity. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 247 | "stateInfo": { # Information related to insight state. # Information state and metadata. |
| 248 | "state": "A String", # Insight state. |
| 249 | "stateMetadata": { # A map of metadata for the state, provided by user or automations systems. |
| 250 | "a_key": "A String", |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 251 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 252 | }, |
| 253 | "targetResources": [ # Fully qualified resource names that this insight is targeting. |
| 254 | "A String", |
| 255 | ], |
| 256 | }</pre> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 257 | </div> |
| 258 | |
| 259 | </body></html> |