AWS.Amp — AWS SDK for JavaScript (original) (raw)

We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Amp

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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.

Sending a Request Using Amp

var amp = new AWS.Amp();
amp.createAlertManagerDefinition(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Amp object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var amp = new AWS.Amp({apiVersion: '2020-08-01'});

You can also set the API version globally in AWS.config.apiVersions using the amp service identifier:

AWS.config.apiVersions = {
  amp: '2020-08-01',
  // other service API versions
};

var amp = new AWS.Amp();

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

scraperActive, scraperDeleted, workspaceActive, workspaceDeleted

Constructor Summarycollapse

Property Summarycollapse

Properties inherited from AWS.Service

apiVersions

Method Summarycollapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.Amp(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Property Details

endpointAWS.Endpoint

Returns an Endpoint object representing the endpoint URL for service requests.

Method Details

createAlertManagerDefinition(params = {}, callback) ⇒ AWS.Request

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.

createLoggingConfiguration(params = {}, callback) ⇒ AWS.Request

The CreateLoggingConfiguration operation creates a logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to.

createRuleGroupsNamespace(params = {}, callback) ⇒ AWS.Request

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.

Use this operation only to create new rule groups namespaces. To update an existing rule groups namespace, use PutRuleGroupsNamespace.

createScraper(params = {}, callback) ⇒ AWS.Request

The CreateScraper operation creates a scraper to collect metrics. A scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS cluster, and sends them to your Amazon Managed Service for Prometheus workspace. You can configure the scraper to control what metrics are collected, and what transformations are applied prior to sending them to your workspace.

If needed, an IAM role will be created for you that gives Amazon Managed Service for Prometheus access to the metrics in your cluster. For more information, see Using roles for scraping metrics from EKS in the Amazon Managed Service for Prometheus User Guide.

You cannot update a scraper. If you want to change the configuration of the scraper, create a new scraper and delete the old one.

The scrapeConfiguration parameter contains the base64-encoded version of the YAML configuration file.

Note: For more information about collectors, including what metrics are collected, and how to configure the scraper, see Amazon Web Services managed collectors in the Amazon Managed Service for Prometheus User Guide.

createWorkspace(params = {}, callback) ⇒ AWS.Request

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(params = {}, callback) ⇒ AWS.Request

Deletes the alert manager definition from a workspace.

deleteLoggingConfiguration(params = {}, callback) ⇒ AWS.Request

Deletes the logging configuration for a workspace.

deleteRuleGroupsNamespace(params = {}, callback) ⇒ AWS.Request

Deletes one rule groups namespace and its associated rule groups definition.

deleteScraper(params = {}, callback) ⇒ AWS.Request

The DeleteScraper operation deletes one scraper, and stops any metrics collection that the scraper performs.

deleteWorkspace(params = {}, callback) ⇒ AWS.Request

Deletes an existing workspace.

Note: When you delete a workspace, the data that has been ingested into it is not immediately deleted. It will be permanently deleted within one month.

describeAlertManagerDefinition(params = {}, callback) ⇒ AWS.Request

Retrieves the full information about the alert manager definition for a workspace.

describeLoggingConfiguration(params = {}, callback) ⇒ AWS.Request

Returns complete information about the current logging configuration of the workspace.

describeRuleGroupsNamespace(params = {}, callback) ⇒ AWS.Request

Returns complete information about one rule groups namespace. To retrieve a list of rule groups namespaces, use ListRuleGroupsNamespaces.

describeScraper(params = {}, callback) ⇒ AWS.Request

The DescribeScraper operation displays information about an existing scraper.

describeWorkspace(params = {}, callback) ⇒ AWS.Request

Returns information about an existing workspace.

getDefaultScraperConfiguration(params = {}, callback) ⇒ AWS.Request

The GetDefaultScraperConfiguration operation returns the default scraper configuration used when Amazon EKS creates a scraper for you.

listRuleGroupsNamespaces(params = {}, callback) ⇒ AWS.Request

Returns a list of rule groups namespaces in a workspace.

listScrapers(params = {}, callback) ⇒ AWS.Request

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.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

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 workspaces and rule groups namespaces.

listWorkspaces(params = {}, callback) ⇒ AWS.Request

Lists all of the Amazon Managed Service for Prometheus workspaces in your account. This includes workspaces being created or deleted.

putAlertManagerDefinition(params = {}, callback) ⇒ AWS.Request

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.

putRuleGroupsNamespace(params = {}, callback) ⇒ AWS.Request

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.

You can't use this operation to add tags to an existing rule groups namespace. Instead, use TagResource.

tagResource(params = {}, callback) ⇒ AWS.Request

The TagResource operation associates tags with an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces.

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.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces.

updateLoggingConfiguration(params = {}, callback) ⇒ AWS.Request

Updates the log group ARN or the workspace ID of the current logging configuration.

updateWorkspaceAlias(params = {}, callback) ⇒ AWS.Request

Updates the alias of an existing workspace.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given Amp resource. The final callback or'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Waiter Resource Details

amp.waitFor('scraperActive', params = {}, [callback]) ⇒ AWS.Request

Waits for the scraperActive state by periodically calling the underlyingAmp.describeScraper() operation every 2 seconds (at most 60 times).

amp.waitFor('scraperDeleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the scraperDeleted state by periodically calling the underlyingAmp.describeScraper() operation every 2 seconds (at most 60 times).

amp.waitFor('workspaceActive', params = {}, [callback]) ⇒ AWS.Request

Waits for the workspaceActive state by periodically calling the underlyingAmp.describeWorkspace() operation every 2 seconds (at most 60 times).

amp.waitFor('workspaceDeleted', params = {}, [callback]) ⇒ AWS.Request

Waits for the workspaceDeleted state by periodically calling the underlyingAmp.describeWorkspace() operation every 2 seconds (at most 60 times).