Amp class
Amazon Managed Service for Prometheus is a serverless, Prometheus-compatible monitoring service for container metrics that makes it easier to securely monitor container environments at scale. With Amazon Managed Service for Prometheus, you can use the same open-source Prometheus data model and query language that you use today to monitor the performance of your containerized workloads, and also enjoy improved scalability, availability, and security without having to manage the underlying infrastructure.
For more information about Amazon Managed Service for Prometheus, see the Amazon Managed Service for Prometheus User Guide.
Amazon Managed Service for Prometheus includes two APIs.
- Use the Amazon Web Services API described in this guide to manage Amazon Managed Service for Prometheus resources, such as workspaces, rule groups, and alert managers.
- Use the Prometheus-compatible API to work within your Prometheus workspace.
Constructors
- Amp({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createAlertManagerDefinition(
{required Uint8List data, required String workspaceId, String? clientToken}) → Future< CreateAlertManagerDefinitionResponse> -
The
CreateAlertManagerDefinitionoperation 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, usePutAlertManagerDefinition. -
createAnomalyDetector(
{required String alias, required AnomalyDetectorConfiguration configuration, required String workspaceId, String? clientToken, int? evaluationIntervalInSeconds, Map< String, String> ? labels, AnomalyDetectorMissingDataAction? missingDataAction, Map<String, String> ? tags}) → Future<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.
-
createLoggingConfiguration(
{required String logGroupArn, required String workspaceId, String? clientToken}) → Future< CreateLoggingConfigurationResponse> -
The
CreateLoggingConfigurationoperation 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. -
createQueryLoggingConfiguration(
{required List< LoggingDestination> destinations, required String workspaceId, String? clientToken}) → Future<CreateQueryLoggingConfigurationResponse> - Creates a query logging configuration for the specified workspace. This operation enables logging of queries that exceed the specified QSP threshold.
-
createRuleGroupsNamespace(
{required Uint8List data, required String name, required String workspaceId, String? clientToken, Map< String, String> ? tags}) → Future<CreateRuleGroupsNamespaceResponse> -
The
CreateRuleGroupsNamespaceoperation 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. Use this operation only to create new rule groups namespaces. To update an existing rule groups namespace, usePutRuleGroupsNamespace. -
createScraper(
{required Destination destination, required ScrapeConfiguration scrapeConfiguration, required Source source, String? alias, String? clientToken, RoleConfiguration? roleConfiguration, Map< String, String> ? tags}) → Future<CreateScraperResponse> -
The
CreateScraperoperation creates a scraper to collect metrics. A scraper pulls metrics from Prometheus-compatible sources and sends them to your Amazon Managed Service for Prometheus workspace. 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, and can be configured to control what metrics are collected, the frequency of collection, what transformations are applied to the metrics, and more. -
createWorkspace(
{String? alias, String? clientToken, String? kmsKeyArn, Map< String, String> ? tags}) → Future<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.
-
deleteAlertManagerDefinition(
{required String workspaceId, String? clientToken}) → Future< void> - Deletes the alert manager definition from a workspace.
-
deleteAnomalyDetector(
{required String anomalyDetectorId, required String workspaceId, String? clientToken}) → Future< void> - Removes an anomaly detector from a workspace. This operation is idempotent.
-
deleteLoggingConfiguration(
{required String workspaceId, String? clientToken}) → Future< void> - Deletes the rules and alerting logging configuration for a workspace.
-
deleteQueryLoggingConfiguration(
{required String workspaceId, String? clientToken}) → Future< void> - Deletes the query logging configuration for the specified workspace.
-
deleteResourcePolicy(
{required String workspaceId, String? clientToken, String? revisionId}) → Future< void> - Deletes the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.
-
deleteRuleGroupsNamespace(
{required String name, required String workspaceId, String? clientToken}) → Future< void> - Deletes one rule groups namespace and its associated rule groups definition.
-
deleteScraper(
{required String scraperId, String? clientToken}) → Future< DeleteScraperResponse> -
The
DeleteScraperoperation deletes one scraper, and stops any metrics collection that the scraper performs. -
deleteScraperLoggingConfiguration(
{required String scraperId, String? clientToken}) → Future< void> - Deletes the logging configuration for a Amazon Managed Service for Prometheus scraper.
-
deleteWorkspace(
{required String workspaceId, String? clientToken}) → Future< void> - Deletes an existing workspace.
-
describeAlertManagerDefinition(
{required String workspaceId}) → Future< DescribeAlertManagerDefinitionResponse> - Retrieves the full information about the alert manager definition for a workspace.
-
describeAnomalyDetector(
{required String anomalyDetectorId, required String workspaceId}) → Future< DescribeAnomalyDetectorResponse> - Retrieves detailed information about a specific anomaly detector, including its status and configuration.
-
describeLoggingConfiguration(
{required String workspaceId}) → Future< DescribeLoggingConfigurationResponse> - Returns complete information about the current rules and alerting logging configuration of the workspace.
-
describeQueryLoggingConfiguration(
{required String workspaceId}) → Future< DescribeQueryLoggingConfigurationResponse> - Retrieves the details of the query logging configuration for the specified workspace.
-
describeResourcePolicy(
{required String workspaceId}) → Future< DescribeResourcePolicyResponse> - Returns information about the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.
-
describeRuleGroupsNamespace(
{required String name, required String workspaceId}) → Future< DescribeRuleGroupsNamespaceResponse> -
Returns complete information about one rule groups namespace. To retrieve
a list of rule groups namespaces, use
ListRuleGroupsNamespaces. -
describeScraper(
{required String scraperId}) → Future< DescribeScraperResponse> -
The
DescribeScraperoperation displays information about an existing scraper. -
describeScraperLoggingConfiguration(
{required String scraperId}) → Future< DescribeScraperLoggingConfigurationResponse> - Describes the logging configuration for a Amazon Managed Service for Prometheus scraper.
-
describeWorkspace(
{required String workspaceId}) → Future< DescribeWorkspaceResponse> - Returns information about an existing workspace.
-
describeWorkspaceConfiguration(
{required String workspaceId}) → Future< 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.
-
getDefaultScraperConfiguration(
) → Future< GetDefaultScraperConfigurationResponse> -
The
GetDefaultScraperConfigurationoperation returns the default scraper configuration used when Amazon EKS creates a scraper for you. -
listAnomalyDetectors(
{required String workspaceId, String? alias, int? maxResults, String? nextToken}) → Future< ListAnomalyDetectorsResponse> - Returns a paginated list of anomaly detectors for a workspace with optional filtering by alias.
-
listRuleGroupsNamespaces(
{required String workspaceId, int? maxResults, String? name, String? nextToken}) → Future< ListRuleGroupsNamespacesResponse> - Returns a list of rule groups namespaces in a workspace.
-
listScrapers(
{Map< String, List< ? filters, int? maxResults, String? nextToken}) → Future<String> >ListScrapersResponse> -
The
ListScrapersoperation lists all of the scrapers in your account. This includes scrapers being created or deleted. You can optionally filter the returned list. -
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceResponse> -
The
ListTagsForResourceoperation 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. -
listWorkspaces(
{String? alias, int? maxResults, String? nextToken}) → Future< ListWorkspacesResponse> - Lists all of the Amazon Managed Service for Prometheus workspaces in your account. This includes workspaces being created or deleted.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putAlertManagerDefinition(
{required Uint8List data, required String workspaceId, String? clientToken}) → Future< 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. -
putAnomalyDetector(
{required String anomalyDetectorId, required AnomalyDetectorConfiguration configuration, required String workspaceId, String? clientToken, int? evaluationIntervalInSeconds, Map< String, String> ? labels, AnomalyDetectorMissingDataAction? missingDataAction}) → Future<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. -
putResourcePolicy(
{required String policyDocument, required String workspaceId, String? clientToken, String? revisionId}) → Future< 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.
-
putRuleGroupsNamespace(
{required Uint8List data, required String name, required String workspaceId, String? clientToken}) → Future< 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.
Use this operation only to update existing rule groups namespaces. To
create a new rule groups namespace, use
CreateRuleGroupsNamespace. -
tagResource(
{required String resourceArn, required Map< String, String> tags}) → Future<void> -
The
TagResourceoperation associates tags with an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are rule groups namespaces, scrapers, and workspaces. -
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> tagKeys}) → Future<void> - 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.
-
updateLoggingConfiguration(
{required String logGroupArn, required String workspaceId, String? clientToken}) → Future< UpdateLoggingConfigurationResponse> - Updates the log group ARN or the workspace ID of the current rules and alerting logging configuration.
-
updateQueryLoggingConfiguration(
{required List< LoggingDestination> destinations, required String workspaceId, String? clientToken}) → Future<UpdateQueryLoggingConfigurationResponse> - Updates the query logging configuration for the specified workspace.
-
updateScraper(
{required String scraperId, String? alias, String? clientToken, Destination? destination, RoleConfiguration? roleConfiguration, ScrapeConfiguration? scrapeConfiguration}) → Future< UpdateScraperResponse> - Updates an existing scraper.
-
updateScraperLoggingConfiguration(
{required ScraperLoggingDestination loggingDestination, required String scraperId, List< ScraperComponent> ? scraperComponents}) → Future<UpdateScraperLoggingConfigurationResponse> - Updates the logging configuration for a Amazon Managed Service for Prometheus scraper.
-
updateWorkspaceAlias(
{required String workspaceId, String? alias, String? clientToken}) → Future< void> - Updates the alias of an existing workspace.
-
updateWorkspaceConfiguration(
{required String workspaceId, String? clientToken, List< LimitsPerLabelSet> ? limitsPerLabelSet, int? retentionPeriodInDays}) → Future<UpdateWorkspaceConfigurationResponse> - Use this operation to create or update the label sets, label set limits, and retention period of a workspace.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited