Generated at:
Replace the CloudWatch metric scrape config of an AWS integration
/api/aws-metric-scrape-configs/{integrationId}Replaces the integration's whole scrape config with the body. A namespace absent from
spec.namespaces is not scraped, and an empty namespaces array stops all scraping. An
empty integrationFilter or filter array means the same as an absent one and is not
returned.
The whole request is validated, and the integration's metrics-pull schedule asserted, before anything is written, so a 400 or 412 response means nothing was stored. Invalid input is rejected rather than corrected: a namespace listed twice, a metric listed twice in a namespace, and a namespace or metric name with leading or trailing whitespace all return 400.
metadata.name is the integration's name; it is read-only and ignored on write. The
dash0.com/origin label is stored by the first write that sets it and ignored afterwards;
a value longer than 255 characters, with non-printable characters, or starting with a
reserved prefix (slo_, check_rule_) returns 400. When an API token without a user omits
it, the server stores api-<uuid>. All other labels and annotations are ignored on write.
Writing an unchanged config leaves dash0.com/updated-at as it was. There is no dataset
query parameter: the dataset is resolved from the integration itself, so a caller cannot
write into a dataset the integration does not belong to.
The response is the document a following GET returns, with namespaces and metrics sorted
ascending.
Restricted to organization administrators and API tokens, like every integration write.
Path parameters 1
integrationIdrequiredThe AWS integration's dash0.com/id.
"uuid"Sample requestcurl --request PUT 'https://api.eu-west-1.aws.dash0.com/api/aws-metric-scrape-configs/123e4567-e89b-42d3-a456-426614174000' \
--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"apiVersion": "dash0.com/v1alpha1",
"kind": "Dash0AwsMetricScrapeConfig",
"metadata": {},
"spec": {
"namespaces": [
{
"namespace": "example",
"metrics": [
"example"
],
"filter": [
{
"key": "service.name",
"operator": "is",
"value": "shop"
}
]
}
],
"integrationFilter": [
{
"key": "service.name",
"operator": "is",
"value": "shop"
}
]
}
}'Request body required
The CloudWatch metric scrape configuration of one AWS integration. There is exactly one document per integration, and a write replaces it as a whole.
Version of the document format. Required on write; a missing or unknown value is rejected.
"dash0.com/v1alpha1""Dash0AwsMetricScrapeConfig"Responses
The integration's scrape config after the replacement.
The CloudWatch metric scrape configuration of one AWS integration. There is exactly one document per integration, and a write replaces it as a whole.
Version of the document format. Required on write; a missing or unknown value is rejected.
"dash0.com/v1alpha1""Dash0AwsMetricScrapeConfig"