{
  "$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-finding-response-schema.json",
  "title": "GetFindingResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iam-access-analyzer-finding-api-openapi.yml#/components/schemas/GetFindingResponse",
  "type": "object",
  "properties": {
    "finding": {
      "$ref": "#/$defs/Finding"
    }
  },
  "$defs": {
    "Finding": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the finding."
        },
        "principal": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The external principal that has access to a resource within the zone of trust."
        },
        "action": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The action in the analyzed policy statement that an external principal has permission to use."
        },
        "resource": {
          "type": "string",
          "description": "The resource that an external principal has access to."
        },
        "isPublic": {
          "type": "boolean",
          "description": "Indicates whether the policy that generated the finding allows public access to the resource."
        },
        "resourceType": {
          "type": "string",
          "description": "The type of the resource identified in the finding."
        },
        "condition": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The condition in the analyzed policy statement that resulted in a finding."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time at which the finding was generated."
        },
        "analyzedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time at which the resource was analyzed."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time at which the finding was updated."
        },
        "status": {
          "type": "string",
          "description": "The current status of the finding."
        },
        "resourceOwnerAccount": {
          "type": "string",
          "description": "The Amazon Web Services account ID that owns the resource."
        },
        "error": {
          "type": "string",
          "description": "An error."
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FindingSource"
          },
          "description": "The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings."
        },
        "resourceControlPolicyRestriction": {
          "type": "string",
          "description": "The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP)."
        }
      },
      "required": [
        "id",
        "resourceType",
        "condition",
        "createdAt",
        "analyzedAt",
        "updatedAt",
        "status",
        "resourceOwnerAccount"
      ]
    },
    "FindingSource": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Indicates the type of access that generated the finding."
        },
        "detail": {
          "$ref": "#/$defs/FindingSourceDetail"
        }
      },
      "required": [
        "type"
      ]
    },
    "FindingSourceDetail": {
      "type": "object",
      "properties": {
        "accessPointArn": {
          "type": "string",
          "description": "The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point."
        },
        "accessPointAccount": {
          "type": "string",
          "description": "The account of the cross-account access point that generated the finding."
        }
      }
    }
  }
}