{
  "$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-redis-linked-server-create-parameters-schema.json",
  "title": "RedisLinkedServerCreateParameters",
  "description": "Parameter required for creating a linked server to redis cache.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-cache-for-redis-linkedserver-api-openapi.yml#/components/schemas/RedisLinkedServerCreateParameters",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/RedisLinkedServerCreateProperties",
      "description": "Properties required to create a linked server.",
      "x-ms-client-flatten": true
    }
  },
  "required": [
    "properties"
  ],
  "$defs": {
    "RedisLinkedServerCreateProperties": {
      "type": "object",
      "description": "Create properties for a linked server",
      "properties": {
        "linkedRedisCacheId": {
          "type": "string",
          "description": "Fully qualified resourceId of the linked redis cache."
        },
        "linkedRedisCacheLocation": {
          "type": "string",
          "description": "Location of the linked redis cache.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "serverRole": {
          "$ref": "#/$defs/ReplicationRole",
          "description": "Role of the linked server."
        },
        "geoReplicatedPrimaryHostName": {
          "type": "string",
          "description": "The unchanging DNS name which will always point to current geo-primary cache among the linked redis caches for seamless Geo Failover experience.",
          "readOnly": true
        },
        "primaryHostName": {
          "type": "string",
          "description": "The changing DNS name that resolves to the current geo-primary cache among the linked redis caches before or after the Geo Failover.",
          "readOnly": true
        }
      },
      "required": [
        "linkedRedisCacheId",
        "linkedRedisCacheLocation",
        "serverRole"
      ]
    },
    "ReplicationRole": {
      "type": "string",
      "description": "Role of the linked server.",
      "enum": [
        "Primary",
        "Secondary"
      ],
      "x-ms-enum": {
        "name": "ReplicationRole",
        "modelAsString": false,
        "values": [
          {
            "name": "Primary",
            "value": "Primary",
            "description": "The linked server is in the writable primary role"
          },
          {
            "name": "Secondary",
            "value": "Secondary",
            "description": "The linked server is in the read-only replica role"
          }
        ]
      }
    }
  }
}