选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

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", "roleConfiguration": { "sourceRoleArn": "string", "targetRoleArn": "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:

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。