{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-problem-schema.json",
  "title": "Problem",
  "description": "Problems are at the core of Cloud Guard’s functionality. A Problem resource is created whenever an action or a configuration on a resource triggers a rule in a detector that’s attached to the target containing the compartment where the resource is located. Each Problem resource contains all the details for a single problem. This is the information for the problem that appears on the Cloud Guard Problems page.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-cloudguard-api-openapi.yml#/components/schemas/Problem",
  "properties": {
    "additionalDetails": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "The additional details of the problem",
      "type": "object"
    },
    "autoResolveDate": {
      "description": "The date and time when the problem will be auto resolved. Format defined by RFC3339.",
      "type": "string"
    },
    "comment": {
      "description": "User comments on the problem",
      "type": "string"
    },
    "compartmentId": {
      "description": "Compartment OCID where the resource is created",
      "type": "string"
    },
    "description": {
      "description": "Description of the problem",
      "type": "string"
    },
    "detectorId": {
      "description": "Unique identifier of the detector rule that triggered the problem",
      "enum": [
        "IAAS_ACTIVITY_DETECTOR",
        "IAAS_CONFIGURATION_DETECTOR",
        "IAAS_THREAT_DETECTOR",
        "IAAS_LOGGING_DETECTOR",
        "IAAS_LOG_INSIGHT_DETECTOR",
        "SAAS_FA_ACTIVITY_DETECTOR",
        "IAAS_CONTAINER_SECURITY_DETECTOR"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/DetectorEnum"
    },
    "detectorRuleId": {
      "description": "Unique identifier of the detector rule that triggered the problem",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier that can't be changed after creation",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "impactedResourceId": {
      "description": "Unique identifier of the resource impacted by the problem",
      "type": "string"
    },
    "impactedResourceName": {
      "description": "Display name of the impacted resource",
      "type": "string"
    },
    "impactedResourceType": {
      "description": "Type of the impacted resource",
      "type": "string"
    },
    "labels": {
      "description": "User-defined labels on the problem",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "lifecycleDetail": {
      "description": "Additional details on the substate of the lifecycle state",
      "enum": [
        "OPEN",
        "RESOLVED",
        "DISMISSED",
        "DELETED"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/ProblemLifecycleDetail"
    },
    "lifecycleState": {
      "description": "The current lifecycle state of the problem",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/ProblemLifecycleState"
    },
    "locks": {
      "description": "Locks associated with this resource.",
      "items": {
        "$ref": "#/$defs/ResourceLock"
      },
      "maxItems": 1,
      "type": "array"
    },
    "peakRiskScore": {
      "description": "Peak risk score for the problem",
      "format": "double",
      "type": "number"
    },
    "peakRiskScoreDate": {
      "description": "The date and time for the peak risk score that is observed for the problem. Format defined by RFC3339.",
      "type": "string"
    },
    "peakRiskScoreLookupPeriodInDays": {
      "description": "Number of days for which peak score is calculated for the problem",
      "type": "integer"
    },
    "recommendation": {
      "description": "Recommendation for the problem",
      "type": "string"
    },
    "region": {
      "description": "DEPRECATED",
      "type": "string"
    },
    "regions": {
      "description": "Regions where the problem is found",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "resourceId": {
      "description": "Unique identifier of the resource affected by the problem",
      "type": "string"
    },
    "resourceName": {
      "description": "Display name of the affected resource",
      "type": "string"
    },
    "resourceType": {
      "description": "Type of the affected resource",
      "type": "string"
    },
    "riskLevel": {
      "description": "The risk level for the problem",
      "enum": [
        "CRITICAL",
        "HIGH",
        "MEDIUM",
        "LOW",
        "MINOR"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/RiskLevel"
    },
    "riskScore": {
      "description": "The risk score for the problem",
      "format": "double",
      "type": "number"
    },
    "targetId": {
      "description": "Unique identifier of the target associated with the problem",
      "type": "string"
    },
    "timeFirstDetected": {
      "description": "The date and time the problem was first detected. Format defined by RFC3339.",
      "format": "date-time",
      "type": "string"
    },
    "timeLastDetected": {
      "description": "The date and time the problem was last detected. Format defined by RFC3339.",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "compartmentId"
  ],
  "type": "object",
  "$defs": {
    "ResourceLock": {
      "description": "Resource locks are used to prevent certain APIs from being called for the resource.\nA full lock prevents both updating the resource and deleting the resource. A delete\nlock prevents deleting the resource.\n",
      "properties": {
        "message": {
          "description": "A message added by the creator of the lock. This is typically used to give an\nindication of why the resource is locked.\n",
          "type": "string"
        },
        "relatedResourceId": {
          "description": "The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.\n",
          "type": "string"
        },
        "timeCreated": {
          "description": "When the lock was created, in the format defined by RFC 3339.",
          "format": "date-time",
          "type": "string"
        },
        "type": {
          "description": "Type of the lock.",
          "enum": [
            "FULL",
            "DELETE"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  }
}