{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-create-protected-database-details-schema.json",
  "title": "CreateProtectedDatabaseDetails",
  "description": "Describes the parameters required to create a protected database.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-databaserecovery-api-openapi.yml#/components/schemas/CreateProtectedDatabaseDetails",
  "properties": {
    "changeRate": {
      "description": "The percentage of data changes that exist in the database between successive incremental backups.",
      "format": "double",
      "minimum": 0,
      "type": "number"
    },
    "compartmentId": {
      "description": "The OCID of the compartment that contains the protected database.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "compressionRatio": {
      "description": "The compression ratio of the protected database. The compression ratio represents the ratio of compressed block size to expanded block size.",
      "format": "double",
      "minimum": 1,
      "type": "number"
    },
    "databaseId": {
      "description": "The OCID of the protected database.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "databaseSize": {
      "description": "The size of the protected database. XS - Less than 5GB, S - 5GB to 50GB, M - 50GB to 500GB, L - 500GB to 1TB, XL - 1TB to 5TB, XXL - Greater than 5TB.",
      "enum": [
        "XS",
        "S",
        "M",
        "L",
        "XL",
        "XXL",
        "AUTO"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/DatabaseSizes"
    },
    "databaseSizeInGBs": {
      "description": "The size of the database, in gigabytes.",
      "minimum": 1,
      "type": "integer"
    },
    "dbUniqueName": {
      "description": "The dbUniqueName of the protected database in Recovery Service. You cannot change the unique name.",
      "maxLength": 32,
      "minLength": 1,
      "type": "string"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing predefined tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`. For more information, see [Resource Tags](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm)\n",
      "type": "object"
    },
    "displayName": {
      "description": "The protected database name. You can change the displayName. Avoid entering confidential information.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.\nExample: `{\"bar-key\": \"value\"}`\n",
      "type": "object"
    },
    "isRedoLogsShipped": {
      "description": "The value TRUE indicates that the protected database is configured to use Real-time data protection, and redo-data is sent from the protected database to Recovery Service.\nReal-time data protection substantially reduces the window of potential data loss that exists between successive archived redo log backups.\n",
      "type": "boolean"
    },
    "password": {
      "description": "Password credential which can be used to connect to Protected Database.\nIt must contain at least 2 uppercase, 2 lowercase, 2 numeric and 2 special characters.\nThe special characters must be underscore (_), number sign (#) or hyphen (-). The password must not contain the username \"admin\", regardless of casing.\n",
      "maxLength": 30,
      "minLength": 15,
      "type": "string"
    },
    "protectionPolicyId": {
      "description": "The OCID of the protection policy associated with the protected database.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "recoveryServiceSubnets": {
      "description": "List of recovery service subnet resources associated with the protected database.",
      "items": {
        "$ref": "#/$defs/RecoveryServiceSubnetInput"
      },
      "maxItems": 1,
      "type": "array"
    },
    "subscriptionId": {
      "description": "The OCID of the cloud service subscription to which you want to link the protected database. \nFor example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "displayName",
    "dbUniqueName",
    "password",
    "protectionPolicyId",
    "recoveryServiceSubnets",
    "compartmentId"
  ],
  "type": "object",
  "$defs": {
    "RecoveryServiceSubnetInput": {
      "description": "Parameters to retrieve information about a specific recovery service subnet.",
      "properties": {
        "recoveryServiceSubnetId": {
          "description": "The recovery service subnet OCID.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "recoveryServiceSubnetId"
      ],
      "type": "object"
    }
  }
}