{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-device-defender/json-schema/amazon-iot-device-defender-describe-custom-metric-response-schema.json",
  "title": "DescribeCustomMetricResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-device-defender-custom-metric-api-openapi.yml#/components/schemas/DescribeCustomMetricResponse",
  "type": "object",
  "properties": {
    "metricName": {
      "allOf": [
        {
          "$ref": "#/$defs/MetricName"
        },
        {
          "description": " The name of the custom metric. "
        }
      ]
    },
    "metricArn": {
      "allOf": [
        {
          "$ref": "#/$defs/CustomMetricArn"
        },
        {
          "description": " The Amazon Resource Number (ARN) of the custom metric. "
        }
      ]
    },
    "metricType": {
      "allOf": [
        {
          "$ref": "#/$defs/CustomMetricType"
        },
        {
          "description": "<p> The type of the custom metric. </p> <important> <p>The type <code>number</code> only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.</p> </important>"
        }
      ]
    },
    "displayName": {
      "allOf": [
        {
          "$ref": "#/$defs/CustomMetricDisplayName"
        },
        {
          "description": " Field represents a friendly name in the console for the custom metric; doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated. "
        }
      ]
    },
    "creationDate": {
      "allOf": [
        {
          "$ref": "#/$defs/Timestamp"
        },
        {
          "description": " The creation date of the custom metric in milliseconds since epoch. "
        }
      ]
    },
    "lastModifiedDate": {
      "allOf": [
        {
          "$ref": "#/$defs/Timestamp"
        },
        {
          "description": " The time the custom metric was last modified in milliseconds since epoch. "
        }
      ]
    }
  },
  "$defs": {
    "CustomMetricArn": {
      "type": "string"
    },
    "CustomMetricDisplayName": {
      "type": "string",
      "pattern": "[\\p{Graph}\\x20]*",
      "maxLength": 128
    },
    "CustomMetricType": {
      "type": "string",
      "enum": [
        "string-list",
        "ip-address-list",
        "number-list",
        "number"
      ]
    },
    "MetricName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time"
    }
  }
}