curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/metricexport/cloudwatch \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"external_id":"example_external_id","log_group_name":"example","role_arn":"arn:aws:iam::account:role/ExampleRole","target_region":"us-east-1"}'{
"cluster_id": "<string>",
"role_arn": "<string>",
"external_id": "<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
Can be used by the following roles assigned at the organization, folder or cluster scope:
- CLUSTER_ADMIN
- CLUSTER_OPERATOR_WRITER
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/metricexport/cloudwatch \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"external_id":"example_external_id","log_group_name":"example","role_arn":"arn:aws:iam::account:role/ExampleRole","target_region":"us-east-1"}'{
"cluster_id": "<string>",
"role_arn": "<string>",
"external_id": "<string>",
"log_group_name": "<string>",
"status": "NOT_DEPLOYED",
"target_region": "<string>",
"user_message": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
role_arn is the IAM role used to upload metric segments to the target AWS account.
external_id to include when assuming the IAM role specified by role_arn. Optional. A specific value may be required by the role's trust policy. Only supported for Advanced clusters. If provided for a Standard cluster, the request is rejected.
log_group_name is the customized log group name.
target_region specifies the specific AWS region that the metrics will be exported to.
Response
A successful response.
role_arn is the IAM role used to upload metric segments to the target AWS account.
external_id, if set, is included when assuming the IAM role. Supported for Advanced clusters only.
log_group_name is the customized log group name.
NOT_DEPLOYED, DISABLING, ENABLING, ENABLED, ERROR target_region specifies the specific AWS region that the metrics will be exported to.

