cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/metricexport/cloudwatch \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"log_group_name":"example","role_arn":"arn:aws:iam::account:role/ExampleRole","target_region":"us-east-1"}'{
"cluster_id": "<string>",
"role_arn": "<string>",
"log_group_name": "<string>",
"status": "NOT_DEPLOYED",
"target_region": "<string>",
"user_message": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Create or update the CloudWatch Metric Export configuration for a cluster
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
metricexport
/
cloudwatch
cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/metricexport/cloudwatch \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"log_group_name":"example","role_arn":"arn:aws:iam::account:role/ExampleRole","target_region":"us-east-1"}'{
"cluster_id": "<string>",
"role_arn": "<string>",
"log_group_name": "<string>",
"status": "NOT_DEPLOYED",
"target_region": "<string>",
"user_message": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}This endpoint is in Preview and subject to change. Refer to the API support policy for more details.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
A successful response.
role_arn is the IAM role used to upload metric segments to the target AWS account.
log_group_name is the customized log group name.
Available options:
NOT_DEPLOYED, DISABLING, ENABLING, ENABLED, ERROR target_region specifies the specific AWS region that the metrics will be exported to.

