google-apis-recommender_v1 0.1.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14fd323be59984e99e9863b90528ec5f4b1a4b25c907b3ce568c44cf0876ca2b
4
- data.tar.gz: 3ee8667cd09dfe5baaaab2034f255d44d68eac79e79591b33a84b3280186b792
3
+ metadata.gz: d7734955e85ab3a0ab81b7e4b798554211e4f3faa5be7b29d11cc8218f411611
4
+ data.tar.gz: 12e060222999ebc282a187b6da48d45b569038f80b52565e8afaf5b03d74d2aa
5
5
  SHA512:
6
- metadata.gz: 28b68f982ba69a6e0d468b67c0a6e7ed8a5a4484747e2567fb761bf2ed50de0a3303e3a9358f5f25717f7b0b4cd3018723dc0a10d976e8fb8a22595f3fed5dfb
7
- data.tar.gz: 5726184f06e1b87f4f831fc901e429b1d12034cdaff75c56a2bc0a4a8dc4d9d3010dba5611ff53e3191340849d84ade9c5d792cc4da147585ed1b0722f4696d6
6
+ metadata.gz: c6890ccaa552edddffff58096cded2813f535b748031a365d8d9b22cc9c92cb7ca50216b5239492727f353713c463f589e37e3a6f3b3e33c6b2fb0474446935c
7
+ data.tar.gz: afcd640bf46a960deecd650895770dd6e8691162198e1586e0d64c30daa0c2a53d3296be4a05715b9ebf6f2e43c98b5c8dc8f4471d36828b90352609952e65c9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release history for google-apis-recommender_v1
2
2
 
3
+ ### v0.6.0 (2021-05-13)
4
+
5
+ * Regenerated from discovery document revision 20210510
6
+
7
+ ### v0.5.0 (2021-03-24)
8
+
9
+ * Regenerated from discovery document revision 20210319
10
+
11
+ ### v0.4.0 (2021-03-10)
12
+
13
+ * Regenerated from discovery document revision 20210307
14
+ * Regenerated using generator version 0.2.0
15
+
16
+ ### v0.3.0 (2021-03-04)
17
+
18
+ * Regenerated from discovery document revision 20210227
19
+
20
+ ### v0.2.0 (2021-01-21)
21
+
22
+ * Regenerated from discovery document revision 20210118
23
+ * Regenerated using generator version 0.1.2
24
+
3
25
  ### v0.1.0 (2021-01-07)
4
26
 
5
27
  * Regenerated using generator version 0.1.1
@@ -29,7 +29,7 @@ module Google
29
29
  # This is NOT the gem version.
30
30
  VERSION = 'V1'
31
31
 
32
- # View and manage your data across Google Cloud Platform services
32
+ # See, edit, configure, and delete your Google Cloud Platform data
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
34
  end
35
35
  end
@@ -61,6 +61,11 @@ module Google
61
61
  # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1CostProjection]
62
62
  attr_accessor :cost_projection
63
63
 
64
+ # Contains various ways of describing the impact on Security.
65
+ # Corresponds to the JSON property `securityProjection`
66
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1SecurityProjection]
67
+ attr_accessor :security_projection
68
+
64
69
  def initialize(**args)
65
70
  update!(**args)
66
71
  end
@@ -69,6 +74,7 @@ module Google
69
74
  def update!(**args)
70
75
  @category = args[:category] if args.key?(:category)
71
76
  @cost_projection = args[:cost_projection] if args.key?(:cost_projection)
77
+ @security_projection = args[:security_projection] if args.key?(:security_projection)
72
78
  end
73
79
  end
74
80
 
@@ -126,6 +132,11 @@ module Google
126
132
  # @return [String]
127
133
  attr_accessor :observation_period
128
134
 
135
+ # Insight's severity.
136
+ # Corresponds to the JSON property `severity`
137
+ # @return [String]
138
+ attr_accessor :severity
139
+
129
140
  # Information related to insight state.
130
141
  # Corresponds to the JSON property `stateInfo`
131
142
  # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1InsightStateInfo]
@@ -151,6 +162,7 @@ module Google
151
162
  @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
152
163
  @name = args[:name] if args.key?(:name)
153
164
  @observation_period = args[:observation_period] if args.key?(:observation_period)
165
+ @severity = args[:severity] if args.key?(:severity)
154
166
  @state_info = args[:state_info] if args.key?(:state_info)
155
167
  @target_resources = args[:target_resources] if args.key?(:target_resources)
156
168
  end
@@ -396,9 +408,9 @@ module Google
396
408
  attr_accessor :path_filters
397
409
 
398
410
  # Similar to path_filters, this contains set of filters to apply if `path` field
399
- # referes to array elements. This is meant to support value matching beyond
400
- # exact match. To perform exact match, use path_filters. When both path_filters
401
- # and path_value_matchers are set, an implicit AND must be performed.
411
+ # refers to array elements. This is meant to support value matching beyond exact
412
+ # match. To perform exact match, use path_filters. When both path_filters and
413
+ # path_value_matchers are set, an implicit AND must be performed.
402
414
  # Corresponds to the JSON property `pathValueMatchers`
403
415
  # @return [Hash<String,Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ValueMatcher>]
404
416
  attr_accessor :path_value_matchers
@@ -530,6 +542,11 @@ module Google
530
542
  # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact]
531
543
  attr_accessor :primary_impact
532
544
 
545
+ # Recommendation's priority.
546
+ # Corresponds to the JSON property `priority`
547
+ # @return [String]
548
+ attr_accessor :priority
549
+
533
550
  # Contains an identifier for a subtype of recommendations produced for the same
534
551
  # recommender. Subtype is a function of content and impact, meaning a new
535
552
  # subtype might be added when significant changes to `content` or `
@@ -560,6 +577,7 @@ module Google
560
577
  @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
561
578
  @name = args[:name] if args.key?(:name)
562
579
  @primary_impact = args[:primary_impact] if args.key?(:primary_impact)
580
+ @priority = args[:priority] if args.key?(:priority)
563
581
  @recommender_subtype = args[:recommender_subtype] if args.key?(:recommender_subtype)
564
582
  @state_info = args[:state_info] if args.key?(:state_info)
