{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-iot-custommetric.json",
  "title": "AWSIoTCustomMetricProperties",
  "description": "A custom metric published by your devices to Device Defender.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-iot-custommetric.json",
    "sourceSha256": "fe44d37d473a5398d32d289f6339d075beee5a941855d6968529fdffdcf0e8c0"
  },
  "type": "object",
  "properties": {
    "MetricName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "[a-zA-Z0-9:_-]+",
          "minLength": 1,
          "maxLength": 128
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined."
    },
    "DisplayName": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 128
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined."
    },
    "MetricType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "string-list",
            "ip-address-list",
            "number-list",
            "number"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The type of the custom metric. Types include string-list, ip-address-list, number-list, and number."
    },
    "Tags": {
      "type": "array",
      "maxItems": 50,
      "uniqueItems": true,
      "insertionOrder": false,
      "description": "An array of key-value pairs to apply to this resource.",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::IoT::CustomMetric",
  "primaryIdentifier": [
    "/properties/MetricName"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot.git",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/MetricArn"
  ],
  "$defs": {
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The tag's key."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The tag's value."
        }
      },
      "required": [
        "Value",
        "Key"
      ],
      "title": "AWSIoTCustomMetricTagDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "MetricType"
  ],
  "createOnlyProperties": [
    "/properties/MetricName",
    "/properties/MetricType"
  ]
}
