{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-sql-database/json-schema/microsoft-azure-sql-database-database-extensions-schema.json",
  "title": "DatabaseExtensions",
  "description": "An Import, Export, or PolybaseImport resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-sql-database-databaseextensions-api-openapi.yml#/components/schemas/DatabaseExtensions",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/DatabaseExtensionsProperties",
      "description": "Resource properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "DatabaseExtensionsProperties": {
      "type": "object",
      "description": "Contains the database information after a successful Import, Export, or PolybaseImport",
      "properties": {
        "operationMode": {
          "$ref": "#/$defs/OperationMode",
          "description": "Operation mode of the operation: Import, Export, or PolybaseImport.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "storageKeyType": {
          "$ref": "#/$defs/StorageKeyType",
          "description": "Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "storageKey": {
          "type": "string",
          "description": "Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "storageUri": {
          "type": "string",
          "description": "Storage Uri for the storage account.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "administratorLogin": {
          "type": "string",
          "description": "Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "administratorLoginPassword": {
          "type": "string",
          "format": "password",
          "description": "Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified.",
          "x-ms-mutability": [
            "create"
          ],
          "x-ms-secret": true
        },
        "authenticationType": {
          "type": "string",
          "description": "Authentication type used to access the SQL: Sql, ADPassword or ManagedIdentity.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "databaseEdition": {
          "type": "string",
          "description": "Database edition for the newly created database in the case of an import operation.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "serviceObjectiveName": {
          "type": "string",
          "description": "Database service level objective for the newly created database in the case of an import operation.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "maxSizeBytes": {
          "type": "string",
          "description": "Database max size in bytes for the newly created database in the case of an import operation.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "networkIsolation": {
          "$ref": "#/$defs/NetworkIsolationSettings",
          "description": "Optional resource information to enable network isolation for request.",
          "x-ms-mutability": [
            "create"
          ]
        }
      },
      "required": [
        "operationMode",
        "storageKeyType",
        "storageKey",
        "storageUri"
      ]
    },
    "NetworkIsolationSettings": {
      "type": "object",
      "description": "Contains the ARM resources for which to create private endpoint connection.",
      "properties": {
        "storageAccountResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter.",
          "x-ms-mutability": [
            "create"
          ]
        },
        "sqlServerResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation.",
          "x-ms-mutability": [
            "create"
          ]
        }
      }
    },
    "OperationMode": {
      "type": "string",
      "description": "Operation mode of the operation: Import, Export, or PolybaseImport.",
      "enum": [
        "PolybaseImport",
        "Import",
        "Export"
      ],
      "x-ms-enum": {
        "name": "OperationMode",
        "modelAsString": true,
        "values": [
          {
            "name": "PolybaseImport",
            "value": "PolybaseImport",
            "description": "PolybaseImport"
          },
          {
            "name": "Import",
            "value": "Import",
            "description": "Import"
          },
          {
            "name": "Export",
            "value": "Export",
            "description": "Export"
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "StorageKeyType": {
      "type": "string",
      "description": "Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity.",
      "enum": [
        "SharedAccessKey",
        "StorageAccessKey",
        "ManagedIdentity"
      ],
      "x-ms-enum": {
        "name": "StorageKeyType",
        "modelAsString": true,
        "values": [
          {
            "name": "SharedAccessKey",
            "value": "SharedAccessKey",
            "description": "SharedAccessKey"
          },
          {
            "name": "StorageAccessKey",
            "value": "StorageAccessKey",
            "description": "StorageAccessKey"
          },
          {
            "name": "ManagedIdentity",
            "value": "ManagedIdentity",
            "description": "ManagedIdentity"
          }
        ]
      }
    }
  }
}