565
583
  end
@@ -631,6 +649,25 @@ module Google
631
649
  end
632
650
  end
633
651
 
652
+ # Contains various ways of describing the impact on Security.
653
+ class GoogleCloudRecommenderV1SecurityProjection
654
+ include Google::Apis::Core::Hashable
655
+
656
+ # Additional security impact details that is provided by the recommender.
657
+ # Corresponds to the JSON property `details`
658
+ # @return [Hash<String,Object>]
659
+ attr_accessor :details
660
+
661
+ def initialize(**args)
662
+ update!(**args)
663
+ end
664
+
665
+ # Update properties of this object
666
+ def update!(**args)
667
+ @details = args[:details] if args.key?(:details)
668
+ end
669
+ end
670
+
634
671
  # Contains various matching options for values for a GCP resource field.
635
672
  class GoogleCloudRecommenderV1ValueMatcher
636
673
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module RecommenderV1
18
18
  # Version of the google-apis-recommender_v1 gem
19
- GEM_VERSION = "0.1.0"
19
+ GEM_VERSION = "0.6.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.1"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20201113"
25
+ REVISION = "20210510"
26
26
  end
27
27
  end
28
28
  end
@@ -124,6 +124,12 @@ module Google
124
124
  include Google::Apis::Core::JsonObjectSupport
125
125
  end
126
126
 
127
+ class GoogleCloudRecommenderV1SecurityProjection
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
127
133
  class GoogleCloudRecommenderV1ValueMatcher
128
134
  class Representation < Google::Apis::Core::JsonRepresentation; end
129
135
 
@@ -151,6 +157,8 @@ module Google
151
157
  property :category, as: 'category'
152
158
  property :cost_projection, as: 'costProjection', class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1CostProjection, decorator: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1CostProjection::Representation
153
159
 
160
+ property :security_projection, as: 'securityProjection', class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1SecurityProjection, decorator: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1SecurityProjection::Representation
161
+
154
162
  end
155
163
  end
156
164
 
@@ -167,6 +175,7 @@ module Google
167
175
  property :last_refresh_time, as: 'lastRefreshTime'
168
176
  property :name, as: 'name'
169
177
  property :observation_period, as: 'observationPeriod'
178
+ property :severity, as: 'severity'
170
179
  property :state_info, as: 'stateInfo', class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1InsightStateInfo, decorator: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1InsightStateInfo::Representation
171
180
 
172
181
  collection :target_resources, as: 'targetResources'
@@ -279,6 +288,7 @@ module Google
279
288
  property :name, as: 'name'
280
289
  property :primary_impact, as: 'primaryImpact', class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact, decorator: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact::Representation
281
290
 
291
+ property :priority, as: 'priority'
282
292
  property :recommender_subtype, as: 'recommenderSubtype'
283
293
  property :state_info, as: 'stateInfo', class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationStateInfo, decorator: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationStateInfo::Representation
284
294
 
@@ -308,6 +318,13 @@ module Google
308
318
  end
309
319
  end
310
320
 
321
+ class GoogleCloudRecommenderV1SecurityProjection
322
+ # @private
323
+ class Representation < Google::Apis::Core::JsonRepresentation
324
+ hash :details, as: 'details'
325
+ end
326
+ end
327
+
311
328
  class GoogleCloudRecommenderV1ValueMatcher
312
329
  # @private
313
330
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -49,6 +49,1005 @@ module Google
49
49
  @batch_path = 'batch'
50
50
  end
51
51
 
