{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-systems-manager/json-schema/amazon-systems-manager-get-inventory-request-schema.json",
  "title": "GetInventoryRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-systems-manager-inventory-api-openapi.yml#/components/schemas/GetInventoryRequest",
  "type": "object",
  "properties": {
    "Filters": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InventoryFilter"
      },
      "description": "One or more filters. Use a filter to return a more specific list of results."
    },
    "Aggregators": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InventoryAggregator"
      },
      "description": "Returns counts of inventory types based on one or more expressions. For example, if you aggregate by using an expression that uses the AWS:InstanceInformation.PlatformType type, you can see a count of how many Windows and Linux managed nodes exist in your inventoried fleet."
    },
    "ResultAttributes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResultAttribute"
      },
      "description": "The list of inventory item types to return."
    },
    "NextToken": {
      "type": "string",
      "description": "The token for the next set of items to return. (You received this token from a previous call.)"
    },
    "MaxResults": {
      "type": "integer",
      "description": "The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results."
    }
  },
  "$defs": {
    "InventoryAggregator": {
      "type": "object",
      "properties": {
        "Expression": {
          "type": "string",
          "description": "The inventory type and attribute name for aggregation."
        },
        "Aggregators": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InventoryAggregator"
          },
          "description": "Nested aggregators to further refine aggregation for an inventory type."
        },
        "Groups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InventoryGroup"
          },
          "description": "A user-defined set of one or more filters on which to aggregate inventory data. Groups return a count of resources that match and don't match the specified criteria."
        }
      }
    },
    "InventoryFilter": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The name of the filter key."
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Inventory filter values."
        },
        "Type": {
          "type": "string",
          "enum": [
            "Equal",
            "NotEqual",
            "BeginWith",
            "LessThan",
            "GreaterThan",
            "Exists"
          ],
          "description": "The type of filter. The Exists filter must be used with aggregators. For more information, see Aggregating inventory data in the Amazon Web Services Systems Manager User Guide."
        }
      },
      "required": [
        "Key",
        "Values"
      ]
    },
    "InventoryGroup": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the group."
        },
        "Filters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InventoryFilter"
          },
          "description": "Filters define the criteria for the group. The matchingCount field displays the number of resources that match the criteria. The notMatchingCount field displays the number of resources that don't match the criteria."
        }
      },
      "required": [
        "Name",
        "Filters"
      ]
    },
    "ResultAttribute": {
      "type": "object",
      "properties": {
        "TypeName": {
          "type": "string",
          "description": "Name of the inventory item type. Valid value: AWS:InstanceInformation. Default Value: AWS:InstanceInformation."
        }
      },
      "required": [
        "TypeName"
      ]
    }
  }
}