Class: Aws::PrometheusService::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::PrometheusService::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-prometheusservice/client.rb,
sig/client.rbs
Overview
An API client for PrometheusService. To construct a client, you need to configure a :region and :credentials.
client = Aws::PrometheusService::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Defined Under Namespace
Modules: _CreateAlertManagerDefinitionResponseSuccess, _CreateAnomalyDetectorResponseSuccess, _CreateLoggingConfigurationResponseSuccess, _CreateQueryLoggingConfigurationResponseSuccess, _CreateRuleGroupsNamespaceResponseSuccess, _CreateScraperResponseSuccess, _CreateWorkspaceResponseSuccess, _DeleteScraperResponseSuccess, _DescribeAlertManagerDefinitionResponseSuccess, _DescribeAnomalyDetectorResponseSuccess, _DescribeLoggingConfigurationResponseSuccess, _DescribeQueryLoggingConfigurationResponseSuccess, _DescribeResourcePolicyResponseSuccess, _DescribeRuleGroupsNamespaceResponseSuccess, _DescribeScraperLoggingConfigurationResponseSuccess, _DescribeScraperResponseSuccess, _DescribeWorkspaceConfigurationResponseSuccess, _DescribeWorkspaceResponseSuccess, _GetDefaultScraperConfigurationResponseSuccess, _ListAnomalyDetectorsResponseSuccess, _ListRuleGroupsNamespacesResponseSuccess, _ListScrapersResponseSuccess, _ListTagsForResourceResponseSuccess, _ListWorkspacesResponseSuccess, _PutAlertManagerDefinitionResponseSuccess, _PutAnomalyDetectorResponseSuccess, _PutResourcePolicyResponseSuccess, _PutRuleGroupsNamespaceResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateLoggingConfigurationResponseSuccess, _UpdateQueryLoggingConfigurationResponseSuccess, _UpdateScraperLoggingConfigurationResponseSuccess, _UpdateScraperResponseSuccess, _UpdateWorkspaceConfigurationResponseSuccess
Constant Summary collapse
- Params =
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_alert_manager_definition(params = {}) ⇒ Types::CreateAlertManagerDefinitionResponse
The
CreateAlertManagerDefinitionoperation creates the alert manager definition in a workspace. -
#create_anomaly_detector(params = {}) ⇒ Types::CreateAnomalyDetectorResponse
Creates an anomaly detector within a workspace using the Random Cut Forest algorithm for time-series analysis.
-
#create_logging_configuration(params = {}) ⇒ Types::CreateLoggingConfigurationResponse
The
CreateLoggingConfigurationoperation creates rules and alerting logging configuration for the workspace. -
#create_query_logging_configuration(params = {}) ⇒ Types::CreateQueryLoggingConfigurationResponse
Creates a query logging configuration for the specified workspace.
-
#create_rule_groups_namespace(params = {}) ⇒ Types::CreateRuleGroupsNamespaceResponse
The
CreateRuleGroupsNamespaceoperation creates a rule groups namespace within a workspace. -
#create_scraper(params = {}) ⇒ Types::CreateScraperResponse
Creates a scraper to collect metrics from Prometheus-compatible sources.
-
#create_workspace(params = {}) ⇒ Types::CreateWorkspaceResponse
Creates a Prometheus workspace.
-
#delete_alert_manager_definition(params = {}) ⇒ Struct
Deletes the alert manager definition from a workspace.
-
#delete_anomaly_detector(params = {}) ⇒ Struct
Removes an anomaly detector from a workspace.
-
#delete_logging_configuration(params = {}) ⇒ Struct
Deletes the rules and alerting logging configuration for a workspace.
-
#delete_query_logging_configuration(params = {}) ⇒ Struct
Deletes the query logging configuration for the specified workspace.
-
#delete_resource_policy(params = {}) ⇒ Struct
Deletes the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.
-
#delete_rule_groups_namespace(params = {}) ⇒ Struct
Deletes one rule groups namespace and its associated rule groups definition.
-
#delete_scraper(params = {}) ⇒ Types::DeleteScraperResponse
The
DeleteScraperoperation deletes one scraper, and stops any metrics collection that the scraper performs. -
#delete_scraper_logging_configuration(params = {}) ⇒ Struct
Deletes the logging configuration for a Amazon Managed Service for Prometheus scraper.
-
#delete_workspace(params = {}) ⇒ Struct
Deletes an existing workspace.
-
#describe_alert_manager_definition(params = {}) ⇒ Types::DescribeAlertManagerDefinitionResponse
Retrieves the full information about the alert manager definition for a workspace.
-
#describe_anomaly_detector(params = {}) ⇒ Types::DescribeAnomalyDetectorResponse
Retrieves detailed information about a specific anomaly detector, including its status and configuration.
-
#describe_logging_configuration(params = {}) ⇒ Types::DescribeLoggingConfigurationResponse
Returns complete information about the current rules and alerting logging configuration of the workspace.
-
#describe_query_logging_configuration(params = {}) ⇒ Types::DescribeQueryLoggingConfigurationResponse
Retrieves the details of the query logging configuration for the specified workspace.
-
#describe_resource_policy(params = {}) ⇒ Types::DescribeResourcePolicyResponse
Returns information about the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.
-
#describe_rule_groups_namespace(params = {}) ⇒ Types::DescribeRuleGroupsNamespaceResponse
Returns complete information about one rule groups namespace.
-
#describe_scraper(params = {}) ⇒ Types::DescribeScraperResponse
The
DescribeScraperoperation displays information about an existing scraper. -
#describe_scraper_logging_configuration(params = {}) ⇒ Types::DescribeScraperLoggingConfigurationResponse
Describes the logging configuration for a Amazon Managed Service for Prometheus scraper.
-
#describe_workspace(params = {}) ⇒ Types::DescribeWorkspaceResponse
Returns information about an existing workspace.
-
#describe_workspace_configuration(params = {}) ⇒ Types::DescribeWorkspaceConfigurationResponse
Use this operation to return information about the configuration of a workspace.
-
#get_default_scraper_configuration(params = {}) ⇒ Types::GetDefaultScraperConfigurationResponse
The
GetDefaultScraperConfigurationoperation returns the default scraper configuration used when Amazon EKS creates a scraper for you. -
#list_anomaly_detectors(params = {}) ⇒ Types::ListAnomalyDetectorsResponse
Returns a paginated list of anomaly detectors for a workspace with optional filtering by alias.
-
#list_rule_groups_namespaces(params = {}) ⇒ Types::ListRuleGroupsNamespacesResponse
Returns a list of rule groups namespaces in a workspace.
-
#list_scrapers(params = {}) ⇒ Types::ListScrapersResponse
The
ListScrapersoperation lists all of the scrapers in your account. -
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
The
ListTagsForResourceoperation returns the tags that are associated with an Amazon Managed Service for Prometheus resource. -
#list_workspaces(params = {}) ⇒ Types::ListWorkspacesResponse
Lists all of the Amazon Managed Service for Prometheus workspaces in your account.
-
#put_alert_manager_definition(params = {}) ⇒ Types::PutAlertManagerDefinitionResponse
Updates an existing alert manager definition in a workspace.
-
#put_anomaly_detector(params = {}) ⇒ Types::PutAnomalyDetectorResponse
When you call
PutAnomalyDetector, the operation creates a new anomaly detector if one doesn't exist, or updates an existing one. -
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Creates or updates a resource-based policy for an Amazon Managed Service for Prometheus workspace.
-
#put_rule_groups_namespace(params = {}) ⇒ Types::PutRuleGroupsNamespaceResponse
Updates an existing rule groups namespace within a workspace.
-
#tag_resource(params = {}) ⇒ Struct
The
TagResourceoperation associates tags with an Amazon Managed Service for Prometheus resource. -
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from an Amazon Managed Service for Prometheus resource.
-
#update_logging_configuration(params = {}) ⇒ Types::UpdateLoggingConfigurationResponse
Updates the log group ARN or the workspace ID of the current rules and alerting logging configuration.
-
#update_query_logging_configuration(params = {}) ⇒ Types::UpdateQueryLoggingConfigurationResponse
Updates the query logging configuration for the specified workspace.
-
#update_scraper(params = {}) ⇒ Types::UpdateScraperResponse
Updates an existing scraper.
-
#update_scraper_logging_configuration(params = {}) ⇒ Types::UpdateScraperLoggingConfigurationResponse
Updates the logging configuration for a Amazon Managed Service for Prometheus scraper.
-
#update_workspace_alias(params = {}) ⇒ Struct
Updates the alias of an existing workspace.
-
#update_workspace_configuration(params = {}) ⇒ Types::UpdateWorkspaceConfigurationResponse
Use this operation to create or update the label sets, label set limits, and retention period of a workspace.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
471 472 473 |
# File 'lib/aws-sdk-prometheusservice/client.rb', line 471 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3271 3272 3273 |
# File 'lib/aws-sdk-prometheusservice/client.rb', line 3271 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3274 3275 3276 |
# File 'lib/aws-sdk-prometheusservice/client.rb', line 3274 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 |
# File 'lib/aws-sdk-prometheusservice/client.rb', line 3121 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::PrometheusService') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-prometheusservice' context[:gem_version] = '1.77.0' Seahorse::Client::Request.new(handlers, context) end |
#create_alert_manager_definition(params = {}) ⇒ Types::CreateAlertManagerDefinitionResponse
The CreateAlertManagerDefinition operation creates the alert manager
definition in a workspace. If a workspace already has an alert manager
definition, don't use this operation to update it. Instead, use
PutAlertManagerDefinition.
86 |
# File 'sig/client.rbs', line 86
def create_alert_manager_definition: (
|
#create_anomaly_detector(params = {}) ⇒ Types::CreateAnomalyDetectorResponse
Creates an anomaly detector within a workspace using the Random Cut Forest algorithm for time-series analysis. The anomaly detector analyzes Amazon Managed Service for Prometheus metrics to identify unusual patterns and behaviors.
101 |
# File 'sig/client.rbs', line 101
def create_anomaly_detector: (
|
#create_logging_configuration(params = {}) ⇒ Types::CreateLoggingConfigurationResponse
The CreateLoggingConfiguration operation creates rules and alerting
logging configuration for the workspace. Use this operation to set the
CloudWatch log group to which the logs will be published to.
121 |
# File 'sig/client.rbs', line 121
def create_logging_configuration: (
|
#create_query_logging_configuration(params = {}) ⇒ Types::CreateQueryLoggingConfigurationResponse
Creates a query logging configuration for the specified workspace. This operation enables logging of queries that exceed the specified QSP threshold.
133 |
# File 'sig/client.rbs', line 133
def create_query_logging_configuration: (
|
#create_rule_groups_namespace(params = {}) ⇒ Types::CreateRuleGroupsNamespaceResponse
The CreateRuleGroupsNamespace operation creates a rule groups
namespace within a workspace. A rule groups namespace is associated
with exactly one rules file. A workspace can have multiple rule groups
namespaces.
The combined length of a rule group namespace and a rule group name cannot exceed 721 UTF-8 bytes.
Use this operation only to create new rule groups namespaces. To
update an existing rule groups namespace, use
PutRuleGroupsNamespace.
150 |
# File 'sig/client.rbs', line 150
def create_rule_groups_namespace: (
|
#create_scraper(params = {}) ⇒ Types::CreateScraperResponse
Creates a scraper to collect metrics from Prometheus-compatible sources. The scraper sends the collected metrics to Amazon Managed Service for Prometheus workspaces or CloudWatch datasets. You can configure scrapers to collect metrics from Amazon EKS clusters, Amazon MSK clusters, or from VPC-based sources that support DNS-based service discovery. Scrapers are flexible. You can configure a scraper to control which metrics to collect, the frequency of collection, which transformations to apply to the metrics, and more.
An IAM role will be created for you that Amazon Managed Service for Prometheus uses to access the metrics in your source. You must configure this role with a policy that allows it to scrape metrics from your source. For Amazon EKS sources, see Configuring your Amazon EKS cluster in the Amazon Managed Service for Prometheus User Guide.
The scrapeConfiguration parameter contains the base-64 encoded YAML
configuration for the scraper.
When creating a scraper, the service creates a Network Interface in
each Availability Zone that are passed into CreateScraper
through subnets. These network interfaces are used to connect to your
source within the VPC for scraping metrics.
167 |
# File 'sig/client.rbs', line 167
def create_scraper: (
|
#create_workspace(params = {}) ⇒ Types::CreateWorkspaceResponse
Creates a Prometheus workspace. A workspace is a logical space dedicated to the storage and querying of Prometheus metrics. You can have one or more workspaces in each Region in your account.
209 |
# File 'sig/client.rbs', line 209
def create_workspace: (
|
#delete_alert_manager_definition(params = {}) ⇒ Struct
Deletes the alert manager definition from a workspace.
218 |
# File 'sig/client.rbs', line 218
def delete_alert_manager_definition: (
|
#delete_anomaly_detector(params = {}) ⇒ Struct
Removes an anomaly detector from a workspace. This operation is idempotent.
225 |
# File 'sig/client.rbs', line 225
def delete_anomaly_detector: (
|
#delete_logging_configuration(params = {}) ⇒ Struct
Deletes the rules and alerting logging configuration for a workspace.
233 |
# File 'sig/client.rbs', line 233
def delete_logging_configuration: (
|
#delete_query_logging_configuration(params = {}) ⇒ Struct
Deletes the query logging configuration for the specified workspace.
240 |
# File 'sig/client.rbs', line 240
def delete_query_logging_configuration: (
|
#delete_resource_policy(params = {}) ⇒ Struct
Deletes the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.
247 |
# File 'sig/client.rbs', line 247
def delete_resource_policy: (
|
#delete_rule_groups_namespace(params = {}) ⇒ Struct
Deletes one rule groups namespace and its associated rule groups definition.
255 |
# File 'sig/client.rbs', line 255
def delete_rule_groups_namespace: (
|
#delete_scraper(params = {}) ⇒ Types::DeleteScraperResponse
The DeleteScraper operation deletes one scraper, and stops any
metrics collection that the scraper performs.
268 |
# File 'sig/client.rbs', line 268
def delete_scraper: (
|
#delete_scraper_logging_configuration(params = {}) ⇒ Struct
Deletes the logging configuration for a Amazon Managed Service for Prometheus scraper.
275 |
# File 'sig/client.rbs', line 275
def delete_scraper_logging_configuration: (
|
#delete_workspace(params = {}) ⇒ Struct
Deletes an existing workspace.
282 |
# File 'sig/client.rbs', line 282
def delete_workspace: (
|
#describe_alert_manager_definition(params = {}) ⇒ Types::DescribeAlertManagerDefinitionResponse
Retrieves the full information about the alert manager definition for a workspace.
293 |
# File 'sig/client.rbs', line 293
def describe_alert_manager_definition: (
|
#describe_anomaly_detector(params = {}) ⇒ Types::DescribeAnomalyDetectorResponse
Retrieves detailed information about a specific anomaly detector, including its status and configuration.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* anomaly_detector_active
* anomaly_detector_deleted
303 |
# File 'sig/client.rbs', line 303
def describe_anomaly_detector: (
|
#describe_logging_configuration(params = {}) ⇒ Types::DescribeLoggingConfigurationResponse
Returns complete information about the current rules and alerting logging configuration of the workspace.
314 |
# File 'sig/client.rbs', line 314
def describe_logging_configuration: (
|
#describe_query_logging_configuration(params = {}) ⇒ Types::DescribeQueryLoggingConfigurationResponse
Retrieves the details of the query logging configuration for the specified workspace.
324 |
# File 'sig/client.rbs', line 324
def describe_query_logging_configuration: (
|
#describe_resource_policy(params = {}) ⇒ Types::DescribeResourcePolicyResponse
Returns information about the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.
336 |
# File 'sig/client.rbs', line 336
def describe_resource_policy: (
|
#describe_rule_groups_namespace(params = {}) ⇒ Types::DescribeRuleGroupsNamespaceResponse
Returns complete information about one rule groups namespace. To
retrieve a list of rule groups namespaces, use
ListRuleGroupsNamespaces.
346 |
# File 'sig/client.rbs', line 346
def describe_rule_groups_namespace: (
|
#describe_scraper(params = {}) ⇒ Types::DescribeScraperResponse
The DescribeScraper operation displays information about an existing
scraper.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* scraper_active
* scraper_deleted
357 |
# File 'sig/client.rbs', line 357
def describe_scraper: (
|
#describe_scraper_logging_configuration(params = {}) ⇒ Types::DescribeScraperLoggingConfigurationResponse
Describes the logging configuration for a Amazon Managed Service for Prometheus scraper.
371 |
# File 'sig/client.rbs', line 371
def describe_scraper_logging_configuration: (
|
#describe_workspace(params = {}) ⇒ Types::DescribeWorkspaceResponse
Returns information about an existing workspace.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* workspace_active
* workspace_deleted
381 |
# File 'sig/client.rbs', line 381
def describe_workspace: (
|
#describe_workspace_configuration(params = {}) ⇒ Types::DescribeWorkspaceConfigurationResponse
Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period.
391 |
# File 'sig/client.rbs', line 391
def describe_workspace_configuration: (
|
#get_default_scraper_configuration(params = {}) ⇒ Types::GetDefaultScraperConfigurationResponse
The GetDefaultScraperConfiguration operation returns the default
scraper configuration used when Amazon EKS creates a scraper for you.
401 |
# File 'sig/client.rbs', line 401
def get_default_scraper_configuration: (
|
#list_anomaly_detectors(params = {}) ⇒ Types::ListAnomalyDetectorsResponse
Returns a paginated list of anomaly detectors for a workspace with optional filtering by alias.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
411 |
# File 'sig/client.rbs', line 411
def list_anomaly_detectors: (
|
#list_rule_groups_namespaces(params = {}) ⇒ Types::ListRuleGroupsNamespacesResponse
Returns a list of rule groups namespaces in a workspace.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
425 |
# File 'sig/client.rbs', line 425
def list_rule_groups_namespaces: (
|
#list_scrapers(params = {}) ⇒ Types::ListScrapersResponse
The ListScrapers operation lists all of the scrapers in your
account. This includes scrapers being created or deleted. You can
optionally filter the returned list.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
439 |
# File 'sig/client.rbs', line 439
def list_scrapers: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
The ListTagsForResource operation returns the tags that are
associated with an Amazon Managed Service for Prometheus resource.
Currently, the only resources that can be tagged are scrapers,
workspaces, and rule groups namespaces.
451 |
# File 'sig/client.rbs', line 451
def list_tags_for_resource: (
|
#list_workspaces(params = {}) ⇒ Types::ListWorkspacesResponse
Lists all of the Amazon Managed Service for Prometheus workspaces in your account. This includes workspaces being created or deleted.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
462 |
# File 'sig/client.rbs', line 462
def list_workspaces: (
|
#put_alert_manager_definition(params = {}) ⇒ Types::PutAlertManagerDefinitionResponse
Updates an existing alert manager definition in a workspace. If the
workspace does not already have an alert manager definition, don't
use this operation to create it. Instead, use
CreateAlertManagerDefinition.
474 |
# File 'sig/client.rbs', line 474
def put_alert_manager_definition: (
|
#put_anomaly_detector(params = {}) ⇒ Types::PutAnomalyDetectorResponse
When you call PutAnomalyDetector, the operation creates a new
anomaly detector if one doesn't exist, or updates an existing one.
Each call to this operation triggers a complete retraining of the
detector, which includes querying the minimum required samples and
backfilling the detector with historical data. This process occurs
regardless of whether you're making a minor change like updating the
evaluation interval or making more substantial modifications. The
operation serves as the single method for creating, updating, and
retraining anomaly detectors.
489 |
# File 'sig/client.rbs', line 489
def put_anomaly_detector: (
|
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Creates or updates a resource-based policy for an Amazon Managed Service for Prometheus workspace. Use resource-based policies to grant permissions to other AWS accounts or services to access your workspace.
Only Prometheus-compatible APIs can be used for workspace sharing. You can add non-Prometheus-compatible APIs to the policy, but they will be ignored. For more information, see Prometheus-compatible APIs in the Amazon Managed Service for Prometheus User Guide.
If your workspace uses customer-managed KMS keys for encryption, you must grant the principals in your resource-based policy access to those KMS keys. You can do this by creating KMS grants. For more information, see CreateGrant in the AWS Key Management Service API Reference and Encryption at rest in the Amazon Managed Service for Prometheus User Guide.
For more information about working with IAM, see Using Amazon Managed Service for Prometheus with IAM in the Amazon Managed Service for Prometheus User Guide.
509 |
# File 'sig/client.rbs', line 509
def put_resource_policy: (
|
#put_rule_groups_namespace(params = {}) ⇒ Types::PutRuleGroupsNamespaceResponse
Updates an existing rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces.
The combined length of a rule group namespace and a rule group name cannot exceed 721 UTF-8 bytes.
Use this operation only to update existing rule groups namespaces. To
create a new rule groups namespace, use CreateRuleGroupsNamespace.
You can't use this operation to add tags to an existing rule groups
namespace. Instead, use TagResource.
525 |
# File 'sig/client.rbs', line 525
def put_rule_groups_namespace: (
|
#tag_resource(params = {}) ⇒ Struct
The TagResource operation associates tags with an Amazon Managed
Service for Prometheus resource. The only resources that can be tagged
are rule groups namespaces, scrapers, and workspaces.
If you specify a new tag key for the resource, this tag is appended to
the list of tags associated with the resource. If you specify a tag
key that is already associated with the resource, the new tag value
that you specify replaces the previous value for that tag. To remove a
tag, use UntagResource.
537 |
# File 'sig/client.rbs', line 537
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are rule groups namespaces, scrapers, and workspaces.
547 |
# File 'sig/client.rbs', line 547
def untag_resource: (
|
#update_logging_configuration(params = {}) ⇒ Types::UpdateLoggingConfigurationResponse
Updates the log group ARN or the workspace ID of the current rules and alerting logging configuration.
558 |
# File 'sig/client.rbs', line 558
def update_logging_configuration: (
|
#update_query_logging_configuration(params = {}) ⇒ Types::UpdateQueryLoggingConfigurationResponse
Updates the query logging configuration for the specified workspace.
570 |
# File 'sig/client.rbs', line 570
def update_query_logging_configuration: (
|
#update_scraper(params = {}) ⇒ Types::UpdateScraperResponse
Updates an existing scraper.
You can't use this function to update the source from which the scraper is collecting metrics. To change the source, delete the scraper and create a new one.
587 |
# File 'sig/client.rbs', line 587
def update_scraper: (
|
#update_scraper_logging_configuration(params = {}) ⇒ Types::UpdateScraperLoggingConfigurationResponse
Updates the logging configuration for a Amazon Managed Service for Prometheus scraper.
614 |
# File 'sig/client.rbs', line 614
def update_scraper_logging_configuration: (
|
#update_workspace_alias(params = {}) ⇒ Struct
Updates the alias of an existing workspace.
633 |
# File 'sig/client.rbs', line 633
def update_workspace_alias: (
|
#update_workspace_configuration(params = {}) ⇒ Types::UpdateWorkspaceConfigurationResponse
Use this operation to create or update the label sets, label set limits, and retention period of a workspace.
You must specify at least one of limitsPerLabelSet or
retentionPeriodInDays for the request to be valid.
645 |
# File 'sig/client.rbs', line 645
def update_workspace_configuration: (
|
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts |
|---|---|---|---|
| anomaly_detector_active | #describe_anomaly_detector | 2 | 60 |
| anomaly_detector_deleted | #describe_anomaly_detector | 2 | 60 |
| scraper_active | #describe_scraper | 2 | 60 |
| scraper_deleted | #describe_scraper | 2 | 60 |
| workspace_active | #describe_workspace | 2 | 60 |
| workspace_deleted | #describe_workspace | 2 | 60 |
663 |
# File 'sig/client.rbs', line 663
def wait_until: (:anomaly_detector_active waiter_name,
|
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3240 3241 3242 |
# File 'lib/aws-sdk-prometheusservice/client.rb', line 3240 def waiter_names waiters.keys end |