{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cache-for-redis/json-schema/microsoft-azure-cache-for-redis-force-link-parameters-schema.json",
  "title": "ForceLinkParameters",
  "description": "Parameters for reconfiguring active geo-replication, of an existing database that was previously unlinked from a replication group.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-cache-for-redis-databases-api-openapi.yml#/components/schemas/ForceLinkParameters",
  "type": "object",
  "properties": {
    "geoReplication": {
      "$ref": "#/$defs/ForceLinkParametersGeoReplication",
      "description": "Properties to configure geo replication for this database.",
      "x-ms-mutability": [
        "read",
        "create"
      ]
    }
  },
  "required": [
    "geoReplication"
  ],
  "$defs": {
    "ForceLinkParametersGeoReplication": {
      "type": "object",
      "description": "Properties to configure geo replication for this database.",
      "properties": {
        "groupNickname": {
          "type": "string",
          "description": "The name of the group of linked database resources. This should match the existing replication group name.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "linkedDatabases": {
          "type": "array",
          "description": "The resource IDs of the databases that are expected to be linked and included in the replication group. This parameter is used to validate that the linking is to the expected (unlinked) part of the replication group, if it is splintered.",
          "items": {
            "$ref": "#/$defs/LinkedDatabase"
          }
        }
      }
    },
    "LinkState": {
      "type": "string",
      "description": "State of the link between the database resources.",
      "enum": [
        "Linked",
        "Linking",
        "Unlinking",
        "LinkFailed",
        "UnlinkFailed"
      ],
      "x-ms-enum": {
        "name": "LinkState",
        "modelAsString": true,
        "values": [
          {
            "name": "Linked",
            "value": "Linked",
            "description": "Linked"
          },
          {
            "name": "Linking",
            "value": "Linking",
            "description": "Linking"
          },
          {
            "name": "Unlinking",
            "value": "Unlinking",
            "description": "Unlinking"
          },
          {
            "name": "LinkFailed",
            "value": "LinkFailed",
            "description": "LinkFailed"
          },
          {
            "name": "UnlinkFailed",
            "value": "UnlinkFailed",
            "description": "UnlinkFailed"
          }
        ]
      }
    },
    "LinkedDatabase": {
      "type": "object",
      "description": "Specifies details of a linked database resource.",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Resource ID of a database resource to link with this database.",
          "x-ms-mutability": [
            "read",
            "create"
          ],
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.Cache/redisEnterprise/databases"
              }
            ]
          }
        },
        "state": {
          "$ref": "#/$defs/LinkState",
          "description": "State of the link between the database resources.",
          "readOnly": true
        }
      }
    }
  }
}