{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iam-access-analyzer/json-schema/amazon-iam-access-analyzer-get-findings-statistics-response-schema.json",
  "title": "GetFindingsStatisticsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iam-access-analyzer-analyzer-api-openapi.yml#/components/schemas/GetFindingsStatisticsResponse",
  "type": "object",
  "properties": {
    "findingsStatistics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FindingsStatistics"
      },
      "description": "A group of external access or unused access findings statistics."
    },
    "lastUpdatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The time at which the retrieval of the findings statistics was last updated. If the findings statistics have not been previously retrieved for the specified analyzer, this field will not be populated."
    }
  },
  "$defs": {
    "ExternalAccessFindingsStatistics": {
      "type": "object",
      "properties": {
        "resourceTypeStatistics": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ResourceTypeDetails"
          },
          "description": "The total number of active cross-account and public findings for each resource type of the specified external access analyzer."
        },
        "totalActiveFindings": {
          "type": "integer",
          "description": "The number of active findings for the specified external access analyzer."
        },
        "totalArchivedFindings": {
          "type": "integer",
          "description": "The number of archived findings for the specified external access analyzer."
        },
        "totalResolvedFindings": {
          "type": "integer",
          "description": "The number of resolved findings for the specified external access analyzer."
        }
      }
    },
    "FindingAggregationAccountDetails": {
      "type": "object",
      "properties": {
        "account": {
          "type": "string",
          "description": "The ID of the Amazon Web Services account for which unused access finding details are provided."
        },
        "numberOfActiveFindings": {
          "type": "integer",
          "description": "The number of active unused access findings for the specified Amazon Web Services account."
        },
        "details": {
          "type": "object",
          "additionalProperties": {
            "type": "integer"
          },
          "description": "Provides the number of active findings for each type of unused access for the specified Amazon Web Services account."
        }
      }
    },
    "FindingsStatistics": {
      "type": "object",
      "properties": {
        "externalAccessFindingsStatistics": {
          "$ref": "#/$defs/ExternalAccessFindingsStatistics"
        },
        "internalAccessFindingsStatistics": {
          "$ref": "#/$defs/InternalAccessFindingsStatistics"
        },
        "unusedAccessFindingsStatistics": {
          "$ref": "#/$defs/UnusedAccessFindingsStatistics"
        }
      },
      "description": "Exactly one member is set."
    },
    "InternalAccessFindingsStatistics": {
      "type": "object",
      "properties": {
        "resourceTypeStatistics": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/InternalAccessResourceTypeDetails"
          },
          "description": "The total number of active findings for each resource type of the specified internal access analyzer."
        },
        "totalActiveFindings": {
          "type": "integer",
          "description": "The number of active findings for the specified internal access analyzer."
        },
        "totalArchivedFindings": {
          "type": "integer",
          "description": "The number of archived findings for the specified internal access analyzer."
        },
        "totalResolvedFindings": {
          "type": "integer",
          "description": "The number of resolved findings for the specified internal access analyzer."
        }
      }
    },
    "InternalAccessResourceTypeDetails": {
      "type": "object",
      "properties": {
        "totalActiveFindings": {
          "type": "integer",
          "description": "The total number of active findings for the resource type in the internal access analyzer."
        },
        "totalResolvedFindings": {
          "type": "integer",
          "description": "The total number of resolved findings for the resource type in the internal access analyzer."
        },
        "totalArchivedFindings": {
          "type": "integer",
          "description": "The total number of archived findings for the resource type in the internal access analyzer."
        }
      }
    },
    "ResourceTypeDetails": {
      "type": "object",
      "properties": {
        "totalActivePublic": {
          "type": "integer",
          "description": "The total number of active public findings for the resource type."
        },
        "totalActiveCrossAccount": {
          "type": "integer",
          "description": "The total number of active cross-account findings for the resource type."
        },
        "totalActiveErrors": {
          "type": "integer",
          "description": "The total number of active errors for the resource type."
        }
      }
    },
    "UnusedAccessFindingsStatistics": {
      "type": "object",
      "properties": {
        "unusedAccessTypeStatistics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UnusedAccessTypeStatistics"
          },
          "description": "A list of details about the total number of findings for each type of unused access for the analyzer."
        },
        "topAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FindingAggregationAccountDetails"
          },
          "description": "A list of one to ten Amazon Web Services accounts that have the most active findings for the unused access analyzer."
        },
        "totalActiveFindings": {
          "type": "integer",
          "description": "The total number of active findings for the unused access analyzer."
        },
        "totalArchivedFindings": {
          "type": "integer",
          "description": "The total number of archived findings for the unused access analyzer."
        },
        "totalResolvedFindings": {
          "type": "integer",
          "description": "The total number of resolved findings for the unused access analyzer."
        }
      }
    },
    "UnusedAccessTypeStatistics": {
      "type": "object",
      "properties": {
        "unusedAccessType": {
          "type": "string",
          "description": "The type of unused access."
        },
        "total": {
          "type": "integer",
          "description": "The total number of findings for the specified unused access type."
        }
      }
    }
  }
}