{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-container-registry/json-schema/azure-container-registry-connected-registry-schema.json",
  "title": "ConnectedRegistry",
  "description": "An object that represents a connected registry for a container registry.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-container-registry-connectedregistries-api-openapi.yml#/components/schemas/ConnectedRegistry",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ConnectedRegistryProperties",
      "description": "The properties of the connected registry.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "ActivationProperties": {
      "type": "object",
      "description": "The activation properties of the connected registry.",
      "properties": {
        "status": {
          "$ref": "#/$defs/ActivationStatus",
          "description": "The activation status of the connected registry.",
          "readOnly": true
        }
      }
    },
    "ActivationStatus": {
      "type": "string",
      "description": "The activation status of the connected registry.",
      "enum": [
        "Active",
        "Inactive"
      ],
      "x-ms-enum": {
        "name": "ActivationStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Active",
            "value": "Active"
          },
          {
            "name": "Inactive",
            "value": "Inactive"
          }
        ]
      }
    },
    "CertificateType": {
      "type": "string",
      "description": "The type of certificate location.",
      "enum": [
        "LocalDirectory"
      ],
      "x-ms-enum": {
        "name": "CertificateType",
        "modelAsString": true,
        "values": [
          {
            "name": "LocalDirectory",
            "value": "LocalDirectory"
          }
        ]
      }
    },
    "ConnectedRegistryMode": {
      "type": "string",
      "description": "The mode of the connected registry resource that indicates the permissions of the registry.",
      "enum": [
        "ReadWrite",
        "ReadOnly",
        "Registry",
        "Mirror"
      ],
      "x-ms-enum": {
        "name": "ConnectedRegistryMode",
        "modelAsString": true,
        "values": [
          {
            "name": "ReadWrite",
            "value": "ReadWrite"
          },
          {
            "name": "ReadOnly",
            "value": "ReadOnly"
          },
          {
            "name": "Registry",
            "value": "Registry"
          },
          {
            "name": "Mirror",
            "value": "Mirror"
          }
        ]
      }
    },
    "ConnectedRegistryProperties": {
      "type": "object",
      "description": "The properties of a connected registry.",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "Provisioning state of the resource.",
          "readOnly": true
        },
        "mode": {
          "$ref": "#/$defs/ConnectedRegistryMode",
          "description": "The mode of the connected registry resource that indicates the permissions of the registry."
        },
        "version": {
          "type": "string",
          "description": "The current version of ACR runtime on the connected registry.",
          "readOnly": true
        },
        "connectionState": {
          "$ref": "#/$defs/ConnectionState",
          "description": "The current connection state of the connected registry.",
          "readOnly": true
        },
        "lastActivityTime": {
          "type": "string",
          "format": "date-time",
          "description": "The last activity time of the connected registry.",
          "readOnly": true
        },
        "activation": {
          "$ref": "#/$defs/ActivationProperties",
          "description": "The activation properties of the connected registry.",
          "readOnly": true
        },
        "parent": {
          "$ref": "#/$defs/ParentProperties",
          "description": "The parent of the connected registry."
        },
        "clientTokenIds": {
          "type": "array",
          "description": "The list of the ACR token resource IDs used to authenticate clients to the connected registry.",
          "items": {
            "type": "string"
          }
        },
        "loginServer": {
          "$ref": "#/$defs/LoginServerProperties",
          "description": "The login server properties of the connected registry."
        },
        "logging": {
          "$ref": "#/$defs/LoggingProperties",
          "description": "The logging properties of the connected registry."
        },
        "statusDetails": {
          "type": "array",
          "description": "The list of current statuses of the connected registry.",
          "items": {
            "$ref": "#/$defs/StatusDetailProperties"
          },
          "readOnly": true,
          "x-ms-identifiers": [
            "correlationId"
          ]
        },
        "notificationsList": {
          "type": "array",
          "description": "The list of notifications subscription information for the connected registry.",
          "items": {
            "type": "string"
          }
        },
        "garbageCollection": {
          "$ref": "#/$defs/GarbageCollectionProperties",
          "description": "The garbage collection properties of the connected registry."
        }
      },
      "required": [
        "mode",
        "parent"
      ]
    },
    "ConnectionState": {
      "type": "string",
      "description": "The current connection state of the connected registry.",
      "enum": [
        "Online",
        "Offline",
        "Syncing",
        "Unhealthy"
      ],
      "x-ms-enum": {
        "name": "ConnectionState",
        "modelAsString": true,
        "values": [
          {
            "name": "Online",
            "value": "Online"
          },
          {
            "name": "Offline",
            "value": "Offline"
          },
          {
            "name": "Syncing",
            "value": "Syncing"
          },
          {
            "name": "Unhealthy",
            "value": "Unhealthy"
          }
        ]
      }
    },
    "GarbageCollectionProperties": {
      "type": "object",
      "description": "The garbage collection properties of the connected registry.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Indicates whether garbage collection is enabled for the connected registry."
        },
        "schedule": {
          "type": "string",
          "description": "The cron expression indicating the schedule that the connected registry will run garbage collection."
        }
      }
    },
    "LoggingProperties": {
      "type": "object",
      "description": "The logging properties of the connected registry.",
      "properties": {
        "logLevel": {
          "type": "string",
          "description": "The verbosity of logs persisted on the connected registry.",
          "default": "Information",
          "enum": [
            "Debug",
            "Information",
            "Warning",
            "Error",
            "None"
          ],
          "x-ms-enum": {
            "name": "LogLevel",
            "modelAsString": true,
            "values": [
              {
                "name": "Debug",
                "value": "Debug"
              },
              {
                "name": "Information",
                "value": "Information"
              },
              {
                "name": "Warning",
                "value": "Warning"
              },
              {
                "name": "Error",
                "value": "Error"
              },
              {
                "name": "None",
                "value": "None"
              }
            ]
          }
        },
        "auditLogStatus": {
          "type": "string",
          "description": "Indicates whether audit logs are enabled on the connected registry.",
          "default": "Disabled",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "x-ms-enum": {
            "name": "AuditLogStatus",
            "modelAsString": true,
            "values": [
              {
                "name": "Enabled",
                "value": "Enabled"
              },
              {
                "name": "Disabled",
                "value": "Disabled"
              }
            ]
          }
        }
      }
    },
    "LoginServerProperties": {
      "type": "object",
      "description": "The login server properties of the connected registry.",
      "properties": {
        "host": {
          "type": "string",
          "description": "The host of the connected registry. Can be FQDN or IP.",
          "readOnly": true
        },
        "tls": {
          "$ref": "#/$defs/TlsProperties",
          "description": "The TLS properties of the connected registry login server.",
          "readOnly": true
        }
      }
    },
    "ParentProperties": {
      "type": "object",
      "description": "The properties of the connected registry parent.",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource ID of the parent to which the connected registry will be associated."
        },
        "syncProperties": {
          "$ref": "#/$defs/SyncProperties",
          "description": "The sync properties of the connected registry with its parent."
        }
      },
      "required": [
        "syncProperties"
      ]
    },
    "ProvisioningState": {
      "type": "string",
      "description": "The provisioning state of the archive at the time the operation was called.",
      "enum": [
        "Creating",
        "Updating",
        "Deleting",
        "Succeeded",
        "Failed",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Creating",
            "value": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded"
          },
          {
            "name": "Failed",
            "value": "Failed"
          },
          {
            "name": "Canceled",
            "value": "Canceled"
          }
        ]
      }
    },
    "StatusDetailProperties": {
      "type": "object",
      "description": "The status detail properties of the connected registry.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The component of the connected registry corresponding to the status.",
          "readOnly": true
        },
        "code": {
          "type": "string",
          "description": "The HTTP status code.",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "description": "The description of the status.",
          "readOnly": true
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of the status.",
          "readOnly": true
        },
        "correlationId": {
          "type": "string",
          "description": "The correlation ID of the status.",
          "readOnly": true
        }
      }
    },
    "SyncProperties": {
      "type": "object",
      "description": "The sync properties of the connected registry with its parent.",
      "properties": {
        "tokenId": {
          "type": "string",
          "description": "The resource ID of the ACR token used to authenticate the connected registry to its parent during sync."
        },
        "schedule": {
          "type": "string",
          "description": "The cron expression indicating the schedule that the connected registry will sync with its parent."
        },
        "syncWindow": {
          "type": "string",
          "format": "duration",
          "description": "The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601."
        },
        "messageTtl": {
          "type": "string",
          "format": "duration",
          "description": "The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601."
        },
        "lastSyncTime": {
          "type": "string",
          "format": "date-time",
          "description": "The last time a sync occurred between the connected registry and its parent.",
          "readOnly": true
        },
        "gatewayEndpoint": {
          "type": "string",
          "description": "The gateway endpoint used by the connected registry to communicate with its parent.",
          "readOnly": true
        }
      },
      "required": [
        "tokenId",
        "messageTtl"
      ]
    },
    "TlsCertificateProperties": {
      "type": "object",
      "description": "The TLS certificate properties of the connected registry login server.",
      "properties": {
        "type": {
          "$ref": "#/$defs/CertificateType",
          "description": "The type of certificate location.",
          "readOnly": true
        },
        "location": {
          "type": "string",
          "description": "Indicates the location of the certificates.",
          "readOnly": true
        }
      }
    },
    "TlsProperties": {
      "type": "object",
      "description": "The TLS properties of the connected registry login server.",
      "properties": {
        "status": {
          "$ref": "#/$defs/TlsStatus",
          "description": "Indicates whether HTTPS is enabled for the login server.",
          "readOnly": true
        },
        "certificate": {
          "$ref": "#/$defs/TlsCertificateProperties",
          "description": "The certificate used to configure HTTPS for the login server.",
          "readOnly": true
        }
      }
    },
    "TlsStatus": {
      "type": "string",
      "description": "Indicates whether HTTPS is enabled for the login server.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "TlsStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled"
          },
          {
            "name": "Disabled",
            "value": "Disabled"
          }
        ]
      }
    }
  }
}