aws-sdk-prometheusservice 1.25.0 → 1.27.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,6 +72,20 @@ module Aws::PrometheusService
72
72
  include Aws::Structure
73
73
  end
74
74
 
75
+ # A representation of an AMP destination.
76
+ #
77
+ # @!attribute [rw] workspace_arn
78
+ # The ARN of an AMP workspace.
79
+ # @return [String]
80
+ #
81
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/AmpConfiguration AWS API Documentation
82
+ #
83
+ class AmpConfiguration < Struct.new(
84
+ :workspace_arn)
85
+ SENSITIVE = []
86
+ include Aws::Structure
87
+ end
88
+
75
89
  # Updating or deleting a resource can cause an inconsistent state.
76
90
  #
77
91
  # @!attribute [rw] message
@@ -249,6 +263,80 @@ module Aws::PrometheusService
249
263
  include Aws::Structure
250
264
  end
251
265
 
266
+ # Represents the input of a CreateScraper operation.
267
+ #
268
+ # @!attribute [rw] alias
269
+ # An optional user-assigned alias for this scraper. This alias is for
270
+ # user reference and does not need to be unique.
271
+ # @return [String]
272
+ #
273
+ # @!attribute [rw] scrape_configuration
274
+ # The configuration used to create the scraper.
275
+ # @return [Types::ScrapeConfiguration]
276
+ #
277
+ # @!attribute [rw] source
278
+ # The source that the scraper will be discovering and collecting
279
+ # metrics from.
280
+ # @return [Types::Source]
281
+ #
282
+ # @!attribute [rw] destination
283
+ # The destination that the scraper will be producing metrics to.
284
+ # @return [Types::Destination]
285
+ #
286
+ # @!attribute [rw] client_token
287
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
288
+ # the idempotency of the request.
289
+ #
290
+ # **A suitable default value is auto-generated.** You should normally
291
+ # not need to pass this option.
292
+ # @return [String]
293
+ #
294
+ # @!attribute [rw] tags
295
+ # Optional, user-provided tags for this scraper.
296
+ # @return [Hash<String,String>]
297
+ #
298
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateScraperRequest AWS API Documentation
299
+ #
300
+ class CreateScraperRequest < Struct.new(
301
+ :alias,
302
+ :scrape_configuration,
303
+ :source,
304
+ :destination,
305
+ :client_token,
306
+ :tags)
307
+ SENSITIVE = []
308
+ include Aws::Structure
309
+ end
310
+
311
+ # Represents the output of a CreateScraper operation.
312
+ #
313
+ # @!attribute [rw] scraper_id
314
+ # The generated ID of the scraper that was just created.
315
+ # @return [String]
316
+ #
317
+ # @!attribute [rw] arn
318
+ # The ARN of the scraper that was just created.
319
+ # @return [String]
320
+ #
321
+ # @!attribute [rw] status
322
+ # The status of the scraper that was just created (usually CREATING).
323
+ # @return [Types::ScraperStatus]
324
+ #
325
+ # @!attribute [rw] tags
326
+ # The tags of this scraper.
327
+ # @return [Hash<String,String>]
328
+ #
329
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateScraperResponse AWS API Documentation
330
+ #
331
+ class CreateScraperResponse < Struct.new(
332
+ :scraper_id,
333
+ :arn,
334
+ :status,
335
+ :tags)
336
+ SENSITIVE = []
337
+ include Aws::Structure
338
+ end
339
+
252
340
  # Represents the input of a CreateWorkspace operation.
253
341
  #
254
342
  # @!attribute [rw] alias
@@ -383,6 +471,48 @@ module Aws::PrometheusService
383
471
  include Aws::Structure
384
472
  end
385
473
 
474
+ # Represents the input of a DeleteScraper operation.
475
+ #
476
+ # @!attribute [rw] scraper_id
477
+ # The ID of the scraper to delete.
478
+ # @return [String]
479
+ #
480
+ # @!attribute [rw] client_token
481
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
482
+ # the idempotency of the request.
483
+ #
484
+ # **A suitable default value is auto-generated.** You should normally
485
+ # not need to pass this option.
486
+ # @return [String]
487
+ #
488
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteScraperRequest AWS API Documentation
489
+ #
490
+ class DeleteScraperRequest < Struct.new(
491
+ :scraper_id,
492
+ :client_token)
493
+ SENSITIVE = []
494
+ include Aws::Structure
495
+ end
496
+
497
+ # Represents the output of a DeleteScraper operation.
498
+ #
499
+ # @!attribute [rw] scraper_id
500
+ # The ID of the scraper that was deleted.
501
+ # @return [String]
502
+ #
503
+ # @!attribute [rw] status
504
+ # The status of the scraper that is being deleted.
505
+ # @return [Types::ScraperStatus]
506
+ #
507
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteScraperResponse AWS API Documentation
508
+ #
509
+ class DeleteScraperResponse < Struct.new(
510
+ :scraper_id,
511
+ :status)
512
+ SENSITIVE = []
513
+ include Aws::Structure
514
+ end
515
+
386
516
  # Represents the input of a DeleteWorkspace operation.
