1- // Copyright 2020 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -38,8 +38,8 @@ service Recommender {
3838 option (google.api.default_host ) = "recommender.googleapis.com" ;
3939 option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
4040
41- // Lists insights for a Cloud project . Requires the recommender.*.list IAM
42- // permission for the specified insight type.
41+ // Lists insights for the specified Cloud Resource . Requires the
42+ // recommender.*.list IAM permission for the specified insight type.
4343 rpc ListInsights (ListInsightsRequest ) returns (ListInsightsResponse ) {
4444 option (google.api.http ) = {
4545 get : "/v1/{parent=projects/*/locations/*/insightTypes/*}/insights"
@@ -100,8 +100,8 @@ service Recommender {
100100 option (google.api.method_signature ) = "name,state_metadata,etag" ;
101101 }
102102
103- // Lists recommendations for a Cloud project . Requires the recommender.*.list
104- // IAM permission for the specified recommender.
103+ // Lists recommendations for the specified Cloud Resource . Requires the
104+ // recommender.*.list IAM permission for the specified recommender.
105105 rpc ListRecommendations (ListRecommendationsRequest ) returns (ListRecommendationsResponse ) {
106106 option (google.api.http ) = {
107107 get : "/v1/{parent=projects/*/locations/*/recommenders/*}/recommendations"
@@ -235,13 +235,20 @@ message ListInsightsRequest {
235235 // Required. The container resource on which to execute the request.
236236 // Acceptable formats:
237237 //
238- // 1.
239- // "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]",
238+ // * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
239+ //
240+ // * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
241+ //
242+ // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
243+ //
244+ // * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
245+ //
246+ // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
240247 //
241248 // LOCATION here refers to GCP Locations:
242249 // https://cloud.google.com/about/locations/
243250 // INSIGHT_TYPE_ID refers to supported insight types:
244- // https://cloud.google.com/recommender/docs/insights/insight-types.)
251+ // https://cloud.google.com/recommender/docs/insights/insight-types.
245252 string parent = 1 [
246253 (google.api.field_behavior ) = REQUIRED ,
247254 (google.api.resource_reference ) = {
@@ -261,8 +268,26 @@ message ListInsightsRequest {
261268 string page_token = 3 [(google.api.field_behavior ) = OPTIONAL ];
262269
263270 // Optional. Filter expression to restrict the insights returned. Supported
264- // filter fields: state
265- // Eg: `state:"DISMISSED" or state:"ACTIVE"
271+ // filter fields:
272+ //
273+ // * `stateInfo.state`
274+ //
275+ // * `insightSubtype`
276+ //
277+ // * `severity`
278+ //
279+ // Examples:
280+ //
281+ // * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
282+ //
283+ // * `insightSubtype = PERMISSIONS_USAGE`
284+ //
285+ // * `severity = CRITICAL OR severity = HIGH`
286+ //
287+ // * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)`
288+ //
289+ // (These expressions are based on the filter language described at
290+ // https://google.aip.dev/160)
266291 string filter = 4 [(google.api.field_behavior ) = OPTIONAL ];
267292}
268293
@@ -310,8 +335,15 @@ message ListRecommendationsRequest {
310335 // Required. The container resource on which to execute the request.
311336 // Acceptable formats:
312337 //
313- // 1.
314- // "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]",
338+ // * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
339+ //
340+ // * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
341+ //
342+ // * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
343+ //
344+ // * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
345+ //
346+ // * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
315347 //
316348 // LOCATION here refers to GCP Locations:
317349 // https://cloud.google.com/about/locations/
@@ -336,8 +368,26 @@ message ListRecommendationsRequest {
336368 string page_token = 3 [(google.api.field_behavior ) = OPTIONAL ];
337369
338370 // Filter expression to restrict the recommendations returned. Supported
339- // filter fields: state_info.state
340- // Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED"
371+ // filter fields:
372+ //
373+ // * `state_info.state`
374+ //
375+ // * `recommenderSubtype`
376+ //
377+ // * `priority`
378+ //
379+ // Examples:
380+ //
381+ // * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
382+ //
383+ // * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE`
384+ //
385+ // * `priority = P1 OR priority = P2`
386+ //
387+ // * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)`
388+ //
389+ // (These expressions are based on the filter language described at
390+ // https://google.aip.dev/160)
341391 string filter = 5 ;
342392}
343393
0 commit comments