52
+ # Gets the requested insight. Requires the recommender.*.get IAM permission for
53
+ # the specified insight type.
54
+ # @param [String] name
55
+ # Required. Name of the insight.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_billing_account_location_insight_type_insight(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1/{+name}', options)
75
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight::Representation
76
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists insights for a Cloud project. Requires the recommender.*.list IAM
84
+ # permission for the specified insight type.
85
+ # @param [String] parent
86
+ # Required. The container resource on which to execute the request. Acceptable
87
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
88
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
89
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
90
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
91
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
92
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
93
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
94
+ # insight-types.
95
+ # @param [String] filter
96
+ # Optional. Filter expression to restrict the insights returned. Supported
97
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
98
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
99
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
100
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
101
+ # expressions are based on the filter language described at https://google.aip.
102
+ # dev/160)
103
+ # @param [Fixnum] page_size
104
+ # Optional. The maximum number of results to return from this request. Non-
105
+ # positive values are ignored. If not specified, the server will determine the
106
+ # number of results to return.
107
+ # @param [String] page_token
108
+ # Optional. If present, retrieves the next batch of results from the preceding
109
+ # call to this method. `page_token` must be the value of `next_page_token` from
110
+ # the previous response. The values of other method parameters must be identical
111
+ # to those in the previous call.
112
+ # @param [String] fields
113
+ # Selector specifying which fields to include in a partial response.
114
+ # @param [String] quota_user
115
+ # Available to use for quota purposes for server-side applications. Can be any
116
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
117
+ # @param [Google::Apis::RequestOptions] options
118
+ # Request-specific options
119
+ #
120
+ # @yield [result, err] Result & error if block supplied
121
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse] parsed result object
122
+ # @yieldparam err [StandardError] error object if request failed
123
+ #
124
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse]
125
+ #
126
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
127
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
128
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
129
+ def list_billing_account_location_insight_type_insights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
130
+ command = make_simple_command(:get, 'v1/{+parent}/insights', options)
131
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse::Representation
132
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse
133
+ command.params['parent'] = parent unless parent.nil?
134
+ command.query['filter'] = filter unless filter.nil?
135
+ command.query['pageSize'] = page_size unless page_size.nil?
136
+ command.query['pageToken'] = page_token unless page_token.nil?
137
+ command.query['fields'] = fields unless fields.nil?
138
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
139
+ execute_or_queue_command(command, &block)
140
+ end
141
+
142
+ # Marks the Insight State as Accepted. Users can use this method to indicate to
143
+ # the Recommender API that they have applied some action based on the insight.
144
+ # This stops the insight content from being updated. MarkInsightAccepted can be
145
+ # applied to insights in ACTIVE state. Requires the recommender.*.update IAM
146
+ # permission for the specified insight.
147
+ # @param [String] name
148
+ # Required. Name of the insight.
149
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkInsightAcceptedRequest] google_cloud_recommender_v1_mark_insight_accepted_request_object
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
152
+ # @param [String] quota_user
153
+ # Available to use for quota purposes for server-side applications. Can be any
154
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
155
+ # @param [Google::Apis::RequestOptions] options
156
+ # Request-specific options
157
+ #
158
+ # @yield [result, err] Result & error if block supplied
159
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight] parsed result object
160
+ # @yieldparam err [StandardError] error object if request failed
161
+ #
162
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight]
163
+ #
164
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
165
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
166
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
167
+ def mark_billing_account_location_insight_type_insight_accepted(name, google_cloud_recommender_v1_mark_insight_accepted_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
168
+ command = make_simple_command(:post, 'v1/{+name}:markAccepted', options)
169
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkInsightAcceptedRequest::Representation
170
+ command.request_object = google_cloud_recommender_v1_mark_insight_accepted_request_object
171
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight::Representation
172
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight
173
+ command.params['name'] = name unless name.nil?
174
+ command.query['fields'] = fields unless fields.nil?
175
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
176
+ execute_or_queue_command(command, &block)
177
+ end
178
+
179
+ # Gets the requested recommendation. Requires the recommender.*.get IAM
180
+ # permission for the specified recommender.
181
+ # @param [String] name
182
+ # Required. Name of the recommendation.
183
+ # @param [String] fields
184
+ # Selector specifying which fields to include in a partial response.
185
+ # @param [String] quota_user
186
+ # Available to use for quota purposes for server-side applications. Can be any
187
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
188
+ # @param [Google::Apis::RequestOptions] options
189
+ # Request-specific options
190
+ #
191
+ # @yield [result, err] Result & error if block supplied
192
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
193
+ # @yieldparam err [StandardError] error object if request failed
194
+ #
195
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
196
+ #
197
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
198
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
199
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
200
+ def get_billing_account_location_recommender_recommendation(name, fields: nil, quota_user: nil, options: nil, &block)
201
+ command = make_simple_command(:get, 'v1/{+name}', options)
202
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
203
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
204
+ command.params['name'] = name unless name.nil?
205
+ command.query['fields'] = fields unless fields.nil?
206
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
207
+ execute_or_queue_command(command, &block)
208
+ end
209
+
210
+ # Lists recommendations for a Cloud project. Requires the recommender.*.list IAM
211
+ # permission for the specified recommender.
212
+ # @param [String] parent
213
+ # Required. The container resource on which to execute the request. Acceptable
214
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
215
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
216
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
217
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
218
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
219
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
220
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
221
+ # @param [String] filter
222
+ # Filter expression to restrict the recommendations returned. Supported filter
223
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
224
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
225
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
226
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
227
+ # ` (These expressions are based on the filter language described at https://
228
+ # google.aip.dev/160)
229
+ # @param [Fixnum] page_size
230
+ # Optional. The maximum number of results to return from this request. Non-
231
+ # positive values are ignored. If not specified, the server will determine the
232
+ # number of results to return.
233
+ # @param [String] page_token
234
+ # Optional. If present, retrieves the next batch of results from the preceding
235
+ # call to this method. `page_token` must be the value of `next_page_token` from
236
+ # the previous response. The values of other method parameters must be identical
237
+ # to those in the previous call.
238
+ # @param [String] fields
239
+ # Selector specifying which fields to include in a partial response.
240
+ # @param [String] quota_user
241
+ # Available to use for quota purposes for server-side applications. Can be any
242
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
243
+ # @param [Google::Apis::RequestOptions] options
244
+ # Request-specific options
245
+ #
246
+ # @yield [result, err] Result & error if block supplied
247
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse] parsed result object
248
+ # @yieldparam err [StandardError] error object if request failed
249
+ #
250
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse]
251
+ #
252
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
253
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
254
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
255
+ def list_billing_account_location_recommender_recommendations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
256
+ command = make_simple_command(:get, 'v1/{+parent}/recommendations', options)
257
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse::Representation
258
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse
259
+ command.params['parent'] = parent unless parent.nil?
260
+ command.query['filter'] = filter unless filter.nil?
261
+ command.query['pageSize'] = page_size unless page_size.nil?
262
+ command.query['pageToken'] = page_token unless page_token.nil?
263
+ command.query['fields'] = fields unless fields.nil?
264
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
265
+ execute_or_queue_command(command, &block)
266
+ end
267
+
268
+ # Marks the Recommendation State as Claimed. Users can use this method to
269
+ # indicate to the Recommender API that they are starting to apply the
270
+ # recommendation themselves. This stops the recommendation content from being
271
+ # updated. Associated insights are frozen and placed in the ACCEPTED state.
272
+ # MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
273
+ # SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM
274
+ # permission for the specified recommender.
275
+ # @param [String] name
276
+ # Required. Name of the recommendation.
277
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationClaimedRequest] google_cloud_recommender_v1_mark_recommendation_claimed_request_object
278
+ # @param [String] fields
279
+ # Selector specifying which fields to include in a partial response.
280
+ # @param [String] quota_user
281
+ # Available to use for quota purposes for server-side applications. Can be any
282
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
283
+ # @param [Google::Apis::RequestOptions] options
284
+ # Request-specific options
285
+ #
286
+ # @yield [result, err] Result & error if block supplied
287
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
288
+ # @yieldparam err [StandardError] error object if request failed
289
+ #
290
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
291
+ #
292
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
293
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
294
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
295
+ def mark_billing_account_location_recommender_recommendation_claimed(name, google_cloud_recommender_v1_mark_recommendation_claimed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
296
+ command = make_simple_command(:post, 'v1/{+name}:markClaimed', options)
297
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationClaimedRequest::Representation
298
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_claimed_request_object
299
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
300
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
301
+ command.params['name'] = name unless name.nil?
302
+ command.query['fields'] = fields unless fields.nil?
303
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
304
+ execute_or_queue_command(command, &block)
305
+ end
306
+
307
+ # Marks the Recommendation State as Failed. Users can use this method to
308
+ # indicate to the Recommender API that they have applied the recommendation
309
+ # themselves, and the operation failed. This stops the recommendation content
310
+ # from being updated. Associated insights are frozen and placed in the ACCEPTED
311
+ # state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
312
+ # CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
313
+ # permission for the specified recommender.
314
+ # @param [String] name
315
+ # Required. Name of the recommendation.
316
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationFailedRequest] google_cloud_recommender_v1_mark_recommendation_failed_request_object
317
+ # @param [String] fields
318
+ # Selector specifying which fields to include in a partial response.
319
+ # @param [String] quota_user
320
+ # Available to use for quota purposes for server-side applications. Can be any
321
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
322
+ # @param [Google::Apis::RequestOptions] options
323
+ # Request-specific options
324
+ #
325
+ # @yield [result, err] Result & error if block supplied
326
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
327
+ # @yieldparam err [StandardError] error object if request failed
328
+ #
329
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
330
+ #
331
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
332
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
333
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
334
+ def mark_billing_account_location_recommender_recommendation_failed(name, google_cloud_recommender_v1_mark_recommendation_failed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
335
+ command = make_simple_command(:post, 'v1/{+name}:markFailed', options)
336
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationFailedRequest::Representation
337
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_failed_request_object
338
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
339
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
340
+ command.params['name'] = name unless name.nil?
341
+ command.query['fields'] = fields unless fields.nil?
342
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
343
+ execute_or_queue_command(command, &block)
344
+ end
345
+
346
+ # Marks the Recommendation State as Succeeded. Users can use this method to
347
+ # indicate to the Recommender API that they have applied the recommendation
348
+ # themselves, and the operation was successful. This stops the recommendation
349
+ # content from being updated. Associated insights are frozen and placed in the
350
+ # ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
351
+ # in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.
352
+ # update IAM permission for the specified recommender.
353
+ # @param [String] name
354
+ # Required. Name of the recommendation.
355
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationSucceededRequest] google_cloud_recommender_v1_mark_recommendation_succeeded_request_object
356
+ # @param [String] fields
357
+ # Selector specifying which fields to include in a partial response.
358
+ # @param [String] quota_user
359
+ # Available to use for quota purposes for server-side applications. Can be any
360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
361
+ # @param [Google::Apis::RequestOptions] options
362
+ # Request-specific options
363
+ #
364
+ # @yield [result, err] Result & error if block supplied
365
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
366
+ # @yieldparam err [StandardError] error object if request failed
367
+ #
368
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
369
+ #
370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
373
+ def mark_billing_account_location_recommender_recommendation_succeeded(name, google_cloud_recommender_v1_mark_recommendation_succeeded_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
374
+ command = make_simple_command(:post, 'v1/{+name}:markSucceeded', options)
375
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationSucceededRequest::Representation
376
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_succeeded_request_object
377
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
378
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
379
+ command.params['name'] = name unless name.nil?
380
+ command.query['fields'] = fields unless fields.nil?
381
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
382
+ execute_or_queue_command(command, &block)
383
+ end
384
+
385
+ # Gets the requested insight. Requires the recommender.*.get IAM permission for
386
+ # the specified insight type.
387
+ # @param [String] name
388
+ # Required. Name of the insight.
389
+ # @param [String] fields
390
+ # Selector specifying which fields to include in a partial response.
391
+ # @param [String] quota_user
392
+ # Available to use for quota purposes for server-side applications. Can be any
393
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
394
+ # @param [Google::Apis::RequestOptions] options
395
+ # Request-specific options
396
+ #
397
+ # @yield [result, err] Result & error if block supplied
398
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight] parsed result object
399
+ # @yieldparam err [StandardError] error object if request failed
400
+ #
401
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight]
402
+ #
403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
406
+ def get_folder_location_insight_type_insight(name, fields: nil, quota_user: nil, options: nil, &block)
407
+ command = make_simple_command(:get, 'v1/{+name}', options)
408
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight::Representation
409
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight
410
+ command.params['name'] = name unless name.nil?
411
+ command.query['fields'] = fields unless fields.nil?
412
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
413
+ execute_or_queue_command(command, &block)
414
+ end
415
+
416
+ # Lists insights for a Cloud project. Requires the recommender.*.list IAM
417
+ # permission for the specified insight type.
418
+ # @param [String] parent
419
+ # Required. The container resource on which to execute the request. Acceptable
420
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
421
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
422
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
423
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
424
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
425
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
426
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
427
+ # insight-types.
428
+ # @param [String] filter
429
+ # Optional. Filter expression to restrict the insights returned. Supported
430
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
431
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
432
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
433
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
434
+ # expressions are based on the filter language described at https://google.aip.
435
+ # dev/160)
436
+ # @param [Fixnum] page_size
437
+ # Optional. The maximum number of results to return from this request. Non-
438
+ # positive values are ignored. If not specified, the server will determine the
439
+ # number of results to return.
440
+ # @param [String] page_token
441
+ # Optional. If present, retrieves the next batch of results from the preceding
442
+ # call to this method. `page_token` must be the value of `next_page_token` from
443
+ # the previous response. The values of other method parameters must be identical
444
+ # to those in the previous call.
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # @param [Google::Apis::RequestOptions] options
451
+ # Request-specific options
452
+ #
453
+ # @yield [result, err] Result & error if block supplied
454
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse] parsed result object
455
+ # @yieldparam err [StandardError] error object if request failed
456
+ #
457
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse]
458
+ #
459
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
460
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
461
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
462
+ def list_folder_location_insight_type_insights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
463
+ command = make_simple_command(:get, 'v1/{+parent}/insights', options)
464
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse::Representation
465
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse
466
+ command.params['parent'] = parent unless parent.nil?
467
+ command.query['filter'] = filter unless filter.nil?
468
+ command.query['pageSize'] = page_size unless page_size.nil?
469
+ command.query['pageToken'] = page_token unless page_token.nil?
470
+ command.query['fields'] = fields unless fields.nil?
471
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
472
+ execute_or_queue_command(command, &block)
473
+ end
474
+
475
+ # Marks the Insight State as Accepted. Users can use this method to indicate to
476
+ # the Recommender API that they have applied some action based on the insight.
477
+ # This stops the insight content from being updated. MarkInsightAccepted can be
478
+ # applied to insights in ACTIVE state. Requires the recommender.*.update IAM
479
+ # permission for the specified insight.
480
+ # @param [String] name
481
+ # Required. Name of the insight.
482
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkInsightAcceptedRequest] google_cloud_recommender_v1_mark_insight_accepted_request_object
483
+ # @param [String] fields
484
+ # Selector specifying which fields to include in a partial response.
485
+ # @param [String] quota_user
486
+ # Available to use for quota purposes for server-side applications. Can be any
487
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
488
+ # @param [Google::Apis::RequestOptions] options
489
+ # Request-specific options
490
+ #
491
+ # @yield [result, err] Result & error if block supplied
492
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight] parsed result object
493
+ # @yieldparam err [StandardError] error object if request failed
494
+ #
495
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight]
496
+ #
497
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
498
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
499
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
500
+ def mark_folder_location_insight_type_insight_accepted(name, google_cloud_recommender_v1_mark_insight_accepted_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
501
+ command = make_simple_command(:post, 'v1/{+name}:markAccepted', options)
502
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkInsightAcceptedRequest::Representation
503
+ command.request_object = google_cloud_recommender_v1_mark_insight_accepted_request_object
504
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight::Representation
505
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight
506
+ command.params['name'] = name unless name.nil?
507
+ command.query['fields'] = fields unless fields.nil?
508
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
509
+ execute_or_queue_command(command, &block)
510
+ end
511
+
512
+ # Gets the requested recommendation. Requires the recommender.*.get IAM
513
+ # permission for the specified recommender.
514
+ # @param [String] name
515
+ # Required. Name of the recommendation.
516
+ # @param [String] fields
517
+ # Selector specifying which fields to include in a partial response.
518
+ # @param [String] quota_user
519
+ # Available to use for quota purposes for server-side applications. Can be any
520
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
521
+ # @param [Google::Apis::RequestOptions] options
522
+ # Request-specific options
523
+ #
524
+ # @yield [result, err] Result & error if block supplied
525
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
526
+ # @yieldparam err [StandardError] error object if request failed
527
+ #
528
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
529
+ #
530
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
531
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
532
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
533
+ def get_folder_location_recommender_recommendation(name, fields: nil, quota_user: nil, options: nil, &block)
534
+ command = make_simple_command(:get, 'v1/{+name}', options)
535
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
536
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
537
+ command.params['name'] = name unless name.nil?
538
+ command.query['fields'] = fields unless fields.nil?
539
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
540
+ execute_or_queue_command(command, &block)
541
+ end
542
+
543
+ # Lists recommendations for a Cloud project. Requires the recommender.*.list IAM
544
+ # permission for the specified recommender.
545
+ # @param [String] parent
546
+ # Required. The container resource on which to execute the request. Acceptable
547
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
548
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
549
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
550
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
551
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
552
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
553
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
554
+ # @param [String] filter
555
+ # Filter expression to restrict the recommendations returned. Supported filter
556
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
557
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
558
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
559
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
560
+ # ` (These expressions are based on the filter language described at https://
561
+ # google.aip.dev/160)
562
+ # @param [Fixnum] page_size
563
+ # Optional. The maximum number of results to return from this request. Non-
564
+ # positive values are ignored. If not specified, the server will determine the
565
+ # number of results to return.
566
+ # @param [String] page_token
567
+ # Optional. If present, retrieves the next batch of results from the preceding
568
+ # call to this method. `page_token` must be the value of `next_page_token` from
569
+ # the previous response. The values of other method parameters must be identical
570
+ # to those in the previous call.
571
+ # @param [String] fields
572
+ # Selector specifying which fields to include in a partial response.
573
+ # @param [String] quota_user
574
+ # Available to use for quota purposes for server-side applications. Can be any
575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
576
+ # @param [Google::Apis::RequestOptions] options
577
+ # Request-specific options
578
+ #
579
+ # @yield [result, err] Result & error if block supplied
580
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse] parsed result object
581
+ # @yieldparam err [StandardError] error object if request failed
582
+ #
583
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse]
584
+ #
585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
588
+ def list_folder_location_recommender_recommendations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
589
+ command = make_simple_command(:get, 'v1/{+parent}/recommendations', options)
590
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse::Representation
591
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse
592
+ command.params['parent'] = parent unless parent.nil?
593
+ command.query['filter'] = filter unless filter.nil?
594
+ command.query['pageSize'] = page_size unless page_size.nil?
595
+ command.query['pageToken'] = page_token unless page_token.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ execute_or_queue_command(command, &block)
599
+ end
600
+
601
+ # Marks the Recommendation State as Claimed. Users can use this method to
602
+ # indicate to the Recommender API that they are starting to apply the
603
+ # recommendation themselves. This stops the recommendation content from being
604
+ # updated. Associated insights are frozen and placed in the ACCEPTED state.
605
+ # MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
606
+ # SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM
607
+ # permission for the specified recommender.
608
+ # @param [String] name
609
+ # Required. Name of the recommendation.
610
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationClaimedRequest] google_cloud_recommender_v1_mark_recommendation_claimed_request_object
611
+ # @param [String] fields
612
+ # Selector specifying which fields to include in a partial response.
613
+ # @param [String] quota_user
614
+ # Available to use for quota purposes for server-side applications. Can be any
615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
616
+ # @param [Google::Apis::RequestOptions] options
617
+ # Request-specific options
618
+ #
619
+ # @yield [result, err] Result & error if block supplied
620
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
621
+ # @yieldparam err [StandardError] error object if request failed
622
+ #
623
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
624
+ #
625
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
626
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
627
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
628
+ def mark_folder_location_recommender_recommendation_claimed(name, google_cloud_recommender_v1_mark_recommendation_claimed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
629
+ command = make_simple_command(:post, 'v1/{+name}:markClaimed', options)
630
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationClaimedRequest::Representation
631
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_claimed_request_object
632
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
633
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
634
+ command.params['name'] = name unless name.nil?
635
+ command.query['fields'] = fields unless fields.nil?
636
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
637
+ execute_or_queue_command(command, &block)
638
+ end
639
+
640
+ # Marks the Recommendation State as Failed. Users can use this method to
641
+ # indicate to the Recommender API that they have applied the recommendation
642
+ # themselves, and the operation failed. This stops the recommendation content
643
+ # from being updated. Associated insights are frozen and placed in the ACCEPTED
644
+ # state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
645
+ # CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
646
+ # permission for the specified recommender.
647
+ # @param [String] name
648
+ # Required. Name of the recommendation.
649
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationFailedRequest] google_cloud_recommender_v1_mark_recommendation_failed_request_object
650
+ # @param [String] fields
651
+ # Selector specifying which fields to include in a partial response.
652
+ # @param [String] quota_user
653
+ # Available to use for quota purposes for server-side applications. Can be any
654
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
655
+ # @param [Google::Apis::RequestOptions] options
656
+ # Request-specific options
657
+ #
658
+ # @yield [result, err] Result & error if block supplied
659
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
660
+ # @yieldparam err [StandardError] error object if request failed
661
+ #
662
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
663
+ #
664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
667
+ def mark_folder_location_recommender_recommendation_failed(name, google_cloud_recommender_v1_mark_recommendation_failed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
668
+ command = make_simple_command(:post, 'v1/{+name}:markFailed', options)
669
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationFailedRequest::Representation
670
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_failed_request_object
671
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
672
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
673
+ command.params['name'] = name unless name.nil?
674
+ command.query['fields'] = fields unless fields.nil?
675
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
676
+ execute_or_queue_command(command, &block)
677
+ end
678
+
679
+ # Marks the Recommendation State as Succeeded. Users can use this method to
680
+ # indicate to the Recommender API that they have applied the recommendation
681
+ # themselves, and the operation was successful. This stops the recommendation
682
+ # content from being updated. Associated insights are frozen and placed in the
683
+ # ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
684
+ # in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.
685
+ # update IAM permission for the specified recommender.
686
+ # @param [String] name
687
+ # Required. Name of the recommendation.
688
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationSucceededRequest] google_cloud_recommender_v1_mark_recommendation_succeeded_request_object
689
+ # @param [String] fields
690
+ # Selector specifying which fields to include in a partial response.
691
+ # @param [String] quota_user
692
+ # Available to use for quota purposes for server-side applications. Can be any
693
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
694
+ # @param [Google::Apis::RequestOptions] options
695
+ # Request-specific options
696
+ #
697
+ # @yield [result, err] Result & error if block supplied
698
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
699
+ # @yieldparam err [StandardError] error object if request failed
700
+ #
701
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
702
+ #
703
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
704
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
705
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
706
+ def mark_folder_location_recommender_recommendation_succeeded(name, google_cloud_recommender_v1_mark_recommendation_succeeded_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
707
+ command = make_simple_command(:post, 'v1/{+name}:markSucceeded', options)
708
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationSucceededRequest::Representation
709
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_succeeded_request_object
710
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
711
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
712
+ command.params['name'] = name unless name.nil?
713
+ command.query['fields'] = fields unless fields.nil?
714
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
715
+ execute_or_queue_command(command, &block)
716
+ end
717
+
718
+ # Gets the requested insight. Requires the recommender.*.get IAM permission for
719
+ # the specified insight type.
720
+ # @param [String] name
721
+ # Required. Name of the insight.
722
+ # @param [String] fields
723
+ # Selector specifying which fields to include in a partial response.
724
+ # @param [String] quota_user
725
+ # Available to use for quota purposes for server-side applications. Can be any
726
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
727
+ # @param [Google::Apis::RequestOptions] options
728
+ # Request-specific options
729
+ #
730
+ # @yield [result, err] Result & error if block supplied
731
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight] parsed result object
732
+ # @yieldparam err [StandardError] error object if request failed
733
+ #
734
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight]
735
+ #
736
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
737
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
738
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
739
+ def get_organization_location_insight_type_insight(name, fields: nil, quota_user: nil, options: nil, &block)
740
+ command = make_simple_command(:get, 'v1/{+name}', options)
741
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight::Representation
742
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight
743
+ command.params['name'] = name unless name.nil?
744
+ command.query['fields'] = fields unless fields.nil?
745
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
746
+ execute_or_queue_command(command, &block)
747
+ end
748
+
749
+ # Lists insights for a Cloud project. Requires the recommender.*.list IAM
750
+ # permission for the specified insight type.
751
+ # @param [String] parent
752
+ # Required. The container resource on which to execute the request. Acceptable
753
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
754
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
755
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
756
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
757
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
758
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
759
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
760
+ # insight-types.
761
+ # @param [String] filter
762
+ # Optional. Filter expression to restrict the insights returned. Supported
763
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
764
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
765
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
766
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
767
+ # expressions are based on the filter language described at https://google.aip.
768
+ # dev/160)
769
+ # @param [Fixnum] page_size
770
+ # Optional. The maximum number of results to return from this request. Non-
771
+ # positive values are ignored. If not specified, the server will determine the
772
+ # number of results to return.
773
+ # @param [String] page_token
774
+ # Optional. If present, retrieves the next batch of results from the preceding
775
+ # call to this method. `page_token` must be the value of `next_page_token` from
776
+ # the previous response. The values of other method parameters must be identical
777
+ # to those in the previous call.
778
+ # @param [String] fields
779
+ # Selector specifying which fields to include in a partial response.
780
+ # @param [String] quota_user
781
+ # Available to use for quota purposes for server-side applications. Can be any
782
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
783
+ # @param [Google::Apis::RequestOptions] options
784
+ # Request-specific options
785
+ #
786
+ # @yield [result, err] Result & error if block supplied
787
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse] parsed result object
788
+ # @yieldparam err [StandardError] error object if request failed
789
+ #
790
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse]
791
+ #
792
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
793
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
794
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
795
+ def list_organization_location_insight_type_insights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
796
+ command = make_simple_command(:get, 'v1/{+parent}/insights', options)
797
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse::Representation
798
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListInsightsResponse
799
+ command.params['parent'] = parent unless parent.nil?
800
+ command.query['filter'] = filter unless filter.nil?
801
+ command.query['pageSize'] = page_size unless page_size.nil?
802
+ command.query['pageToken'] = page_token unless page_token.nil?
803
+ command.query['fields'] = fields unless fields.nil?
804
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
805
+ execute_or_queue_command(command, &block)
806
+ end
807
+
808
+ # Marks the Insight State as Accepted. Users can use this method to indicate to
809
+ # the Recommender API that they have applied some action based on the insight.
810
+ # This stops the insight content from being updated. MarkInsightAccepted can be
811
+ # applied to insights in ACTIVE state. Requires the recommender.*.update IAM
812
+ # permission for the specified insight.
813
+ # @param [String] name
814
+ # Required. Name of the insight.
815
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkInsightAcceptedRequest] google_cloud_recommender_v1_mark_insight_accepted_request_object
816
+ # @param [String] fields
817
+ # Selector specifying which fields to include in a partial response.
818
+ # @param [String] quota_user
819
+ # Available to use for quota purposes for server-side applications. Can be any
820
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
821
+ # @param [Google::Apis::RequestOptions] options
822
+ # Request-specific options
823
+ #
824
+ # @yield [result, err] Result & error if block supplied
825
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight] parsed result object
826
+ # @yieldparam err [StandardError] error object if request failed
827
+ #
828
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight]
829
+ #
830
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
831
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
832
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
833
+ def mark_organization_location_insight_type_insight_accepted(name, google_cloud_recommender_v1_mark_insight_accepted_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
834
+ command = make_simple_command(:post, 'v1/{+name}:markAccepted', options)
835
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkInsightAcceptedRequest::Representation
836
+ command.request_object = google_cloud_recommender_v1_mark_insight_accepted_request_object
837
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight::Representation
838
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight
839
+ command.params['name'] = name unless name.nil?
840
+ command.query['fields'] = fields unless fields.nil?
841
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
842
+ execute_or_queue_command(command, &block)
843
+ end
844
+
845
+ # Gets the requested recommendation. Requires the recommender.*.get IAM
846
+ # permission for the specified recommender.
847
+ # @param [String] name
848
+ # Required. Name of the recommendation.
849
+ # @param [String] fields
850
+ # Selector specifying which fields to include in a partial response.
851
+ # @param [String] quota_user
852
+ # Available to use for quota purposes for server-side applications. Can be any
853
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
854
+ # @param [Google::Apis::RequestOptions] options
855
+ # Request-specific options
856
+ #
857
+ # @yield [result, err] Result & error if block supplied
858
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
859
+ # @yieldparam err [StandardError] error object if request failed
860
+ #
861
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
862
+ #
863
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
864
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
865
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
866
+ def get_organization_location_recommender_recommendation(name, fields: nil, quota_user: nil, options: nil, &block)
867
+ command = make_simple_command(:get, 'v1/{+name}', options)
868
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
869
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
870
+ command.params['name'] = name unless name.nil?
871
+ command.query['fields'] = fields unless fields.nil?
872
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
873
+ execute_or_queue_command(command, &block)
874
+ end
875
+
876
+ # Lists recommendations for a Cloud project. Requires the recommender.*.list IAM
877
+ # permission for the specified recommender.
878
+ # @param [String] parent
879
+ # Required. The container resource on which to execute the request. Acceptable
880
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
881
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
882
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
883
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
884
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
885
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
886
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
887
+ # @param [String] filter
888
+ # Filter expression to restrict the recommendations returned. Supported filter
889
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
890
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
891
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
892
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
893
+ # ` (These expressions are based on the filter language described at https://
894
+ # google.aip.dev/160)
895
+ # @param [Fixnum] page_size
896
+ # Optional. The maximum number of results to return from this request. Non-
897
+ # positive values are ignored. If not specified, the server will determine the
898
+ # number of results to return.
899
+ # @param [String] page_token
900
+ # Optional. If present, retrieves the next batch of results from the preceding
901
+ # call to this method. `page_token` must be the value of `next_page_token` from
902
+ # the previous response. The values of other method parameters must be identical
903
+ # to those in the previous call.
904
+ # @param [String] fields
905
+ # Selector specifying which fields to include in a partial response.
906
+ # @param [String] quota_user
907
+ # Available to use for quota purposes for server-side applications. Can be any
908
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
909
+ # @param [Google::Apis::RequestOptions] options
910
+ # Request-specific options
911
+ #
912
+ # @yield [result, err] Result & error if block supplied
913
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse] parsed result object
914
+ # @yieldparam err [StandardError] error object if request failed
915
+ #
916
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse]
917
+ #
918
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
919
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
920
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
921
+ def list_organization_location_recommender_recommendations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
922
+ command = make_simple_command(:get, 'v1/{+parent}/recommendations', options)
923
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse::Representation
924
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ListRecommendationsResponse
925
+ command.params['parent'] = parent unless parent.nil?
926
+ command.query['filter'] = filter unless filter.nil?
927
+ command.query['pageSize'] = page_size unless page_size.nil?
928
+ command.query['pageToken'] = page_token unless page_token.nil?
929
+ command.query['fields'] = fields unless fields.nil?
930
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
931
+ execute_or_queue_command(command, &block)
932
+ end
933
+
934
+ # Marks the Recommendation State as Claimed. Users can use this method to
935
+ # indicate to the Recommender API that they are starting to apply the
936
+ # recommendation themselves. This stops the recommendation content from being
937
+ # updated. Associated insights are frozen and placed in the ACCEPTED state.
938
+ # MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
939
+ # SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM
940
+ # permission for the specified recommender.
941
+ # @param [String] name
942
+ # Required. Name of the recommendation.
943
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationClaimedRequest] google_cloud_recommender_v1_mark_recommendation_claimed_request_object
944
+ # @param [String] fields
945
+ # Selector specifying which fields to include in a partial response.
946
+ # @param [String] quota_user
947
+ # Available to use for quota purposes for server-side applications. Can be any
948
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
949
+ # @param [Google::Apis::RequestOptions] options
950
+ # Request-specific options
951
+ #
952
+ # @yield [result, err] Result & error if block supplied
953
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
954
+ # @yieldparam err [StandardError] error object if request failed
955
+ #
956
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
957
+ #
958
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
959
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
960
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
961
+ def mark_organization_location_recommender_recommendation_claimed(name, google_cloud_recommender_v1_mark_recommendation_claimed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
962
+ command = make_simple_command(:post, 'v1/{+name}:markClaimed', options)
963
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationClaimedRequest::Representation
964
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_claimed_request_object
965
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
966
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
967
+ command.params['name'] = name unless name.nil?
968
+ command.query['fields'] = fields unless fields.nil?
969
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
970
+ execute_or_queue_command(command, &block)
971
+ end
972
+
973
+ # Marks the Recommendation State as Failed. Users can use this method to
974
+ # indicate to the Recommender API that they have applied the recommendation
975
+ # themselves, and the operation failed. This stops the recommendation content
976
+ # from being updated. Associated insights are frozen and placed in the ACCEPTED
977
+ # state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
978
+ # CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
979
+ # permission for the specified recommender.
980
+ # @param [String] name
981
+ # Required. Name of the recommendation.
982
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationFailedRequest] google_cloud_recommender_v1_mark_recommendation_failed_request_object
983
+ # @param [String] fields
984
+ # Selector specifying which fields to include in a partial response.
985
+ # @param [String] quota_user
986
+ # Available to use for quota purposes for server-side applications. Can be any
987
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
988
+ # @param [Google::Apis::RequestOptions] options
989
+ # Request-specific options
990
+ #
991
+ # @yield [result, err] Result & error if block supplied
992
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
993
+ # @yieldparam err [StandardError] error object if request failed
994
+ #
995
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
996
+ #
997
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
998
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
999
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1000
+ def mark_organization_location_recommender_recommendation_failed(name, google_cloud_recommender_v1_mark_recommendation_failed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1001
+ command = make_simple_command(:post, 'v1/{+name}:markFailed', options)
1002
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationFailedRequest::Representation
1003
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_failed_request_object
1004
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
1005
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
1006
+ command.params['name'] = name unless name.nil?
1007
+ command.query['fields'] = fields unless fields.nil?
1008
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1009
+ execute_or_queue_command(command, &block)
1010
+ end
1011
+
1012
+ # Marks the Recommendation State as Succeeded. Users can use this method to
1013
+ # indicate to the Recommender API that they have applied the recommendation
1014
+ # themselves, and the operation was successful. This stops the recommendation
1015
+ # content from being updated. Associated insights are frozen and placed in the
1016
+ # ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
1017
+ # in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.
1018
+ # update IAM permission for the specified recommender.
1019
+ # @param [String] name
1020
+ # Required. Name of the recommendation.
1021
+ # @param [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationSucceededRequest] google_cloud_recommender_v1_mark_recommendation_succeeded_request_object
1022
+ # @param [String] fields
1023
+ # Selector specifying which fields to include in a partial response.
1024
+ # @param [String] quota_user
1025
+ # Available to use for quota purposes for server-side applications. Can be any
1026
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1027
+ # @param [Google::Apis::RequestOptions] options
1028
+ # Request-specific options
1029
+ #
1030
+ # @yield [result, err] Result & error if block supplied
1031
+ # @yieldparam result [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation] parsed result object
1032
+ # @yieldparam err [StandardError] error object if request failed
1033
+ #
1034
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation]
1035
+ #
1036
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1037
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1038
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1039
+ def mark_organization_location_recommender_recommendation_succeeded(name, google_cloud_recommender_v1_mark_recommendation_succeeded_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1040
+ command = make_simple_command(:post, 'v1/{+name}:markSucceeded', options)
1041
+ command.request_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1MarkRecommendationSucceededRequest::Representation
1042
+ command.request_object = google_cloud_recommender_v1_mark_recommendation_succeeded_request_object
1043
+ command.response_representation = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation::Representation
1044
+ command.response_class = Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation
1045
+ command.params['name'] = name unless name.nil?
1046
+ command.query['fields'] = fields unless fields.nil?
1047
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1048
+ execute_or_queue_command(command, &block)
1049
+ end
1050
+
52
1051
  # Gets the requested insight. Requires the recommender.*.get IAM permission for
53
1052
  # the specified insight type.
54
1053
  # @param [String] name
@@ -84,13 +1083,22 @@ module Google
84
1083
  # permission for the specified insight type.
85
1084
  # @param [String] parent
86
1085
  # Required. The container resource on which to execute the request. Acceptable
87
- # formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
88
- # INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.
89
- # com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https:/
90
- # /cloud.google.com/recommender/docs/insights/insight-types.)
1086
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
1087
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
1088
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
1089
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
1090
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
1091
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
1092
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
1093
+ # insight-types.
91
1094
  # @param [String] filter
92
1095
  # Optional. Filter expression to restrict the insights returned. Supported
93
- # filter fields: state Eg: `state:"DISMISSED" or state:"ACTIVE"
1096
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
1097
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
1098
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
1099
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
1100
+ # expressions are based on the filter language described at https://google.aip.
1101
+ # dev/160)
94
1102
  # @param [Fixnum] page_size
95
1103
  # Optional. The maximum number of results to return from this request. Non-
96
1104
  # positive values are ignored. If not specified, the server will determine the
@@ -202,14 +1210,21 @@ module Google
202
1210
  # permission for the specified recommender.
203
1211
  # @param [String] parent
204
1212
  # Required. The container resource on which to execute the request. Acceptable
205
- # formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
206
- # RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.
207
- # com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://
208
- # cloud.google.com/recommender/docs/recommenders.
1213
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
1214
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
1215
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
1216
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
1217
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
1218
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
1219
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
209
1220
  # @param [String] filter
210
1221
  # Filter expression to restrict the recommendations returned. Supported filter
211
- # fields: state_info.state Eg: `state_info.state:"DISMISSED" or state_info.state:
212
- # "FAILED"
1222
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
1223
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
1224
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
1225
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
1226
+ # ` (These expressions are based on the filter language described at https://
1227
+ # google.aip.dev/160)
213
1228
  # @param [Fixnum] page_size
214
1229
  # Optional. The maximum number of results to return from this request. Non-
215
1230
  # positive values are ignored. If not specified, the server will determine the