387
517
  #
388
518
  # @!attribute [rw] workspace_id
@@ -497,6 +627,34 @@ module Aws::PrometheusService
497
627
  include Aws::Structure
498
628
  end
499
629
 
630
+ # Represents the input of a DescribeScraper operation.
631
+ #
632
+ # @!attribute [rw] scraper_id
633
+ # The IDs of the scraper to describe.
634
+ # @return [String]
635
+ #
636
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeScraperRequest AWS API Documentation
637
+ #
638
+ class DescribeScraperRequest < Struct.new(
639
+ :scraper_id)
640
+ SENSITIVE = []
641
+ include Aws::Structure
642
+ end
643
+
644
+ # Represents the output of a DescribeScraper operation.
645
+ #
646
+ # @!attribute [rw] scraper
647
+ # The properties of the selected scrapers.
648
+ # @return [Types::ScraperDescription]
649
+ #
650
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeScraperResponse AWS API Documentation
651
+ #
652
+ class DescribeScraperResponse < Struct.new(
653
+ :scraper)
654
+ SENSITIVE = []
655
+ include Aws::Structure
656
+ end
657
+
500
658
  # Represents the input of a DescribeWorkspace operation.
501
659
  #
502
660
  # @!attribute [rw] workspace_id
@@ -525,6 +683,76 @@ module Aws::PrometheusService
525
683
  include Aws::Structure
526
684
  end
527
685
 
686
+ # A representation of a destination that a scraper can produce metrics
687
+ # to.
688
+ #
689
+ # @note Destination is a union - when making an API calls you must set exactly one of the members.
690
+ #
691
+ # @note Destination is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of Destination corresponding to the set member.
692
+ #
693
+ # @!attribute [rw] amp_configuration
694
+ # A representation of an AMP destination.
695
+ # @return [Types::AmpConfiguration]
696
+ #
697
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/Destination AWS API Documentation
698
+ #
699
+ class Destination < Struct.new(
700
+ :amp_configuration,
701
+ :unknown)
702
+ SENSITIVE = []
703
+ include Aws::Structure
704
+ include Aws::Structure::Union
705
+
706
+ class AmpConfiguration < Destination; end
707
+ class Unknown < Destination; end
708
+ end
709
+
710
+ # A representation of an EKS source.
711
+ #
712
+ # @!attribute [rw] cluster_arn
713
+ # The ARN of an EKS cluster.
714
+ # @return [String]
715
+ #
716
+ # @!attribute [rw] security_group_ids
717
+ # A list of security group IDs specified for VPC configuration.
718
+ # @return [Array<String>]
719
+ #
720
+ # @!attribute [rw] subnet_ids
721
+ # A list of subnet IDs specified for VPC configuration.
722
+ # @return [Array<String>]
723
+ #
724
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/EksConfiguration AWS API Documentation
725
+ #
726
+ class EksConfiguration < Struct.new(
727
+ :cluster_arn,
728
+ :security_group_ids,
729
+ :subnet_ids)
730
+ SENSITIVE = []
731
+ include Aws::Structure
732
+ end
733
+
734
+ # Represents the input of a GetDefaultScraperConfiguration operation.
735
+ #
736
+ # @api private
737
+ #
738
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/GetDefaultScraperConfigurationRequest AWS API Documentation
739
+ #
740
+ class GetDefaultScraperConfigurationRequest < Aws::EmptyStructure; end
741
+
742
+ # Represents the output of a GetDefaultScraperConfiguration operation.
743
+ #
744
+ # @!attribute [rw] configuration
745
+ # The default configuration.
746
+ # @return [String]
747
+ #
748
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/GetDefaultScraperConfigurationResponse AWS API Documentation
749
+ #
750
+ class GetDefaultScraperConfigurationResponse < Struct.new(
751
+ :configuration)
752
+ SENSITIVE = []
753
+ include Aws::Structure
754
+ end
755
+
528
756
  # Unexpected error during processing of request.
529
757
  #
530
758
  # @!attribute [rw] message
@@ -595,6 +823,52 @@ module Aws::PrometheusService
595
823
  include Aws::Structure
