---
title: "Create Custom Metric Configuration"
method: POST
path: "/v1/metric_configuration"
tags: ["Custom Metric Configuration"]
---

# Create Custom Metric Configuration

`POST /v1/metric_configuration`

Create Custom Metric configuration Request

## Request body

- CustomMetricConfigurationDetails
  - `service_account_id` string, required — Cloud Account Id for which custom metrics needs to be created.
  - `regions` string[] — Region in which custom metrics to be created.
  - `resource_category` string, required — Name of the Resource category.
  - `resource_type` string, required — Type of the Resource.
  - `resource` string, required — Name of the Resource.
  - `metric_namespace` string, required — The namespace for the metric specified in metric_name.
  - `metric_name` string — The name for the metric associated with the alarm.
  - `status` 'completed' | 'pending' | 'in_progress' | 'error' — Status of the custom Metric Configuration
  - `threshold` integer — The value against which the specified statistics is compared.
  - `comparison_operator` 'GreaterThanOrEqualTo' | 'GreaterThan' | 'LessThanOrEqualTo' | 'LessThan' — The arithmetic operation to use when comparing the specified statistics and threshold.
  - `statistic` 'Average' | 'Maximum' | 'Minimum' | 'SampleCount' | 'Sum' — The statistics for the metric specified in MetricName.
  - `period` integer — Length in seconds used each time when metric is evaluated. Valid values are 10, 30 and any multiple of 60.
  - `evaluation_period` integer — The number of periods over which data is compared to the specified threshold.
  - `priority` integer — Order of priority if there is multiple rules for same metric under a cloud account for a region
  - `tags` KeyValuePair[] — List of tag key/value pairs
    - `key` string — Key of the pair
    - `value` string — Value of the pair
  - `events` string[] — List events for a selected resource in Event subscription

## Response `200`

Success

- string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
