{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-certificate-authority-bundle-schema.json",
  "title": "CertificateAuthorityBundle",
  "description": "The contents of the certificate, properties of the certificate (and certificate version), and user-provided contextual metadata for the certificate.\n",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-certificates-api-openapi.yml#/components/schemas/CertificateAuthorityBundle",
  "properties": {
    "certChainPem": {
      "default": null,
      "description": "The certificate chain (in PEM format) for this CA version.",
      "maxLength": 51200,
      "minLength": 1,
      "type": "string"
    },
    "certificateAuthorityId": {
      "description": "The OCID of the certificate authority (CA).",
      "type": "string"
    },
    "certificateAuthorityName": {
      "description": "The name of the CA.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "certificatePem": {
      "description": "The certificate (in PEM format) for this CA version.",
      "maxLength": 10240,
      "minLength": 1,
      "type": "string"
    },
    "revocationStatus": {
      "$ref": "#/$defs/RevocationStatus"
    },
    "serialNumber": {
      "description": "A unique certificate identifier used in certificate revocation tracking, formatted as octets.\nExample: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF`\n",
      "maxLength": 59,
      "minLength": 2,
      "type": "string"
    },
    "stages": {
      "description": "A list of rotation states for this CA.",
      "items": {
        "enum": [
          "CURRENT",
          "PENDING",
          "PENDING_ACTIVATION",
          "LATEST",
          "PREVIOUS",
          "DEPRECATED",
          "FAILED"
        ],
        "type": "string",
        "x-obmcs-top-level-enum": "#/definitions/VersionStage"
      },
      "type": "array"
    },
    "timeCreated": {
      "description": "A property indicating when the CA was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.\nExample: `2019-04-03T21:10:29.600Z`\n",
      "format": "date-time",
      "type": "string"
    },
    "validity": {
      "$ref": "#/$defs/Validity"
    },
    "versionName": {
      "default": null,
      "description": "The name of the CA.",
      "maxLength": 50,
      "minLength": 1,
      "type": "string"
    },
    "versionNumber": {
      "description": "The version number of the CA.",
      "format": "int64",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "certificateAuthorityId",
    "certificateAuthorityName",
    "certificatePem",
    "serialNumber",
    "validity",
    "stages",
    "timeCreated",
    "versionNumber"
  ],
  "type": "object",
  "x-example": "{\n  \"certificateAuthorityId\": \"ocid1.certificateauthority.oc1.iad.exampleae47ajxya5r64cqcvbphd7vn4ifypr3wn3lqkfhjxfauxqohfpmoa\",\n  \"certificateAuthorityName\": \"test-cvb-1\",\n  \"serialNumber\": \"1234567890419170222282007451413738675751123456789\",\n  \"certificatePem\": \"-----BEGIN CERTIFICATE-----<var>&lt;certificateContents&gt;</var>-----END CERTIFICATE-----\",\n  \"certChainPem\": \"-----BEGIN CERTIFICATE-----<var>&lt;certificateContents&gt;</var>-----END CERTIFICATE-----\",\n  \"versionName\": null,\n  \"timeCreated\": \"2021-04-07T00:49:42.725Z\",\n  \"versionNumber\": 3,\n  \"validity\": {\n    \"timeOfValidityNotBefore\": \"2021-04-07T00:49:42.134Z\",\n    \"timeOfValidityNotAfter\": \"2031-05-06T00:00:00.000Z\"\n  },\n  \"stages\": [\n    \"CURRENT\",\n    \"LATEST\"\n  ],\n  \"revocationStatus\": null\n}\n",
  "$defs": {
    "RevocationStatus": {
      "description": "The current revocation status of the certificate or certificate authority (CA).",
      "properties": {
        "revocationReason": {
          "description": "The reason that the certificate or CA was revoked.",
          "enum": [
            "UNSPECIFIED",
            "KEY_COMPROMISE",
            "CA_COMPROMISE",
            "AFFILIATION_CHANGED",
            "SUPERSEDED",
            "CESSATION_OF_OPERATION",
            "PRIVILEGE_WITHDRAWN",
            "AA_COMPROMISE"
          ],
          "type": "string",
          "x-obmcs-top-level-enum": "#/definitions/RevocationReason"
        },
        "timeRevoked": {
          "description": "The time when the certificate or CA was revoked.",
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "timeRevoked",
        "revocationReason"
      ],
      "type": "object"
    },
    "Validity": {
      "description": "An object that describes a period of time during which an entity is valid.",
      "properties": {
        "timeOfValidityNotAfter": {
          "description": "The date on which the certificate validity period ends, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.\nExample: `2019-04-03T21:10:29.600Z`\n",
          "format": "date-time",
          "type": "string"
        },
        "timeOfValidityNotBefore": {
          "description": "The date on which the certificate validity period begins, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.\nExample: `2019-04-03T21:10:29.600Z`\n",
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "timeOfValidityNotBefore",
        "timeOfValidityNotAfter"
      ]
    }
  }
}