596
824
  end
597
825
 
826
+ # Represents the input of a ListScrapers operation.
827
+ #
828
+ # @!attribute [rw] filters
829
+ # A list of scraper filters.
830
+ # @return [Hash<String,Array<String>>]
831
+ #
832
+ # @!attribute [rw] next_token
833
+ # Pagination token to request the next page in a paginated list. This
834
+ # token is obtained from the output of the previous ListScrapers
835
+ # request.
836
+ # @return [String]
837
+ #
838
+ # @!attribute [rw] max_results
839
+ # Maximum results to return in response (default=100, maximum=1000).
840
+ # @return [Integer]
841
+ #
842
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListScrapersRequest AWS API Documentation
843
+ #
844
+ class ListScrapersRequest < Struct.new(
845
+ :filters,
846
+ :next_token,
847
+ :max_results)
848
+ SENSITIVE = []
849
+ include Aws::Structure
850
+ end
851
+
852
+ # Represents the output of a ListScrapers operation.
853
+ #
854
+ # @!attribute [rw] scrapers
855
+ # The list of scrapers, filtered down if a set of filters was provided
856
+ # in the request.
857
+ # @return [Array<Types::ScraperSummary>]
858
+ #
859
+ # @!attribute [rw] next_token
860
+ # Pagination token to use when requesting the next page in this list.
861
+ # @return [String]
862
+ #
863
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListScrapersResponse AWS API Documentation
864
+ #
865
+ class ListScrapersResponse < Struct.new(
866
+ :scrapers,
867
+ :next_token)
868
+ SENSITIVE = []
869
+ include Aws::Structure
870
+ end
871
+
598
872
  # @!attribute [rw] resource_arn
599
873
  # The ARN of the resource.
600
874
  # @return [String]
@@ -951,6 +1225,182 @@ module Aws::PrometheusService
951
1225
  include Aws::Structure
952
1226
  end
953
1227
 
