{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-sql-database/json-schema/microsoft-azure-sql-database-managed-instance-long-term-retention-policy-schema.json",
  "title": "ManagedInstanceLongTermRetentionPolicy",
  "description": "A long term retention policy.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-sql-database-managedinstancelongtermretentionpolicies-api-openapi.yml#/components/schemas/ManagedInstanceLongTermRetentionPolicy",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ManagedInstanceLongTermRetentionPolicyProperties",
      "description": "Resource properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "BackupStorageAccessTier": {
      "type": "string",
      "description": "The BackupStorageAccessTier for the LTR backup",
      "enum": [
        "Hot",
        "Archive"
      ],
      "x-ms-enum": {
        "name": "BackupStorageAccessTier",
        "modelAsString": true,
        "values": [
          {
            "name": "Hot",
            "value": "Hot",
            "description": "Hot"
          },
          {
            "name": "Archive",
            "value": "Archive",
            "description": "Archive"
          }
        ]
      }
    },
    "ManagedInstanceLongTermRetentionPolicyProperties": {
      "type": "object",
      "description": "Properties of a long term retention policy",
      "properties": {
        "backupStorageAccessTier": {
          "$ref": "#/$defs/BackupStorageAccessTier",
          "description": "The BackupStorageAccessTier for the LTR backups"
        },
        "weeklyRetention": {
          "type": "string",
          "description": "The weekly retention policy for an LTR backup in an ISO 8601 format."
        },
        "monthlyRetention": {
          "type": "string",
          "description": "The monthly retention policy for an LTR backup in an ISO 8601 format."
        },
        "yearlyRetention": {
          "type": "string",
          "description": "The yearly retention policy for an LTR backup in an ISO 8601 format."
        },
        "weekOfYear": {
          "type": "integer",
          "format": "int32",
          "description": "The week of year to take the yearly backup in an ISO 8601 format."
        }
      }
    },
    "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"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    }
  }
}