aws-sdk-prometheusservice 1.4.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-prometheusservice/client.rb +605 -2
- data/lib/aws-sdk-prometheusservice/client_api.rb +345 -0
- data/lib/aws-sdk-prometheusservice/types.rb +728 -1
- data/lib/aws-sdk-prometheusservice/waiters.rb +172 -0
- data/lib/aws-sdk-prometheusservice.rb +3 -2
- metadata +6 -5
@@ -327,6 +327,106 @@ module Aws::PrometheusService
|
|
327
327
|
|
328
328
|
# @!group API Operations
|
329
329
|
|
330
|
+
# Create an alert manager definition.
|
331
|
+
#
|
332
|
+
# @option params [String] :client_token
|
333
|
+
# Optional, unique, case-sensitive, user-provided identifier to ensure
|
334
|
+
# the idempotency of the request.
|
335
|
+
#
|
336
|
+
# **A suitable default value is auto-generated.** You should normally
|
337
|
+
# not need to pass this option.**
|
338
|
+
#
|
339
|
+
# @option params [required, String, StringIO, File] :data
|
340
|
+
# The alert manager definition data.
|
341
|
+
#
|
342
|
+
# @option params [required, String] :workspace_id
|
343
|
+
# The ID of the workspace in which to create the alert manager
|
344
|
+
# definition.
|
345
|
+
#
|
346
|
+
# @return [Types::CreateAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
347
|
+
#
|
348
|
+
# * {Types::CreateAlertManagerDefinitionResponse#status #status} => Types::AlertManagerDefinitionStatus
|
349
|
+
#
|
350
|
+
# @example Request syntax with placeholder values
|
351
|
+
#
|
352
|
+
# resp = client.create_alert_manager_definition({
|
353
|
+
# client_token: "IdempotencyToken",
|
354
|
+
# data: "data", # required
|
355
|
+
# workspace_id: "WorkspaceId", # required
|
356
|
+
# })
|
357
|
+
#
|
358
|
+
# @example Response structure
|
359
|
+
#
|
360
|
+
# resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
|
361
|
+
# resp.status.status_reason #=> String
|
362
|
+
#
|
363
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateAlertManagerDefinition AWS API Documentation
|
364
|
+
#
|
365
|
+
# @overload create_alert_manager_definition(params = {})
|
366
|
+
# @param [Hash] params ({})
|
367
|
+
def create_alert_manager_definition(params = {}, options = {})
|
368
|
+
req = build_request(:create_alert_manager_definition, params)
|
369
|
+
req.send_request(options)
|
370
|
+
end
|
371
|
+
|
372
|
+
# Create a rule group namespace.
|
373
|
+
#
|
374
|
+
# @option params [String] :client_token
|
375
|
+
# Optional, unique, case-sensitive, user-provided identifier to ensure
|
376
|
+
# the idempotency of the request.
|
377
|
+
#
|
378
|
+
# **A suitable default value is auto-generated.** You should normally
|
379
|
+
# not need to pass this option.**
|
380
|
+
#
|
381
|
+
# @option params [required, String, StringIO, File] :data
|
382
|
+
# The namespace data that define the rule groups.
|
383
|
+
#
|
384
|
+
# @option params [required, String] :name
|
385
|
+
# The rule groups namespace name.
|
386
|
+
#
|
387
|
+
# @option params [Hash<String,String>] :tags
|
388
|
+
# Optional, user-provided tags for this rule groups namespace.
|
389
|
+
#
|
390
|
+
# @option params [required, String] :workspace_id
|
391
|
+
# The ID of the workspace in which to create the rule group namespace.
|
392
|
+
#
|
393
|
+
# @return [Types::CreateRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
394
|
+
#
|
395
|
+
# * {Types::CreateRuleGroupsNamespaceResponse#arn #arn} => String
|
396
|
+
# * {Types::CreateRuleGroupsNamespaceResponse#name #name} => String
|
397
|
+
# * {Types::CreateRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
|
398
|
+
# * {Types::CreateRuleGroupsNamespaceResponse#tags #tags} => Hash<String,String>
|
399
|
+
#
|
400
|
+
# @example Request syntax with placeholder values
|
401
|
+
#
|
402
|
+
# resp = client.create_rule_groups_namespace({
|
403
|
+
# client_token: "IdempotencyToken",
|
404
|
+
# data: "data", # required
|
405
|
+
# name: "RuleGroupsNamespaceName", # required
|
406
|
+
# tags: {
|
407
|
+
# "TagKey" => "TagValue",
|
408
|
+
# },
|
409
|
+
# workspace_id: "WorkspaceId", # required
|
410
|
+
# })
|
411
|
+
#
|
412
|
+
# @example Response structure
|
413
|
+
#
|
414
|
+
# resp.arn #=> String
|
415
|
+
# resp.name #=> String
|
416
|
+
# resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
|
417
|
+
# resp.status.status_reason #=> String
|
418
|
+
# resp.tags #=> Hash
|
419
|
+
# resp.tags["TagKey"] #=> String
|
420
|
+
#
|
421
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateRuleGroupsNamespace AWS API Documentation
|
422
|
+
#
|
423
|
+
# @overload create_rule_groups_namespace(params = {})
|
424
|
+
# @param [Hash] params ({})
|
425
|
+
def create_rule_groups_namespace(params = {}, options = {})
|
426
|
+
req = build_request(:create_rule_groups_namespace, params)
|
427
|
+
req.send_request(options)
|
428
|
+
end
|
429
|
+
|
330
430
|
# Creates a new AMP workspace.
|
331
431
|
#
|
332
432
|
# @option params [String] :alias
|
@@ -340,10 +440,14 @@ module Aws::PrometheusService
|
|
340
440
|
# **A suitable default value is auto-generated.** You should normally
|
341
441
|
# not need to pass this option.**
|
342
442
|
#
|
443
|
+
# @option params [Hash<String,String>] :tags
|
444
|
+
# Optional, user-provided tags for this workspace.
|
445
|
+
#
|
343
446
|
# @return [Types::CreateWorkspaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
344
447
|
#
|
345
448
|
# * {Types::CreateWorkspaceResponse#arn #arn} => String
|
346
449
|
# * {Types::CreateWorkspaceResponse#status #status} => Types::WorkspaceStatus
|
450
|
+
# * {Types::CreateWorkspaceResponse#tags #tags} => Hash<String,String>
|
347
451
|
# * {Types::CreateWorkspaceResponse#workspace_id #workspace_id} => String
|
348
452
|
#
|
349
453
|
# @example Request syntax with placeholder values
|
@@ -351,12 +455,17 @@ module Aws::PrometheusService
|
|
351
455
|
# resp = client.create_workspace({
|
352
456
|
# alias: "WorkspaceAlias",
|
353
457
|
# client_token: "IdempotencyToken",
|
458
|
+
# tags: {
|
459
|
+
# "TagKey" => "TagValue",
|
460
|
+
# },
|
354
461
|
# })
|
355
462
|
#
|
356
463
|
# @example Response structure
|
357
464
|
#
|
358
465
|
# resp.arn #=> String
|
359
466
|
# resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
|
467
|
+
# resp.tags #=> Hash
|
468
|
+
# resp.tags["TagKey"] #=> String
|
360
469
|
# resp.workspace_id #=> String
|
361
470
|
#
|
362
471
|
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateWorkspace AWS API Documentation
|
@@ -368,6 +477,71 @@ module Aws::PrometheusService
|
|
368
477
|
req.send_request(options)
|
369
478
|
end
|
370
479
|
|
480
|
+
# Deletes an alert manager definition.
|
481
|
+
#
|
482
|
+
# @option params [String] :client_token
|
483
|
+
# Optional, unique, case-sensitive, user-provided identifier to ensure
|
484
|
+
# the idempotency of the request.
|
485
|
+
#
|
486
|
+
# **A suitable default value is auto-generated.** You should normally
|
487
|
+
# not need to pass this option.**
|
488
|
+
#
|
489
|
+
# @option params [required, String] :workspace_id
|
490
|
+
# The ID of the workspace in which to delete the alert manager
|
491
|
+
# definition.
|
492
|
+
#
|
493
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
494
|
+
#
|
495
|
+
# @example Request syntax with placeholder values
|
496
|
+
#
|
497
|
+
# resp = client.delete_alert_manager_definition({
|
498
|
+
# client_token: "IdempotencyToken",
|
499
|
+
# workspace_id: "WorkspaceId", # required
|
500
|
+
# })
|
501
|
+
#
|
502
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteAlertManagerDefinition AWS API Documentation
|
503
|
+
#
|
504
|
+
# @overload delete_alert_manager_definition(params = {})
|
505
|
+
# @param [Hash] params ({})
|
506
|
+
def delete_alert_manager_definition(params = {}, options = {})
|
507
|
+
req = build_request(:delete_alert_manager_definition, params)
|
508
|
+
req.send_request(options)
|
509
|
+
end
|
510
|
+
|
511
|
+
# Delete a rule groups namespace.
|
512
|
+
#
|
513
|
+
# @option params [String] :client_token
|
514
|
+
# Optional, unique, case-sensitive, user-provided identifier to ensure
|
515
|
+
# the idempotency of the request.
|
516
|
+
#
|
517
|
+
# **A suitable default value is auto-generated.** You should normally
|
518
|
+
# not need to pass this option.**
|
519
|
+
#
|
520
|
+
# @option params [required, String] :name
|
521
|
+
# The rule groups namespace name.
|
522
|
+
#
|
523
|
+
# @option params [required, String] :workspace_id
|
524
|
+
# The ID of the workspace to delete rule group definition.
|
525
|
+
#
|
526
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
527
|
+
#
|
528
|
+
# @example Request syntax with placeholder values
|
529
|
+
#
|
530
|
+
# resp = client.delete_rule_groups_namespace({
|
531
|
+
# client_token: "IdempotencyToken",
|
532
|
+
# name: "RuleGroupsNamespaceName", # required
|
533
|
+
# workspace_id: "WorkspaceId", # required
|
534
|
+
# })
|
535
|
+
#
|
536
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteRuleGroupsNamespace AWS API Documentation
|
537
|
+
#
|
538
|
+
# @overload delete_rule_groups_namespace(params = {})
|
539
|
+
# @param [Hash] params ({})
|
540
|
+
def delete_rule_groups_namespace(params = {}, options = {})
|
541
|
+
req = build_request(:delete_rule_groups_namespace, params)
|
542
|
+
req.send_request(options)
|
543
|
+
end
|
544
|
+
|
371
545
|
# Deletes an AMP workspace.
|
372
546
|
#
|
373
547
|
# @option params [String] :client_token
|
@@ -398,6 +572,78 @@ module Aws::PrometheusService
|
|
398
572
|
req.send_request(options)
|
399
573
|
end
|
400
574
|
|
575
|
+
# Describes an alert manager definition.
|
576
|
+
#
|
577
|
+
# @option params [required, String] :workspace_id
|
578
|
+
# The ID of the workspace to describe.
|
579
|
+
#
|
580
|
+
# @return [Types::DescribeAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
581
|
+
#
|
582
|
+
# * {Types::DescribeAlertManagerDefinitionResponse#alert_manager_definition #alert_manager_definition} => Types::AlertManagerDefinitionDescription
|
583
|
+
#
|
584
|
+
# @example Request syntax with placeholder values
|
585
|
+
#
|
586
|
+
# resp = client.describe_alert_manager_definition({
|
587
|
+
# workspace_id: "WorkspaceId", # required
|
588
|
+
# })
|
589
|
+
#
|
590
|
+
# @example Response structure
|
591
|
+
#
|
592
|
+
# resp.alert_manager_definition.created_at #=> Time
|
593
|
+
# resp.alert_manager_definition.data #=> String
|
594
|
+
# resp.alert_manager_definition.modified_at #=> Time
|
595
|
+
# resp.alert_manager_definition.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
|
596
|
+
# resp.alert_manager_definition.status.status_reason #=> String
|
597
|
+
#
|
598
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeAlertManagerDefinition AWS API Documentation
|
599
|
+
#
|
600
|
+
# @overload describe_alert_manager_definition(params = {})
|
601
|
+
# @param [Hash] params ({})
|
602
|
+
def describe_alert_manager_definition(params = {}, options = {})
|
603
|
+
req = build_request(:describe_alert_manager_definition, params)
|
604
|
+
req.send_request(options)
|
605
|
+
end
|
606
|
+
|
607
|
+
# Describe a rule groups namespace.
|
608
|
+
#
|
609
|
+
# @option params [required, String] :name
|
610
|
+
# The rule groups namespace.
|
611
|
+
#
|
612
|
+
# @option params [required, String] :workspace_id
|
613
|
+
# The ID of the workspace to describe.
|
614
|
+
#
|
615
|
+
# @return [Types::DescribeRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
616
|
+
#
|
617
|
+
# * {Types::DescribeRuleGroupsNamespaceResponse#rule_groups_namespace #rule_groups_namespace} => Types::RuleGroupsNamespaceDescription
|
618
|
+
#
|
619
|
+
# @example Request syntax with placeholder values
|
620
|
+
#
|
621
|
+
# resp = client.describe_rule_groups_namespace({
|
622
|
+
# name: "RuleGroupsNamespaceName", # required
|
623
|
+
# workspace_id: "WorkspaceId", # required
|
624
|
+
# })
|
625
|
+
#
|
626
|
+
# @example Response structure
|
627
|
+
#
|
628
|
+
# resp.rule_groups_namespace.arn #=> String
|
629
|
+
# resp.rule_groups_namespace.created_at #=> Time
|
630
|
+
# resp.rule_groups_namespace.data #=> String
|
631
|
+
# resp.rule_groups_namespace.modified_at #=> Time
|
632
|
+
# resp.rule_groups_namespace.name #=> String
|
633
|
+
# resp.rule_groups_namespace.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
|
634
|
+
# resp.rule_groups_namespace.status.status_reason #=> String
|
635
|
+
# resp.rule_groups_namespace.tags #=> Hash
|
636
|
+
# resp.rule_groups_namespace.tags["TagKey"] #=> String
|
637
|
+
#
|
638
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeRuleGroupsNamespace AWS API Documentation
|
639
|
+
#
|
640
|
+
# @overload describe_rule_groups_namespace(params = {})
|
641
|
+
# @param [Hash] params ({})
|
642
|
+
def describe_rule_groups_namespace(params = {}, options = {})
|
643
|
+
req = build_request(:describe_rule_groups_namespace, params)
|
644
|
+
req.send_request(options)
|
645
|
+
end
|
646
|
+
|
401
647
|
# Describes an existing AMP workspace.
|
402
648
|
#
|
403
649
|
# @option params [required, String] :workspace_id
|
@@ -420,8 +666,16 @@ module Aws::PrometheusService
|
|
420
666
|
# resp.workspace.created_at #=> Time
|
421
667
|
# resp.workspace.prometheus_endpoint #=> String
|
422
668
|
# resp.workspace.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
|
669
|
+
# resp.workspace.tags #=> Hash
|
670
|
+
# resp.workspace.tags["TagKey"] #=> String
|
423
671
|
# resp.workspace.workspace_id #=> String
|
424
672
|
#
|
673
|
+
#
|
674
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
675
|
+
#
|
676
|
+
# * workspace_active
|
677
|
+
# * workspace_deleted
|
678
|
+
#
|
425
679
|
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeWorkspace AWS API Documentation
|
426
680
|
#
|
427
681
|
# @overload describe_workspace(params = {})
|
@@ -431,6 +685,90 @@ module Aws::PrometheusService
|
|
431
685
|
req.send_request(options)
|
432
686
|
end
|
433
687
|
|
688
|
+
# Lists rule groups namespaces.
|
689
|
+
#
|
690
|
+
# @option params [Integer] :max_results
|
691
|
+
# Maximum results to return in response (default=100, maximum=1000).
|
692
|
+
#
|
693
|
+
# @option params [String] :name
|
694
|
+
# Optional filter for rule groups namespace name. Only the rule groups
|
695
|
+
# namespace that begin with this value will be returned.
|
696
|
+
#
|
697
|
+
# @option params [String] :next_token
|
698
|
+
# Pagination token to request the next page in a paginated list. This
|
699
|
+
# token is obtained from the output of the previous
|
700
|
+
# ListRuleGroupsNamespaces request.
|
701
|
+
#
|
702
|
+
# @option params [required, String] :workspace_id
|
703
|
+
# The ID of the workspace.
|
704
|
+
#
|
705
|
+
# @return [Types::ListRuleGroupsNamespacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
706
|
+
#
|
707
|
+
# * {Types::ListRuleGroupsNamespacesResponse#next_token #next_token} => String
|
708
|
+
# * {Types::ListRuleGroupsNamespacesResponse#rule_groups_namespaces #rule_groups_namespaces} => Array<Types::RuleGroupsNamespaceSummary>
|
709
|
+
#
|
710
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
711
|
+
#
|
712
|
+
# @example Request syntax with placeholder values
|
713
|
+
#
|
714
|
+
# resp = client.list_rule_groups_namespaces({
|
715
|
+
# max_results: 1,
|
716
|
+
# name: "RuleGroupsNamespaceName",
|
717
|
+
# next_token: "PaginationToken",
|
718
|
+
# workspace_id: "WorkspaceId", # required
|
719
|
+
# })
|
720
|
+
#
|
721
|
+
# @example Response structure
|
722
|
+
#
|
723
|
+
# resp.next_token #=> String
|
724
|
+
# resp.rule_groups_namespaces #=> Array
|
725
|
+
# resp.rule_groups_namespaces[0].arn #=> String
|
726
|
+
# resp.rule_groups_namespaces[0].created_at #=> Time
|
727
|
+
# resp.rule_groups_namespaces[0].modified_at #=> Time
|
728
|
+
# resp.rule_groups_namespaces[0].name #=> String
|
729
|
+
# resp.rule_groups_namespaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
|
730
|
+
# resp.rule_groups_namespaces[0].status.status_reason #=> String
|
731
|
+
# resp.rule_groups_namespaces[0].tags #=> Hash
|
732
|
+
# resp.rule_groups_namespaces[0].tags["TagKey"] #=> String
|
733
|
+
#
|
734
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListRuleGroupsNamespaces AWS API Documentation
|
735
|
+
#
|
736
|
+
# @overload list_rule_groups_namespaces(params = {})
|
737
|
+
# @param [Hash] params ({})
|
738
|
+
def list_rule_groups_namespaces(params = {}, options = {})
|
739
|
+
req = build_request(:list_rule_groups_namespaces, params)
|
740
|
+
req.send_request(options)
|
741
|
+
end
|
742
|
+
|
743
|
+
# Lists the tags you have assigned to the resource.
|
744
|
+
#
|
745
|
+
# @option params [required, String] :resource_arn
|
746
|
+
# The ARN of the resource.
|
747
|
+
#
|
748
|
+
# @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
749
|
+
#
|
750
|
+
# * {Types::ListTagsForResourceResponse#tags #tags} => Hash<String,String>
|
751
|
+
#
|
752
|
+
# @example Request syntax with placeholder values
|
753
|
+
#
|
754
|
+
# resp = client.list_tags_for_resource({
|
755
|
+
# resource_arn: "String", # required
|
756
|
+
# })
|
757
|
+
#
|
758
|
+
# @example Response structure
|
759
|
+
#
|
760
|
+
# resp.tags #=> Hash
|
761
|
+
# resp.tags["TagKey"] #=> String
|
762
|
+
#
|
763
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListTagsForResource AWS API Documentation
|
764
|
+
#
|
765
|
+
# @overload list_tags_for_resource(params = {})
|
766
|
+
# @param [Hash] params ({})
|
767
|
+
def list_tags_for_resource(params = {}, options = {})
|
768
|
+
req = build_request(:list_tags_for_resource, params)
|
769
|
+
req.send_request(options)
|
770
|
+
end
|
771
|
+
|
434
772
|
# Lists all AMP workspaces, including workspaces being created or
|
435
773
|
# deleted.
|
436
774
|
#
|
@@ -469,6 +807,8 @@ module Aws::PrometheusService
|
|
469
807
|
# resp.workspaces[0].arn #=> String
|
470
808
|
# resp.workspaces[0].created_at #=> Time
|
471
809
|
# resp.workspaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
|
810
|
+
# resp.workspaces[0].tags #=> Hash
|
811
|
+
# resp.workspaces[0].tags["TagKey"] #=> String
|
472
812
|
# resp.workspaces[0].workspace_id #=> String
|
473
813
|
#
|
474
814
|
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListWorkspaces AWS API Documentation
|
@@ -480,6 +820,154 @@ module Aws::PrometheusService
|
|
480
820
|
req.send_request(options)
|
481
821
|
end
|
482
822
|
|
823
|
+
# Update an alert manager definition.
|
824
|
+
#
|
825
|
+
# @option params [String] :client_token
|
826
|
+
# Optional, unique, case-sensitive, user-provided identifier to ensure
|
827
|
+
# the idempotency of the request.
|
828
|
+
#
|
829
|
+
# **A suitable default value is auto-generated.** You should normally
|
830
|
+
# not need to pass this option.**
|
831
|
+
#
|
832
|
+
# @option params [required, String, StringIO, File] :data
|
833
|
+
# The alert manager definition data.
|
834
|
+
#
|
835
|
+
# @option params [required, String] :workspace_id
|
836
|
+
# The ID of the workspace in which to update the alert manager
|
837
|
+
# definition.
|
838
|
+
#
|
839
|
+
# @return [Types::PutAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
840
|
+
#
|
841
|
+
# * {Types::PutAlertManagerDefinitionResponse#status #status} => Types::AlertManagerDefinitionStatus
|
842
|
+
#
|
843
|
+
# @example Request syntax with placeholder values
|
844
|
+
#
|
845
|
+
# resp = client.put_alert_manager_definition({
|
846
|
+
# client_token: "IdempotencyToken",
|
847
|
+
# data: "data", # required
|
848
|
+
# workspace_id: "WorkspaceId", # required
|
849
|
+
# })
|
850
|
+
#
|
851
|
+
# @example Response structure
|
852
|
+
#
|
853
|
+
# resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
|
854
|
+
# resp.status.status_reason #=> String
|
855
|
+
#
|
856
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutAlertManagerDefinition AWS API Documentation
|
857
|
+
#
|
858
|
+
# @overload put_alert_manager_definition(params = {})
|
859
|
+
# @param [Hash] params ({})
|
860
|
+
def put_alert_manager_definition(params = {}, options = {})
|
861
|
+
req = build_request(:put_alert_manager_definition, params)
|
862
|
+
req.send_request(options)
|
863
|
+
end
|
864
|
+
|
865
|
+
# Update a rule groups namespace.
|
866
|
+
#
|
867
|
+
# @option params [String] :client_token
|
868
|
+
# Optional, unique, case-sensitive, user-provided identifier to ensure
|
869
|
+
# the idempotency of the request.
|
870
|
+
#
|
871
|
+
# **A suitable default value is auto-generated.** You should normally
|
872
|
+
# not need to pass this option.**
|
873
|
+
#
|
874
|
+
# @option params [required, String, StringIO, File] :data
|
875
|
+
# The namespace data that define the rule groups.
|
876
|
+
#
|
877
|
+
# @option params [required, String] :name
|
878
|
+
# The rule groups namespace name.
|
879
|
+
#
|
880
|
+
# @option params [required, String] :workspace_id
|
881
|
+
# The ID of the workspace in which to update the rule group namespace.
|
882
|
+
#
|
883
|
+
# @return [Types::PutRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
884
|
+
#
|
885
|
+
# * {Types::PutRuleGroupsNamespaceResponse#arn #arn} => String
|
886
|
+
# * {Types::PutRuleGroupsNamespaceResponse#name #name} => String
|
887
|
+
# * {Types::PutRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
|
888
|
+
# * {Types::PutRuleGroupsNamespaceResponse#tags #tags} => Hash<String,String>
|
889
|
+
#
|
890
|
+
# @example Request syntax with placeholder values
|
891
|
+
#
|
892
|
+
# resp = client.put_rule_groups_namespace({
|
893
|
+
# client_token: "IdempotencyToken",
|
894
|
+
# data: "data", # required
|
895
|
+
# name: "RuleGroupsNamespaceName", # required
|
896
|
+
# workspace_id: "WorkspaceId", # required
|
897
|
+
# })
|
898
|
+
#
|
899
|
+
# @example Response structure
|
900
|
+
#
|
901
|
+
# resp.arn #=> String
|
902
|
+
# resp.name #=> String
|
903
|
+
# resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
|
904
|
+
# resp.status.status_reason #=> String
|
905
|
+
# resp.tags #=> Hash
|
906
|
+
# resp.tags["TagKey"] #=> String
|
907
|
+
#
|
908
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutRuleGroupsNamespace AWS API Documentation
|
909
|
+
#
|
910
|
+
# @overload put_rule_groups_namespace(params = {})
|
911
|
+
# @param [Hash] params ({})
|
912
|
+
def put_rule_groups_namespace(params = {}, options = {})
|
913
|
+
req = build_request(:put_rule_groups_namespace, params)
|
914
|
+
req.send_request(options)
|
915
|
+
end
|
916
|
+
|
917
|
+
# Creates tags for the specified resource.
|
918
|
+
#
|
919
|
+
# @option params [required, String] :resource_arn
|
920
|
+
# The ARN of the resource.
|
921
|
+
#
|
922
|
+
# @option params [required, Hash<String,String>] :tags
|
923
|
+
# The list of tags assigned to the resource.
|
924
|
+
#
|
925
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
926
|
+
#
|
927
|
+
# @example Request syntax with placeholder values
|
928
|
+
#
|
929
|
+
# resp = client.tag_resource({
|
930
|
+
# resource_arn: "String", # required
|
931
|
+
# tags: { # required
|
932
|
+
# "TagKey" => "TagValue",
|
933
|
+
# },
|
934
|
+
# })
|
935
|
+
#
|
936
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/TagResource AWS API Documentation
|
937
|
+
#
|
938
|
+
# @overload tag_resource(params = {})
|
939
|
+
# @param [Hash] params ({})
|
940
|
+
def tag_resource(params = {}, options = {})
|
941
|
+
req = build_request(:tag_resource, params)
|
942
|
+
req.send_request(options)
|
943
|
+
end
|
944
|
+
|
945
|
+
# Deletes tags from the specified resource.
|
946
|
+
#
|
947
|
+
# @option params [required, String] :resource_arn
|
948
|
+
# The ARN of the resource.
|
949
|
+
#
|
950
|
+
# @option params [required, Array<String>] :tag_keys
|
951
|
+
# One or more tag keys
|
952
|
+
#
|
953
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
954
|
+
#
|
955
|
+
# @example Request syntax with placeholder values
|
956
|
+
#
|
957
|
+
# resp = client.untag_resource({
|
958
|
+
# resource_arn: "String", # required
|
959
|
+
# tag_keys: ["TagKey"], # required
|
960
|
+
# })
|
961
|
+
#
|
962
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/UntagResource AWS API Documentation
|
963
|
+
#
|
964
|
+
# @overload untag_resource(params = {})
|
965
|
+
# @param [Hash] params ({})
|
966
|
+
def untag_resource(params = {}, options = {})
|
967
|
+
req = build_request(:untag_resource, params)
|
968
|
+
req.send_request(options)
|
969
|
+
end
|
970
|
+
|
483
971
|
# Updates an AMP workspace alias.
|
484
972
|
#
|
485
973
|
# @option params [String] :alias
|
@@ -527,14 +1015,129 @@ module Aws::PrometheusService
|
|
527
1015
|
params: params,
|
528
1016
|
config: config)
|
529
1017
|
context[:gem_name] = 'aws-sdk-prometheusservice'
|
530
|
-
context[:gem_version] = '1.
|
1018
|
+
context[:gem_version] = '1.8.0'
|
531
1019
|
Seahorse::Client::Request.new(handlers, context)
|
532
1020
|
end
|
533
1021
|
|
1022
|
+
# Polls an API operation until a resource enters a desired state.
|
1023
|
+
#
|
1024
|
+
# ## Basic Usage
|
1025
|
+
#
|
1026
|
+
# A waiter will call an API operation until:
|
1027
|
+
#
|
1028
|
+
# * It is successful
|
1029
|
+
# * It enters a terminal state
|
1030
|
+
# * It makes the maximum number of attempts
|
1031
|
+
#
|
1032
|
+
# In between attempts, the waiter will sleep.
|
1033
|
+
#
|
1034
|
+
# # polls in a loop, sleeping between attempts
|
1035
|
+
# client.wait_until(waiter_name, params)
|
1036
|
+
#
|
1037
|
+
# ## Configuration
|
1038
|
+
#
|
1039
|
+
# You can configure the maximum number of polling attempts, and the
|
1040
|
+
# delay (in seconds) between each polling attempt. You can pass
|
1041
|
+
# configuration as the final arguments hash.
|
1042
|
+
#
|
1043
|
+
# # poll for ~25 seconds
|
1044
|
+
# client.wait_until(waiter_name, params, {
|
1045
|
+
# max_attempts: 5,
|
1046
|
+
# delay: 5,
|
1047
|
+
# })
|
1048
|
+
#
|
1049
|
+
# ## Callbacks
|
1050
|
+
#
|
1051
|
+
# You can be notified before each polling attempt and before each
|
1052
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
1053
|
+
# it will terminate the waiter.
|
1054
|
+
#
|
1055
|
+
# started_at = Time.now
|
1056
|
+
# client.wait_until(waiter_name, params, {
|
1057
|
+
#
|
1058
|
+
# # disable max attempts
|
1059
|
+
# max_attempts: nil,
|
1060
|
+
#
|
1061
|
+
# # poll for 1 hour, instead of a number of attempts
|
1062
|
+
# before_wait: -> (attempts, response) do
|
1063
|
+
# throw :failure if Time.now - started_at > 3600
|
1064
|
+
# end
|
1065
|
+
# })
|
1066
|
+
#
|
1067
|
+
# ## Handling Errors
|
1068
|
+
#
|
1069
|
+
# When a waiter is unsuccessful, it will raise an error.
|
1070
|
+
# All of the failure errors extend from
|
1071
|
+
# {Aws::Waiters::Errors::WaiterFailed}.
|
1072
|
+
#
|
1073
|
+
# begin
|
1074
|
+
# client.wait_until(...)
|
1075
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
1076
|
+
# # resource did not enter the desired state in time
|
1077
|
+
# end
|
1078
|
+
#
|
1079
|
+
# ## Valid Waiters
|
1080
|
+
#
|
1081
|
+
# The following table lists the valid waiter names, the operations they call,
|
1082
|
+
# and the default `:delay` and `:max_attempts` values.
|
1083
|
+
#
|
1084
|
+
# | waiter_name | params | :delay | :max_attempts |
|
1085
|
+
# | ----------------- | --------------------------- | -------- | ------------- |
|
1086
|
+
# | workspace_active | {Client#describe_workspace} | 2 | 60 |
|
1087
|
+
# | workspace_deleted | {Client#describe_workspace} | 2 | 60 |
|
1088
|
+
#
|
1089
|
+
# @raise [Errors::FailureStateError] Raised when the waiter terminates
|
1090
|
+
# because the waiter has entered a state that it will not transition
|
1091
|
+
# out of, preventing success.
|
1092
|
+
#
|
1093
|
+
# @raise [Errors::TooManyAttemptsError] Raised when the configured
|
1094
|
+
# maximum number of attempts have been made, and the waiter is not
|
1095
|
+
# yet successful.
|
1096
|
+
#
|
1097
|
+
# @raise [Errors::UnexpectedError] Raised when an error is encounted
|
1098
|
+
# while polling for a resource that is not expected.
|
1099
|
+
#
|
1100
|
+
# @raise [Errors::NoSuchWaiterError] Raised when you request to wait
|
1101
|
+
# for an unknown state.
|
1102
|
+
#
|
1103
|
+
# @return [Boolean] Returns `true` if the waiter was successful.
|
1104
|
+
# @param [Symbol] waiter_name
|
1105
|
+
# @param [Hash] params ({})
|
1106
|
+
# @param [Hash] options ({})
|
1107
|
+
# @option options [Integer] :max_attempts
|
1108
|
+
# @option options [Integer] :delay
|
1109
|
+
# @option options [Proc] :before_attempt
|
1110
|
+
# @option options [Proc] :before_wait
|
1111
|
+
def wait_until(waiter_name, params = {}, options = {})
|
1112
|
+
w = waiter(waiter_name, options)
|
1113
|
+
yield(w.waiter) if block_given? # deprecated
|
1114
|
+
w.wait(params)
|
1115
|
+
end
|
1116
|
+
|
534
1117
|
# @api private
|
535
1118
|
# @deprecated
|
536
1119
|
def waiter_names
|
537
|
-
|
1120
|
+
waiters.keys
|
1121
|
+
end
|
1122
|
+
|
1123
|
+
private
|
1124
|
+
|
1125
|
+
# @param [Symbol] waiter_name
|
1126
|
+
# @param [Hash] options ({})
|
1127
|
+
def waiter(waiter_name, options = {})
|
1128
|
+
waiter_class = waiters[waiter_name]
|
1129
|
+
if waiter_class
|
1130
|
+
waiter_class.new(options.merge(client: self))
|
1131
|
+
else
|
1132
|
+
raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
|
1133
|
+
end
|
1134
|
+
end
|
1135
|
+
|
1136
|
+
def waiters
|
1137
|
+
{
|
1138
|
+
workspace_active: Waiters::WorkspaceActive,
|
1139
|
+
workspace_deleted: Waiters::WorkspaceDeleted
|
1140
|
+
}
|
538
1141
|
end
|
539
1142
|
|
540
1143
|
class << self
|