1228
+ # A representation of a Prometheus configuration file.
1229
+ #
1230
+ # @note ScrapeConfiguration is a union - when making an API calls you must set exactly one of the members.
1231
+ #
1232
+ # @note ScrapeConfiguration is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of ScrapeConfiguration corresponding to the set member.
1233
+ #
1234
+ # @!attribute [rw] configuration_blob
1235
+ # Binary data representing a Prometheus configuration file.
1236
+ # @return [String]
1237
+ #
1238
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ScrapeConfiguration AWS API Documentation
1239
+ #
1240
+ class ScrapeConfiguration < Struct.new(
1241
+ :configuration_blob,
1242
+ :unknown)
1243
+ SENSITIVE = []
1244
+ include Aws::Structure
1245
+ include Aws::Structure::Union
1246
+
1247
+ class ConfigurationBlob < ScrapeConfiguration; end
1248
+ class Unknown < ScrapeConfiguration; end
1249
+ end
1250
+
1251
+ # Represents the properties of a scraper.
1252
+ #
1253
+ # @!attribute [rw] alias
1254
+ # Alias of this scraper.
1255
+ # @return [String]
1256
+ #
1257
+ # @!attribute [rw] scraper_id
1258
+ # Unique string identifying this scraper.
1259
+ # @return [String]
1260
+ #
1261
+ # @!attribute [rw] arn
1262
+ # The Amazon Resource Name (ARN) of this scraper.
1263
+ # @return [String]
1264
+ #
1265
+ # @!attribute [rw] role_arn
1266
+ # The Amazon Resource Name (ARN) of the IAM role that provides
1267
+ # permissions for the scraper to dsicover, collect, and produce
1268
+ # metrics on your behalf.
1269
+ # @return [String]
1270
+ #
1271
+ # @!attribute [rw] status
1272
+ # The status of this scraper.
1273
+ # @return [Types::ScraperStatus]
1274
+ #
1275
+ # @!attribute [rw] created_at
1276
+ # The time when the scraper was created.
1277
+ # @return [Time]
1278
+ #
1279
+ # @!attribute [rw] last_modified_at
1280
+ # The time when the scraper was last modified.
1281
+ # @return [Time]
1282
+ #
1283
+ # @!attribute [rw] tags
1284
+ # The tags of this scraper.
1285
+ # @return [Hash<String,String>]
1286
+ #
1287
+ # @!attribute [rw] status_reason
1288
+ # The reason for failure if any.
1289
+ # @return [String]
1290
+ #
1291
+ # @!attribute [rw] scrape_configuration
1292
+ # The configuration used to create the scraper.
1293
+ # @return [Types::ScrapeConfiguration]
1294
+ #
1295
+ # @!attribute [rw] source
1296
+ # The source that the scraper is discovering and collecting metrics
1297
+ # from.
1298
+ # @return [Types::Source]
1299
+ #
1300
+ # @!attribute [rw] destination
1301
+ # The destination that the scraper is producing metrics to.
1302
+ # @return [Types::Destination]
1303
+ #
1304
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ScraperDescription AWS API Documentation
1305
+ #
1306
+ class ScraperDescription < Struct.new(
1307
+ :alias,
1308
+ :scraper_id,
1309
+ :arn,
1310
+ :role_arn,
1311
+ :status,
1312
+ :created_at,
1313
+ :last_modified_at,
1314
+ :tags,
1315
+ :status_reason,
1316
+ :scrape_configuration,
1317
+ :source,
1318
+ :destination)
1319
+ SENSITIVE = []
1320
+ include Aws::Structure
1321
+ end
1322
+
1323
+ # Represents the status of a scraper.
1324
+ #
1325
+ # @!attribute [rw] status_code
1326
+ # Status code of this scraper.
1327
+ # @return [String]
1328
+ #
1329
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ScraperStatus AWS API Documentation
1330
+ #
1331
+ class ScraperStatus < Struct.new(
1332
+ :status_code)
1333
+ SENSITIVE = []
1334
+ include Aws::Structure
1335
+ end
1336
+
1337
+ # Represents a summary of the properties of a scraper.
1338
+ #
1339
+ # @!attribute [rw] alias
1340
+ # Alias of this scraper.
1341
+ # @return [String]
1342
+ #
1343
+ # @!attribute [rw] scraper_id
1344
+ # Unique string identifying this scraper.
1345
+ # @return [String]
1346
+ #
1347
+ # @!attribute [rw] arn
1348
+ # The Amazon Resource Name (ARN) of this scraper.
1349
+ # @return [String]
1350
+ #
1351
+ # @!attribute [rw] role_arn
1352
+ # The Amazon Resource Name (ARN) of the IAM role that provides
1353
+ # permissions for the scraper to dsicover, collect, and produce
1354
+ # metrics on your behalf.
1355
+ # @return [String]
1356
+ #
1357
+ # @!attribute [rw] status
1358
+ # The status of this scraper.
1359
+ # @return [Types::ScraperStatus]
1360
+ #
1361
+ # @!attribute [rw] created_at
1362
+ # The time when the scraper was created.
1363
+ # @return [Time]
1364
+ #
1365
+ # @!attribute [rw] last_modified_at
1366
+ # The time when the scraper was last modified.
1367
+ # @return [Time]
1368
+ #
1369
+ # @!attribute [rw] tags
1370
+ # The tags of this scraper.
1371
+ # @return [Hash<String,String>]
1372
+ #
1373
+ # @!attribute [rw] status_reason
1374
+ # The reason for failure if any.
1375
+ # @return [String]
1376
+ #
1377
+ # @!attribute [rw] source
1378
+ # The source that the scraper is discovering and collecting metrics
1379
+ # from.
1380
+ # @return [Types::Source]
1381
+ #
1382
+ # @!attribute [rw] destination
1383
+ # The destination that the scraper is producing metrics to.
1384
+ # @return [Types::Destination]
1385
+ #
1386
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ScraperSummary AWS API Documentation
1387
+ #
1388
+ class ScraperSummary < Struct.new(
1389
+ :alias,
1390
+ :scraper_id,
1391
+ :arn,
1392
+ :role_arn,
1393
+ :status,
1394
+ :created_at,
1395
+ :last_modified_at,
1396
+ :tags,
1397
+ :status_reason,
1398
+ :source,
1399
+ :destination)
1400
+ SENSITIVE = []
1401
+ include Aws::Structure
1402
+ end
1403
+
954
1404
  # Request would cause a service quota to be exceeded.
955
1405
  #
956
1406
  # @!attribute [rw] message
@@ -985,6 +1435,30 @@ module Aws::PrometheusService
985
1435
  include Aws::Structure
986
1436
  end
987
1437
 
1438
+ # A representation of a source that a scraper can discover and collect
1439
+ # metrics from.
1440
+ #
1441
+ # @note Source is a union - when making an API calls you must set exactly one of the members.
1442
+ #
1443
+ # @note Source is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of Source corresponding to the set member.
1444
+ #
1445
+ # @!attribute [rw] eks_configuration
1446
+ # A representation of an EKS source.
1447
+ # @return [Types::EksConfiguration]
1448
+ #
1449
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/Source AWS API Documentation
1450
+ #
1451
+ class Source < Struct.new(
1452
+ :eks_configuration,
1453
+ :unknown)
1454
+ SENSITIVE = []
1455
+ include Aws::Structure
1456
+ include Aws::Structure::Union
1457
+
1458
+ class EksConfiguration < Source; end
1459
+ class Unknown < Source; end
1460
+ end
1461
+
988
1462
  # @!attribute [rw] resource_arn
