Updates an existing scraper¶
Description¶
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.
Usage¶
prometheusservice_update_scraper(scraperId, alias, scrapeConfiguration,
destination, roleConfiguration, clientToken, exporters)
Arguments¶
-
scraperId[required] The ID of the scraper to update.
-
aliasThe new alias of the scraper.
-
scrapeConfigurationContains the base-64 encoded YAML configuration for the scraper.
For more information about configuring a scraper, see Using an Amazon Web Services managed collector in the Amazon Managed Service for Prometheus User Guide.
-
destinationThe new destination where the scraper sends metrics. Valid destinations are Amazon Managed Service for Prometheus workspaces and CloudWatch datasets.
-
roleConfigurationUse this structure to enable cross-account access, so that you can use a target account to access Prometheus metrics from source accounts.
-
clientTokenA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
-
exportersThe exporter configurations for the scraper. You can configure at most one Amazon OpenSearch Service domain. If you don't specify a value, the existing exporter configuration remains unchanged.
Value¶
A list with the following syntax:
list(
scraperId = "string",
arn = "string",
status = list(
statusCode = "CREATING"|"UPDATING"|"ACTIVE"|"DELETING"|"CREATION_FAILED"|"UPDATE_FAILED"|"DELETION_FAILED"
),
tags = list(
"string"
)
)
Request syntax¶
svc$update_scraper(
scraperId = "string",
alias = "string",
scrapeConfiguration = list(
configurationBlob = raw
),
destination = list(
ampConfiguration = list(
workspaceArn = "string"
),
cloudWatchConfiguration = list(
datasetArn = "string"
)
),
roleConfiguration = list(
sourceRoleArn = "string",
targetRoleArn = "string"
),
clientToken = "string",
exporters = list(
list(
openSearchConfiguration = list(
domainArn = "string"
)
)
)
)