{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-iot-fleetmetric.json",
  "title": "AWSIoTFleetMetricProperties",
  "description": "An aggregated metric of certain devices in your fleet. 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-fleetmetric.json",
    "sourceSha256": "3d43b8b9ec677c21915b6e1d48dd2402ebe5ac873963c97eac5a446ad99d263d"
  },
  "type": "object",
  "properties": {
    "MetricName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the fleet metric"
    },
    "Description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The description of a fleet metric"
    },
    "QueryString": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Fleet Indexing query used by a fleet metric"
    },
    "Period": {
      "description": "The period of metric emission in seconds",
      "type": "integer"
    },
    "AggregationField": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The aggregation field to perform aggregation and metric emission"
    },
    "QueryVersion": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The version of a Fleet Indexing query used by a fleet metric"
    },
    "IndexName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The index name of a fleet metric"
    },
    "Unit": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The unit of data points emitted by a fleet metric"
    },
    "AggregationType": {
      "$ref": "#/$defs/AggregationType"
    },
    "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::FleetMetric",
  "primaryIdentifier": [
    "/properties/MetricName"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot.git",
  "taggable": true,
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/MetricName"
  ],
  "$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": "AWSIoTFleetMetricTagDefinition",
      "additionalProperties": false
    },
    "AggregationType": {
      "description": "Aggregation types supported by Fleet Indexing",
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Fleet Indexing aggregation type names such as Statistics, Percentiles and Cardinality"
        },
        "Values": {
          "description": "Fleet Indexing aggregation type values",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "Name",
        "Values"
      ],
      "title": "AWSIoTFleetMetricAggregationTypeDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "MetricName"
  ],
  "readOnlyProperties": [
    "/properties/MetricArn",
    "/properties/CreationDate",
    "/properties/LastModifiedDate",
    "/properties/Version"
  ]
}