989
1463
  # The ARN of the resource.
990
1464
  # @return [String]
@@ -69,11 +69,102 @@ module Aws::PrometheusService
69
69
  #
70
70
  # | waiter_name | params | :delay | :max_attempts |
71
71
  # | ----------------- | --------------------------- | -------- | ------------- |
72
+ # | scraper_active | {Client#describe_scraper} | 2 | 60 |
73
+ # | scraper_deleted | {Client#describe_scraper} | 2 | 60 |
72
74
  # | workspace_active | {Client#describe_workspace} | 2 | 60 |
73
75
  # | workspace_deleted | {Client#describe_workspace} | 2 | 60 |
74
76
  #
75
77
  module Waiters
76
78
 
79
+ # Wait until a scraper reaches ACTIVE status
80
+ class ScraperActive
81
+
82
+ # @param [Hash] options
83
+ # @option options [required, Client] :client
84
+ # @option options [Integer] :max_attempts (60)
85
+ # @option options [Integer] :delay (2)
86
+ # @option options [Proc] :before_attempt
87
+ # @option options [Proc] :before_wait
88
+ def initialize(options)
89
+ @client = options.fetch(:client)
90
+ @waiter = Aws::Waiters::Waiter.new({
91
+ max_attempts: 60,
92
+ delay: 2,
93
+ poller: Aws::Waiters::Poller.new(
94
+ operation_name: :describe_scraper,
95
+ acceptors: [
96
+ {
97
+ "matcher" => "path",
98
+ "argument" => "scraper.status.status_code",
99
+ "state" => "success",
100
+ "expected" => "ACTIVE"
101
+ },
102
+ {
103
+ "matcher" => "path",
104
+ "argument" => "scraper.status.status_code",
105
+ "state" => "failure",
106
+ "expected" => "CREATION_FAILED"
107
+ }
108
+ ]
109
+ )
110
+ }.merge(options))
111
+ end
112
+
113
+ # @option (see Client#describe_scraper)
114
+ # @return (see Client#describe_scraper)
115
+ def wait(params = {})
116
+ @waiter.wait(client: @client, params: params)
117
+ end
118
+
119
+ # @api private
120
+ attr_reader :waiter
121
+
122
+ end
123
+
124
+ # Wait until a scraper reaches DELETED status
125
+ class ScraperDeleted
126
+
127
+ # @param [Hash] options
128
+ # @option options [required, Client] :client
129
+ # @option options [Integer] :max_attempts (60)
130
+ # @option options [Integer] :delay (2)
131
+ # @option options [Proc] :before_attempt
132
+ # @option options [Proc] :before_wait
133
+ def initialize(options)
134
+ @client = options.fetch(:client)
135
+ @waiter = Aws::Waiters::Waiter.new({
136
+ max_attempts: 60,
137
+ delay: 2,
138
+ poller: Aws::Waiters::Poller.new(
139
+ operation_name: :describe_scraper,
140
+ acceptors: [
141
+ {
142
+ "matcher" => "error",
143
+ "state" => "success",
144
+ "expected" => "ResourceNotFoundException"
145
+ },
146
+ {
147
+ "matcher" => "path",
148
+ "argument" => "scraper.status.status_code",
149
+ "state" => "failure",
150
+ "expected" => "DELETION_FAILED"
151
+ }
152
+ ]
153
+ )
154
+ }.merge(options))
155
+ end
156
+
157
+ # @option (see Client#describe_scraper)
158
+ # @return (see Client#describe_scraper)
159
+ def wait(params = {})
160
+ @waiter.wait(client: @client, params: params)
161
+ end
162
+
163
+ # @api private
164
+ attr_reader :waiter
165
+
166
+ end
167
+
77
168
  # Wait until a workspace reaches ACTIVE status
78
169
  class WorkspaceActive
79
170
 
@@ -53,6 +53,6 @@ require_relative 'aws-sdk-prometheusservice/customizations'
53
53
  # @!group service
54
54
  module Aws::PrometheusService
55
55
 
56
- GEM_VERSION = '1.25.0'
56
+ GEM_VERSION = '1.27.0'
57
57
 
58
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-prometheusservice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.0
4
+ version: 1.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-22 00:00:00.000000000 Z
11
+ date: 2023-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core