ListScrapers - Amazon Managed Service for Prometheus

ListScrapers

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.

Request Syntax

GET /scrapers?filters&maxResults=maxResults&nextToken=nextToken HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

filters

(Optional) A list of key-value pairs to filter the list of scrapers returned. Keys include status, sourceArn, destinationArn, and alias.

Filters on the same key are OR'd together, and filters on different keys are AND'd together. For example, status=ACTIVE&status=CREATING&alias=Test, will return all scrapers that have the alias Test, and are either in status ACTIVE or CREATING.

To find all active scrapers that are sending metrics to a specific Amazon Managed Service for Prometheus workspace, you would use the ARN of the workspace in a query:

status=ACTIVE&destinationArn=arn:aws:aps:us-east-1:123456789012:workspace/ws-example1-1234-abcd-56ef-123456789012

If this is included, it filters the results to only the scrapers that match the filter.

Map Entries: Maximum number of 4 items.

Key Length Constraints: Minimum length of 1. Maximum length of 256.

Array Members: Minimum number of 1 item. Maximum number of 20 items.

Length Constraints: Minimum length of 1. Maximum length of 256.

maxResults

Optional) The maximum number of scrapers to return in one ListScrapers operation. The range is 1-1000.

If you omit this parameter, the default of 100 is used.

Valid Range: Minimum value of 1. Maximum value of 1000.

nextToken

(Optional) The token for the next set of items to return. (You received this token from a previous call.)

Length Constraints: Minimum length of 0. Maximum length of 1000.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "scrapers": [ { "alias": "string", "arn": "string", "createdAt": number, "destination": { ... }, "lastModifiedAt": number, "roleArn": "string", "scraperId": "string", "source": { ... }, "status": { "statusCode": "string" }, "statusReason": "string", "tags": { "string" : "string" } } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken

A token indicating that there are more results to retrieve. You can use this token as part of your next ListScrapers operation to retrieve those results.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1000.

scrapers

A list of ScraperSummary structures giving information about scrapers in the account that match the filters provided.

Type: Array of ScraperSummary objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

InternalServerException

An unexpected error occurred during the processing of the request.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: