{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-certificate-bundle-schema.json",
  "title": "CertificateBundle",
  "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/CertificateBundle",
  "properties": {
    "certChainPem": {
      "default": null,
      "description": "The certificate chain (in PEM format) for the certificate bundle.",
      "maxLength": 51200,
      "minLength": 1,
      "type": "string"
    },
    "certificateBundleType": {
      "description": "The type of certificate bundle, which indicates whether the private key fields are included.",
      "enum": [
        "CERTIFICATE_CONTENT_PUBLIC_ONLY",
        "CERTIFICATE_CONTENT_WITH_PRIVATE_KEY"
      ],
      "type": "string",
      "x-obmcs-inline-enum": true
    },
    "certificateId": {
      "description": "The OCID of the certificate.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "certificateName": {
      "description": "The name of the certificate.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "certificatePem": {
      "default": null,
      "description": "The certificate in PEM format.",
      "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 the certificate bundle.",
      "items": {
        "enum": [
          "CURRENT",
          "PENDING",
          "PENDING_ACTIVATION",
          "LATEST",
          "PREVIOUS",
          "DEPRECATED",
          "FAILED"
        ],
        "type": "string",
        "x-obmcs-top-level-enum": "#/definitions/VersionStage"
      },
      "type": "array"
    },
    "timeCreated": {
      "description": "An optional property indicating when the certificate version 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 certificate version.",
      "maxLength": 50,
      "minLength": 1,
      "type": "string"
    },
    "versionNumber": {
      "description": "The version number of the certificate.",
      "format": "int64",
      "type": "integer"
    }
  },
  "required": [
    "certificateBundleType",
    "certificateId",
    "certificateName",
    "versionNumber",
    "timeCreated",
    "validity",
    "stages",
    "serialNumber"
  ],
  "type": "object",
  "x-example": "{\n  \"certificateBundleType\": \"CERTIFICATE_CONTENT_PUBLIC_ONLY\",\n  \"certificateId\": \"ocid1.certificate.oc1.iad.exampleae47ajxyajghg27ghmlu2cvbcd4hn7ho4qfauxdhzz5a5matr2jgq\",\n  \"certificateName\": null,\n  \"versionNumber\": 3,\n  \"serialNumber\": \"123456789467871985158273573384545629334123456789\",\n  \"certificatePem\": \"-----BEGIN CERTIFICATE-----<var>&lt;certificateContents&gt;</var>-----END CERTIFICATE-----\",\n  \"certChainPem\": \"-----BEGIN CERTIFICATE-----<var>&lt;certificateContents&gt;</var>-----END CERTIFICATE-----\",\n  \"timeCreated\": \"2021-04-07T23:01:31.951Z\",\n  \"validity\": {\n    \"timeOfValidityNotBefore\": \"2021-04-07T23:01:31.720Z\",\n    \"timeOfValidityNotAfter\": \"2022-05-07T00:00:00.000Z\"\n  },\n  \"versionName\": null,\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"
      ]
    }
  }
}