google-cloud-recommender-v1 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/recommender/v1/insight_pb.rb +9 -0
- data/lib/google/cloud/recommender/v1/recommendation_pb.rb +16 -0
- data/lib/google/cloud/recommender/v1/recommender/client.rb +195 -13
- data/lib/google/cloud/recommender/v1/recommender_service_services_pb.rb +4 -4
- data/lib/google/cloud/recommender/v1/version.rb +1 -1
- data/lib/google/cloud/recommender/v1.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/recommender/v1/insight.rb +21 -0
- data/proto_docs/google/cloud/recommender/v1/recommendation.rb +47 -2
- data/proto_docs/google/cloud/recommender/v1/recommender_service.rb +59 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2f4ec20f58f080bc3edd58db464b84842d4b33a0cf5d231523c268ae1325c65
|
4
|
+
data.tar.gz: a0f058576ab4a146a15a811fe386a815123139d2f639ca6fbd465e8b138c6910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c666188e0feb8cc7502bf7f58fc62da776643189a88e27cc78619eec2dc0b35e4e8ff704c71b2121920e931bb7db1427a0182153ad1d6b04337cfdc8cef6ab27
|
7
|
+
data.tar.gz: 5c2b8debf493cc0696c75ffe2a8dc0fcedd86cfded10c8bb883888e94b5ad0193a7e0708744fd7e40b5d73eef14b90c64ef3ec934f1209af43dc94fd691f3e9a
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Recommender::V1::ListInsightsRequest.new # (request f
|
|
37
37
|
response = client.list_insights request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/recommender)
|
@@ -19,6 +19,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
19
19
|
optional :observation_period, :message, 5, "google.protobuf.Duration"
|
20
20
|
optional :state_info, :message, 6, "google.cloud.recommender.v1.InsightStateInfo"
|
21
21
|
optional :category, :enum, 7, "google.cloud.recommender.v1.Insight.Category"
|
22
|
+
optional :severity, :enum, 15, "google.cloud.recommender.v1.Insight.Severity"
|
22
23
|
optional :etag, :string, 11
|
23
24
|
repeated :associated_recommendations, :message, 8, "google.cloud.recommender.v1.Insight.RecommendationReference"
|
24
25
|
end
|
@@ -32,6 +33,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
32
33
|
value :PERFORMANCE, 3
|
33
34
|
value :MANAGEABILITY, 4
|
34
35
|
end
|
36
|
+
add_enum "google.cloud.recommender.v1.Insight.Severity" do
|
37
|
+
value :SEVERITY_UNSPECIFIED, 0
|
38
|
+
value :LOW, 1
|
39
|
+
value :MEDIUM, 2
|
40
|
+
value :HIGH, 3
|
41
|
+
value :CRITICAL, 4
|
42
|
+
end
|
35
43
|
add_message "google.cloud.recommender.v1.InsightStateInfo" do
|
36
44
|
optional :state, :enum, 1, "google.cloud.recommender.v1.InsightStateInfo.State"
|
37
45
|
map :state_metadata, :string, :string, 2
|
@@ -52,6 +60,7 @@ module Google
|
|
52
60
|
Insight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Insight").msgclass
|
53
61
|
Insight::RecommendationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Insight.RecommendationReference").msgclass
|
54
62
|
Insight::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Insight.Category").enummodule
|
63
|
+
Insight::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Insight.Severity").enummodule
|
55
64
|
InsightStateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.InsightStateInfo").msgclass
|
56
65
|
InsightStateInfo::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.InsightStateInfo.State").enummodule
|
57
66
|
end
|
@@ -17,16 +17,26 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
17
17
|
optional :last_refresh_time, :message, 4, "google.protobuf.Timestamp"
|
18
18
|
optional :primary_impact, :message, 5, "google.cloud.recommender.v1.Impact"
|
19
19
|
repeated :additional_impact, :message, 6, "google.cloud.recommender.v1.Impact"
|
20
|
+
optional :priority, :enum, 17, "google.cloud.recommender.v1.Recommendation.Priority"
|
20
21
|
optional :content, :message, 7, "google.cloud.recommender.v1.RecommendationContent"
|
21
22
|
optional :state_info, :message, 10, "google.cloud.recommender.v1.RecommendationStateInfo"
|
22
23
|
optional :etag, :string, 11
|
23
24
|
repeated :associated_insights, :message, 14, "google.cloud.recommender.v1.Recommendation.InsightReference"
|
25
|
+
optional :xor_group_id, :string, 18
|
24
26
|
end
|
25
27
|
add_message "google.cloud.recommender.v1.Recommendation.InsightReference" do
|
26
28
|
optional :insight, :string, 1
|
27
29
|
end
|
30
|
+
add_enum "google.cloud.recommender.v1.Recommendation.Priority" do
|
31
|
+
value :PRIORITY_UNSPECIFIED, 0
|
32
|
+
value :P4, 1
|
33
|
+
value :P3, 2
|
34
|
+
value :P2, 3
|
35
|
+
value :P1, 4
|
36
|
+
end
|
28
37
|
add_message "google.cloud.recommender.v1.RecommendationContent" do
|
29
38
|
repeated :operation_groups, :message, 2, "google.cloud.recommender.v1.OperationGroup"
|
39
|
+
optional :overview, :message, 3, "google.protobuf.Struct"
|
30
40
|
end
|
31
41
|
add_message "google.cloud.recommender.v1.OperationGroup" do
|
32
42
|
repeated :operations, :message, 1, "google.cloud.recommender.v1.Operation"
|
@@ -54,10 +64,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
54
64
|
optional :cost, :message, 1, "google.type.Money"
|
55
65
|
optional :duration, :message, 2, "google.protobuf.Duration"
|
56
66
|
end
|
67
|
+
add_message "google.cloud.recommender.v1.SecurityProjection" do
|
68
|
+
optional :details, :message, 2, "google.protobuf.Struct"
|
69
|
+
end
|
57
70
|
add_message "google.cloud.recommender.v1.Impact" do
|
58
71
|
optional :category, :enum, 1, "google.cloud.recommender.v1.Impact.Category"
|
59
72
|
oneof :projection do
|
60
73
|
optional :cost_projection, :message, 100, "google.cloud.recommender.v1.CostProjection"
|
74
|
+
optional :security_projection, :message, 101, "google.cloud.recommender.v1.SecurityProjection"
|
61
75
|
end
|
62
76
|
end
|
63
77
|
add_enum "google.cloud.recommender.v1.Impact.Category" do
|
@@ -88,11 +102,13 @@ module Google
|
|
88
102
|
module V1
|
89
103
|
Recommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Recommendation").msgclass
|
90
104
|
Recommendation::InsightReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Recommendation.InsightReference").msgclass
|
105
|
+
Recommendation::Priority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Recommendation.Priority").enummodule
|
91
106
|
RecommendationContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.RecommendationContent").msgclass
|
92
107
|
OperationGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.OperationGroup").msgclass
|
93
108
|
Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Operation").msgclass
|
94
109
|
ValueMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.ValueMatcher").msgclass
|
95
110
|
CostProjection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.CostProjection").msgclass
|
111
|
+
SecurityProjection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.SecurityProjection").msgclass
|
96
112
|
Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Impact").msgclass
|
97
113
|
Impact::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.Impact.Category").enummodule
|
98
114
|
RecommendationStateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.RecommendationStateInfo").msgclass
|
@@ -176,8 +176,8 @@ module Google
|
|
176
176
|
# Service calls
|
177
177
|
|
178
178
|
##
|
179
|
-
# Lists insights for
|
180
|
-
# permission for the specified insight type.
|
179
|
+
# Lists insights for the specified Cloud Resource. Requires the
|
180
|
+
# recommender.*.list IAM permission for the specified insight type.
|
181
181
|
#
|
182
182
|
# @overload list_insights(request, options = nil)
|
183
183
|
# Pass arguments to `list_insights` via a request object, either of type
|
@@ -198,13 +198,20 @@ module Google
|
|
198
198
|
# Required. The container resource on which to execute the request.
|
199
199
|
# Acceptable formats:
|
200
200
|
#
|
201
|
-
#
|
202
|
-
#
|
201
|
+
# * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
202
|
+
#
|
203
|
+
# * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
204
|
+
#
|
205
|
+
# * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
206
|
+
#
|
207
|
+
# * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
208
|
+
#
|
209
|
+
# * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
203
210
|
#
|
204
211
|
# LOCATION here refers to GCP Locations:
|
205
212
|
# https://cloud.google.com/about/locations/
|
206
213
|
# INSIGHT_TYPE_ID refers to supported insight types:
|
207
|
-
# https://cloud.google.com/recommender/docs/insights/insight-types.
|
214
|
+
# https://cloud.google.com/recommender/docs/insights/insight-types.
|
208
215
|
# @param page_size [::Integer]
|
209
216
|
# Optional. The maximum number of results to return from this request. Non-positive
|
210
217
|
# values are ignored. If not specified, the server will determine the number
|
@@ -216,8 +223,26 @@ module Google
|
|
216
223
|
# to those in the previous call.
|
217
224
|
# @param filter [::String]
|
218
225
|
# Optional. Filter expression to restrict the insights returned. Supported
|
219
|
-
# filter fields:
|
220
|
-
#
|
226
|
+
# filter fields:
|
227
|
+
#
|
228
|
+
# * `stateInfo.state`
|
229
|
+
#
|
230
|
+
# * `insightSubtype`
|
231
|
+
#
|
232
|
+
# * `severity`
|
233
|
+
#
|
234
|
+
# Examples:
|
235
|
+
#
|
236
|
+
# * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
|
237
|
+
#
|
238
|
+
# * `insightSubtype = PERMISSIONS_USAGE`
|
239
|
+
#
|
240
|
+
# * `severity = CRITICAL OR severity = HIGH`
|
241
|
+
#
|
242
|
+
# * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)`
|
243
|
+
#
|
244
|
+
# (These expressions are based on the filter language described at
|
245
|
+
# https://google.aip.dev/160)
|
221
246
|
#
|
222
247
|
# @yield [response, operation] Access the result along with the RPC operation
|
223
248
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Recommender::V1::Insight>]
|
@@ -227,6 +252,27 @@ module Google
|
|
227
252
|
#
|
228
253
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
229
254
|
#
|
255
|
+
# @example Basic example
|
256
|
+
# require "google/cloud/recommender/v1"
|
257
|
+
#
|
258
|
+
# # Create a client object. The client can be reused for multiple calls.
|
259
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
260
|
+
#
|
261
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
262
|
+
# request = Google::Cloud::Recommender::V1::ListInsightsRequest.new
|
263
|
+
#
|
264
|
+
# # Call the list_insights method.
|
265
|
+
# result = client.list_insights request
|
266
|
+
#
|
267
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
268
|
+
# # iterate over all elements by calling #each, and the enumerable
|
269
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
270
|
+
# # methods are also available for managing paging directly.
|
271
|
+
# result.each do |response|
|
272
|
+
# # Each element is of type ::Google::Cloud::Recommender::V1::Insight.
|
273
|
+
# p response
|
274
|
+
# end
|
275
|
+
#
|
230
276
|
def list_insights request, options = nil
|
231
277
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
232
278
|
|
@@ -299,6 +345,21 @@ module Google
|
|
299
345
|
#
|
300
346
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
301
347
|
#
|
348
|
+
# @example Basic example
|
349
|
+
# require "google/cloud/recommender/v1"
|
350
|
+
#
|
351
|
+
# # Create a client object. The client can be reused for multiple calls.
|
352
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
353
|
+
#
|
354
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
355
|
+
# request = Google::Cloud::Recommender::V1::GetInsightRequest.new
|
356
|
+
#
|
357
|
+
# # Call the get_insight method.
|
358
|
+
# result = client.get_insight request
|
359
|
+
#
|
360
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Insight.
|
361
|
+
# p result
|
362
|
+
#
|
302
363
|
def get_insight request, options = nil
|
303
364
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
304
365
|
|
@@ -379,6 +440,21 @@ module Google
|
|
379
440
|
#
|
380
441
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
381
442
|
#
|
443
|
+
# @example Basic example
|
444
|
+
# require "google/cloud/recommender/v1"
|
445
|
+
#
|
446
|
+
# # Create a client object. The client can be reused for multiple calls.
|
447
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
448
|
+
#
|
449
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
450
|
+
# request = Google::Cloud::Recommender::V1::MarkInsightAcceptedRequest.new
|
451
|
+
#
|
452
|
+
# # Call the mark_insight_accepted method.
|
453
|
+
# result = client.mark_insight_accepted request
|
454
|
+
#
|
455
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Insight.
|
456
|
+
# p result
|
457
|
+
#
|
382
458
|
def mark_insight_accepted request, options = nil
|
383
459
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
384
460
|
|
@@ -421,8 +497,8 @@ module Google
|
|
421
497
|
end
|
422
498
|
|
423
499
|
##
|
424
|
-
# Lists recommendations for
|
425
|
-
# IAM permission for the specified recommender.
|
500
|
+
# Lists recommendations for the specified Cloud Resource. Requires the
|
501
|
+
# recommender.*.list IAM permission for the specified recommender.
|
426
502
|
#
|
427
503
|
# @overload list_recommendations(request, options = nil)
|
428
504
|
# Pass arguments to `list_recommendations` via a request object, either of type
|
@@ -443,8 +519,15 @@ module Google
|
|
443
519
|
# Required. The container resource on which to execute the request.
|
444
520
|
# Acceptable formats:
|
445
521
|
#
|
446
|
-
#
|
447
|
-
#
|
522
|
+
# * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
523
|
+
#
|
524
|
+
# * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
525
|
+
#
|
526
|
+
# * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
527
|
+
#
|
528
|
+
# * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
529
|
+
#
|
530
|
+
# * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
448
531
|
#
|
449
532
|
# LOCATION here refers to GCP Locations:
|
450
533
|
# https://cloud.google.com/about/locations/
|
@@ -461,8 +544,26 @@ module Google
|
|
461
544
|
# to those in the previous call.
|
462
545
|
# @param filter [::String]
|
463
546
|
# Filter expression to restrict the recommendations returned. Supported
|
464
|
-
# filter fields:
|
465
|
-
#
|
547
|
+
# filter fields:
|
548
|
+
#
|
549
|
+
# * `state_info.state`
|
550
|
+
#
|
551
|
+
# * `recommenderSubtype`
|
552
|
+
#
|
553
|
+
# * `priority`
|
554
|
+
#
|
555
|
+
# Examples:
|
556
|
+
#
|
557
|
+
# * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
|
558
|
+
#
|
559
|
+
# * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE`
|
560
|
+
#
|
561
|
+
# * `priority = P1 OR priority = P2`
|
562
|
+
#
|
563
|
+
# * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)`
|
564
|
+
#
|
565
|
+
# (These expressions are based on the filter language described at
|
566
|
+
# https://google.aip.dev/160)
|
466
567
|
#
|
467
568
|
# @yield [response, operation] Access the result along with the RPC operation
|
468
569
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Recommender::V1::Recommendation>]
|
@@ -472,6 +573,27 @@ module Google
|
|
472
573
|
#
|
473
574
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
474
575
|
#
|
576
|
+
# @example Basic example
|
577
|
+
# require "google/cloud/recommender/v1"
|
578
|
+
#
|
579
|
+
# # Create a client object. The client can be reused for multiple calls.
|
580
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
581
|
+
#
|
582
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
583
|
+
# request = Google::Cloud::Recommender::V1::ListRecommendationsRequest.new
|
584
|
+
#
|
585
|
+
# # Call the list_recommendations method.
|
586
|
+
# result = client.list_recommendations request
|
587
|
+
#
|
588
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
589
|
+
# # iterate over all elements by calling #each, and the enumerable
|
590
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
591
|
+
# # methods are also available for managing paging directly.
|
592
|
+
# result.each do |response|
|
593
|
+
# # Each element is of type ::Google::Cloud::Recommender::V1::Recommendation.
|
594
|
+
# p response
|
595
|
+
# end
|
596
|
+
#
|
475
597
|
def list_recommendations request, options = nil
|
476
598
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
477
599
|
|
@@ -544,6 +666,21 @@ module Google
|
|
544
666
|
#
|
545
667
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
546
668
|
#
|
669
|
+
# @example Basic example
|
670
|
+
# require "google/cloud/recommender/v1"
|
671
|
+
#
|
672
|
+
# # Create a client object. The client can be reused for multiple calls.
|
673
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
674
|
+
#
|
675
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
676
|
+
# request = Google::Cloud::Recommender::V1::GetRecommendationRequest.new
|
677
|
+
#
|
678
|
+
# # Call the get_recommendation method.
|
679
|
+
# result = client.get_recommendation request
|
680
|
+
#
|
681
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
682
|
+
# p result
|
683
|
+
#
|
547
684
|
def get_recommendation request, options = nil
|
548
685
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
549
686
|
|
@@ -630,6 +767,21 @@ module Google
|
|
630
767
|
#
|
631
768
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
632
769
|
#
|
770
|
+
# @example Basic example
|
771
|
+
# require "google/cloud/recommender/v1"
|
772
|
+
#
|
773
|
+
# # Create a client object. The client can be reused for multiple calls.
|
774
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
775
|
+
#
|
776
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
777
|
+
# request = Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest.new
|
778
|
+
#
|
779
|
+
# # Call the mark_recommendation_claimed method.
|
780
|
+
# result = client.mark_recommendation_claimed request
|
781
|
+
#
|
782
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
783
|
+
# p result
|
784
|
+
#
|
633
785
|
def mark_recommendation_claimed request, options = nil
|
634
786
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
635
787
|
|
@@ -717,6 +869,21 @@ module Google
|
|
717
869
|
#
|
718
870
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
719
871
|
#
|
872
|
+
# @example Basic example
|
873
|
+
# require "google/cloud/recommender/v1"
|
874
|
+
#
|
875
|
+
# # Create a client object. The client can be reused for multiple calls.
|
876
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
877
|
+
#
|
878
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
879
|
+
# request = Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest.new
|
880
|
+
#
|
881
|
+
# # Call the mark_recommendation_succeeded method.
|
882
|
+
# result = client.mark_recommendation_succeeded request
|
883
|
+
#
|
884
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
885
|
+
# p result
|
886
|
+
#
|
720
887
|
def mark_recommendation_succeeded request, options = nil
|
721
888
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
722
889
|
|
@@ -804,6 +971,21 @@ module Google
|
|
804
971
|
#
|
805
972
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
806
973
|
#
|
974
|
+
# @example Basic example
|
975
|
+
# require "google/cloud/recommender/v1"
|
976
|
+
#
|
977
|
+
# # Create a client object. The client can be reused for multiple calls.
|
978
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
979
|
+
#
|
980
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
981
|
+
# request = Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest.new
|
982
|
+
#
|
983
|
+
# # Call the mark_recommendation_failed method.
|
984
|
+
# result = client.mark_recommendation_failed request
|
985
|
+
#
|
986
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
987
|
+
# p result
|
988
|
+
#
|
807
989
|
def mark_recommendation_failed request, options = nil
|
808
990
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
809
991
|
|
@@ -36,8 +36,8 @@ module Google
|
|
36
36
|
self.unmarshal_class_method = :decode
|
37
37
|
self.service_name = 'google.cloud.recommender.v1.Recommender'
|
38
38
|
|
39
|
-
# Lists insights for
|
40
|
-
# permission for the specified insight type.
|
39
|
+
# Lists insights for the specified Cloud Resource. Requires the
|
40
|
+
# recommender.*.list IAM permission for the specified insight type.
|
41
41
|
rpc :ListInsights, ::Google::Cloud::Recommender::V1::ListInsightsRequest, ::Google::Cloud::Recommender::V1::ListInsightsResponse
|
42
42
|
# Gets the requested insight. Requires the recommender.*.get IAM permission
|
43
43
|
# for the specified insight type.
|
@@ -49,8 +49,8 @@ module Google
|
|
49
49
|
# MarkInsightAccepted can be applied to insights in ACTIVE state. Requires
|
50
50
|
# the recommender.*.update IAM permission for the specified insight.
|
51
51
|
rpc :MarkInsightAccepted, ::Google::Cloud::Recommender::V1::MarkInsightAcceptedRequest, ::Google::Cloud::Recommender::V1::Insight
|
52
|
-
# Lists recommendations for
|
53
|
-
# IAM permission for the specified recommender.
|
52
|
+
# Lists recommendations for the specified Cloud Resource. Requires the
|
53
|
+
# recommender.*.list IAM permission for the specified recommender.
|
54
54
|
rpc :ListRecommendations, ::Google::Cloud::Recommender::V1::ListRecommendationsRequest, ::Google::Cloud::Recommender::V1::ListRecommendationsResponse
|
55
55
|
# Gets the requested recommendation. Requires the recommender.*.get
|
56
56
|
# IAM permission for the specified recommender.
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -54,6 +54,9 @@ module Google
|
|
54
54
|
# @!attribute [rw] category
|
55
55
|
# @return [::Google::Cloud::Recommender::V1::Insight::Category]
|
56
56
|
# Category being targeted by the insight.
|
57
|
+
# @!attribute [rw] severity
|
58
|
+
# @return [::Google::Cloud::Recommender::V1::Insight::Severity]
|
59
|
+
# Insight's severity.
|
57
60
|
# @!attribute [rw] etag
|
58
61
|
# @return [::String]
|
59
62
|
# Fingerprint of the Insight. Provides optimistic locking when updating
|
@@ -92,6 +95,24 @@ module Google
|
|
92
95
|
# This insight is related to manageability.
|
93
96
|
MANAGEABILITY = 4
|
94
97
|
end
|
98
|
+
|
99
|
+
# Insight severity levels.
|
100
|
+
module Severity
|
101
|
+
# Insight has unspecified severity.
|
102
|
+
SEVERITY_UNSPECIFIED = 0
|
103
|
+
|
104
|
+
# Insight has low severity.
|
105
|
+
LOW = 1
|
106
|
+
|
107
|
+
# Insight has medium severity.
|
108
|
+
MEDIUM = 2
|
109
|
+
|
110
|
+
# Insight has high severity.
|
111
|
+
HIGH = 3
|
112
|
+
|
113
|
+
# Insight has critical severity.
|
114
|
+
CRITICAL = 4
|
115
|
+
end
|
95
116
|
end
|
96
117
|
|
97
118
|
# Information related to insight state.
|
@@ -54,6 +54,9 @@ module Google
|
|
54
54
|
# Optional set of additional impact that this recommendation may have when
|
55
55
|
# trying to optimize for the primary category. These may be positive
|
56
56
|
# or negative.
|
57
|
+
# @!attribute [rw] priority
|
58
|
+
# @return [::Google::Cloud::Recommender::V1::Recommendation::Priority]
|
59
|
+
# Recommendation's priority.
|
57
60
|
# @!attribute [rw] content
|
58
61
|
# @return [::Google::Cloud::Recommender::V1::RecommendationContent]
|
59
62
|
# Content of the recommendation describing recommended changes to resources.
|
@@ -67,6 +70,12 @@ module Google
|
|
67
70
|
# @!attribute [rw] associated_insights
|
68
71
|
# @return [::Array<::Google::Cloud::Recommender::V1::Recommendation::InsightReference>]
|
69
72
|
# Insights that led to this recommendation.
|
73
|
+
# @!attribute [rw] xor_group_id
|
74
|
+
# @return [::String]
|
75
|
+
# Corresponds to a mutually exclusive group ID within a recommender.
|
76
|
+
# A non-empty ID indicates that the recommendation belongs to a mutually
|
77
|
+
# exclusive group. This means that only one recommendation within the group
|
78
|
+
# is suggested to be applied.
|
70
79
|
class Recommendation
|
71
80
|
include ::Google::Protobuf::MessageExts
|
72
81
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -80,6 +89,24 @@ module Google
|
|
80
89
|
include ::Google::Protobuf::MessageExts
|
81
90
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
82
91
|
end
|
92
|
+
|
93
|
+
# Recommendation priority levels.
|
94
|
+
module Priority
|
95
|
+
# Recommendation has unspecified priority.
|
96
|
+
PRIORITY_UNSPECIFIED = 0
|
97
|
+
|
98
|
+
# Recommendation has P4 priority (lowest priority).
|
99
|
+
P4 = 1
|
100
|
+
|
101
|
+
# Recommendation has P3 priority (second lowest priority).
|
102
|
+
P3 = 2
|
103
|
+
|
104
|
+
# Recommendation has P2 priority (second highest priority).
|
105
|
+
P2 = 3
|
106
|
+
|
107
|
+
# Recommendation has P1 priority (highest priority).
|
108
|
+
P1 = 4
|
109
|
+
end
|
83
110
|
end
|
84
111
|
|
85
112
|
# Contains what resources are changing and how they are changing.
|
@@ -88,6 +115,9 @@ module Google
|
|
88
115
|
# Operations to one or more Google Cloud resources grouped in such a way
|
89
116
|
# that, all operations within one group are expected to be performed
|
90
117
|
# atomically and in an order.
|
118
|
+
# @!attribute [rw] overview
|
119
|
+
# @return [::Google::Protobuf::Struct]
|
120
|
+
# Condensed overview information about the recommendation.
|
91
121
|
class RecommendationContent
|
92
122
|
include ::Google::Protobuf::MessageExts
|
93
123
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -114,7 +144,7 @@ module Google
|
|
114
144
|
# See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
|
115
145
|
# @!attribute [rw] action
|
116
146
|
# @return [::String]
|
117
|
-
# Type of this operation. Contains one of '
|
147
|
+
# Type of this operation. Contains one of 'add', 'remove', 'replace', 'move',
|
118
148
|
# 'copy', 'test' and custom operations. This field is case-insensitive and
|
119
149
|
# always populated.
|
120
150
|
# @!attribute [rw] resource_type
|
@@ -184,7 +214,7 @@ module Google
|
|
184
214
|
# @!attribute [rw] path_value_matchers
|
185
215
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Recommender::V1::ValueMatcher}]
|
186
216
|
# Similar to path_filters, this contains set of filters to apply if `path`
|
187
|
-
# field
|
217
|
+
# field refers to array elements. This is meant to support value matching
|
188
218
|
# beyond exact match. To perform exact match, use path_filters.
|
189
219
|
# When both path_filters and path_value_matchers are set, an implicit AND
|
190
220
|
# must be performed.
|
@@ -228,6 +258,9 @@ module Google
|
|
228
258
|
# An approximate projection on amount saved or amount incurred. Negative cost
|
229
259
|
# units indicate cost savings and positive cost units indicate increase.
|
230
260
|
# See google.type.Money documentation for positive/negative units.
|
261
|
+
#
|
262
|
+
# A user's permissions may affect whether the cost is computed using list
|
263
|
+
# prices or custom contract prices.
|
231
264
|
# @!attribute [rw] duration
|
232
265
|
# @return [::Google::Protobuf::Duration]
|
233
266
|
# Duration for which this cost applies.
|
@@ -236,6 +269,15 @@ module Google
|
|
236
269
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
237
270
|
end
|
238
271
|
|
272
|
+
# Contains various ways of describing the impact on Security.
|
273
|
+
# @!attribute [rw] details
|
274
|
+
# @return [::Google::Protobuf::Struct]
|
275
|
+
# Additional security impact details that is provided by the recommender.
|
276
|
+
class SecurityProjection
|
277
|
+
include ::Google::Protobuf::MessageExts
|
278
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
279
|
+
end
|
280
|
+
|
239
281
|
# Contains the impact a recommendation can have for a given category.
|
240
282
|
# @!attribute [rw] category
|
241
283
|
# @return [::Google::Cloud::Recommender::V1::Impact::Category]
|
@@ -243,6 +285,9 @@ module Google
|
|
243
285
|
# @!attribute [rw] cost_projection
|
244
286
|
# @return [::Google::Cloud::Recommender::V1::CostProjection]
|
245
287
|
# Use with CategoryType.COST
|
288
|
+
# @!attribute [rw] security_projection
|
289
|
+
# @return [::Google::Cloud::Recommender::V1::SecurityProjection]
|
290
|
+
# Use with CategoryType.SECURITY
|
246
291
|
class Impact
|
247
292
|
include ::Google::Protobuf::MessageExts
|
248
293
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -27,13 +27,20 @@ module Google
|
|
27
27
|
# Required. The container resource on which to execute the request.
|
28
28
|
# Acceptable formats:
|
29
29
|
#
|
30
|
-
#
|
31
|
-
#
|
30
|
+
# * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
31
|
+
#
|
32
|
+
# * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
33
|
+
#
|
34
|
+
# * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
35
|
+
#
|
36
|
+
# * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
37
|
+
#
|
38
|
+
# * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]`
|
32
39
|
#
|
33
40
|
# LOCATION here refers to GCP Locations:
|
34
41
|
# https://cloud.google.com/about/locations/
|
35
42
|
# INSIGHT_TYPE_ID refers to supported insight types:
|
36
|
-
# https://cloud.google.com/recommender/docs/insights/insight-types.
|
43
|
+
# https://cloud.google.com/recommender/docs/insights/insight-types.
|
37
44
|
# @!attribute [rw] page_size
|
38
45
|
# @return [::Integer]
|
39
46
|
# Optional. The maximum number of results to return from this request. Non-positive
|
@@ -48,8 +55,26 @@ module Google
|
|
48
55
|
# @!attribute [rw] filter
|
49
56
|
# @return [::String]
|
50
57
|
# Optional. Filter expression to restrict the insights returned. Supported
|
51
|
-
# filter fields:
|
52
|
-
#
|
58
|
+
# filter fields:
|
59
|
+
#
|
60
|
+
# * `stateInfo.state`
|
61
|
+
#
|
62
|
+
# * `insightSubtype`
|
63
|
+
#
|
64
|
+
# * `severity`
|
65
|
+
#
|
66
|
+
# Examples:
|
67
|
+
#
|
68
|
+
# * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
|
69
|
+
#
|
70
|
+
# * `insightSubtype = PERMISSIONS_USAGE`
|
71
|
+
#
|
72
|
+
# * `severity = CRITICAL OR severity = HIGH`
|
73
|
+
#
|
74
|
+
# * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)`
|
75
|
+
#
|
76
|
+
# (These expressions are based on the filter language described at
|
77
|
+
# https://google.aip.dev/160)
|
53
78
|
class ListInsightsRequest
|
54
79
|
include ::Google::Protobuf::MessageExts
|
55
80
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -108,8 +133,15 @@ module Google
|
|
108
133
|
# Required. The container resource on which to execute the request.
|
109
134
|
# Acceptable formats:
|
110
135
|
#
|
111
|
-
#
|
112
|
-
#
|
136
|
+
# * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
137
|
+
#
|
138
|
+
# * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
139
|
+
#
|
140
|
+
# * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
141
|
+
#
|
142
|
+
# * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
143
|
+
#
|
144
|
+
# * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]`
|
113
145
|
#
|
114
146
|
# LOCATION here refers to GCP Locations:
|
115
147
|
# https://cloud.google.com/about/locations/
|
@@ -129,8 +161,26 @@ module Google
|
|
129
161
|
# @!attribute [rw] filter
|
130
162
|
# @return [::String]
|
131
163
|
# Filter expression to restrict the recommendations returned. Supported
|
132
|
-
# filter fields:
|
133
|
-
#
|
164
|
+
# filter fields:
|
165
|
+
#
|
166
|
+
# * `state_info.state`
|
167
|
+
#
|
168
|
+
# * `recommenderSubtype`
|
169
|
+
#
|
170
|
+
# * `priority`
|
171
|
+
#
|
172
|
+
# Examples:
|
173
|
+
#
|
174
|
+
# * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED`
|
175
|
+
#
|
176
|
+
# * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE`
|
177
|
+
#
|
178
|
+
# * `priority = P1 OR priority = P2`
|
179
|
+
#
|
180
|
+
# * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)`
|
181
|
+
#
|
182
|
+
# (These expressions are based on the filter language described at
|
183
|
+
# https://google.aip.dev/160)
|
134
184
|
class ListRecommendationsRequest
|
135
185
|
include ::Google::Protobuf::MessageExts
|
136
186
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-recommender-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
|
-
rubygems_version: 3.
|
212
|
+
rubygems_version: 3.3.5
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: API Client library for the Recommender V1 API
|