{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-arc/json-schema/microsoft-azure-arc-connected-cluster-schema.json",
  "title": "ConnectedCluster",
  "description": "Represents a connected cluster.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-arc-connectedclusters-api-openapi.yml#/components/schemas/ConnectedCluster",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ConnectedClusterProperties",
      "description": "Describes the connected cluster resource properties.",
      "x-ms-client-flatten": true
    },
    "identity": {
      "$ref": "#/$defs/ConnectedClusterIdentity",
      "description": "The identity of the connected cluster."
    },
    "kind": {
      "$ref": "#/$defs/ConnectedClusterKind",
      "description": "The kind of connected cluster."
    }
  },
  "required": [
    "properties",
    "identity"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "AadProfile": {
      "type": "object",
      "description": "AAD Profile specifies attributes for Azure Active Directory integration.",
      "properties": {
        "enableAzureRBAC": {
          "type": "boolean",
          "description": "Whether to enable Azure RBAC for Kubernetes authorization."
        },
        "adminGroupObjectIDs": {
          "type": "array",
          "description": "The list of AAD group object IDs that will have admin role of the cluster.",
          "items": {
            "type": "string"
          }
        },
        "tenantID": {
          "type": "string",
          "description": "The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription."
        }
      }
    },
    "AgentError": {
      "type": "object",
      "description": "Agent Errors if any during agent or system component upgrade.",
      "properties": {
        "message": {
          "type": "string",
          "description": "Agent error message.",
          "readOnly": true
        },
        "severity": {
          "type": "string",
          "description": "Severity of the error message.",
          "readOnly": true
        },
        "component": {
          "type": "string",
          "description": "Agent component where error message occured.",
          "readOnly": true
        },
        "time": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of error occured (UTC).",
          "readOnly": true
        }
      }
    },
    "ArcAgentProfile": {
      "type": "object",
      "description": "Defines the Arc Agent properties for the clusters.",
      "properties": {
        "desiredAgentVersion": {
          "type": "string",
          "description": "Version of the Arc agents to be installed on the cluster resource"
        },
        "agentAutoUpgrade": {
          "type": "string",
          "description": "Indicates whether the Arc agents on the be upgraded automatically to the latest version. Defaults to Enabled.",
          "default": "Enabled",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "x-ms-enum": {
            "name": "AutoUpgradeOptions",
            "modelAsString": true,
            "values": [
              {
                "name": "Enabled",
                "value": "Enabled"
              },
              {
                "name": "Disabled",
                "value": "Disabled"
              }
            ]
          }
        },
        "systemComponents": {
          "type": "array",
          "description": "List of system extensions that are installed on the cluster resource.",
          "items": {
            "$ref": "#/$defs/SystemComponent"
          }
        },
        "agentErrors": {
          "type": "array",
          "description": "List of arc agentry and system components errors on the cluster resource.",
          "items": {
            "$ref": "#/$defs/AgentError"
          }
        },
        "agentState": {
          "type": "string",
          "description": "Represents the current state of the Arc agentry and its dependent components.",
          "readOnly": true
        }
      }
    },
    "ArcAgentryConfigurations": {
      "type": "object",
      "properties": {
        "feature": {
          "type": "string",
          "description": "Specifies the name of the feature for the configuration setting."
        },
        "settings": {
          "type": [
            "object",
            "null"
          ],
          "description": "The configuration settings for the feature that do not contain any sensitive or secret information.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "protectedSettings": {
          "type": [
            "object",
            "null"
          ],
          "description": "The configuration settings for the feature that contain any sensitive or secret information.",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "ConnectedClusterIdentity": {
      "type": "object",
      "description": "Identity for the connected cluster.",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "The principal id of connected cluster identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.",
          "default": "SystemAssigned",
          "enum": [
            "None",
            "SystemAssigned"
          ],
          "x-ms-enum": {
            "name": "ResourceIdentityType",
            "modelAsString": false
          }
        }
      },
      "required": [
        "type"
      ]
    },
    "ConnectedClusterKind": {
      "type": "string",
      "description": "Indicates the kind of Arc connected cluster based on host infrastructure.",
      "enum": [
        "ProvisionedCluster"
      ],
      "x-ms-enum": {
        "name": "ConnectedClusterKind",
        "modelAsString": true,
        "values": [
          {
            "name": "ProvisionedCluster",
            "value": "ProvisionedCluster"
          }
        ]
      }
    },
    "ConnectedClusterProperties": {
      "type": "object",
      "description": "Properties of the connected cluster.",
      "properties": {
        "agentPublicKeyCertificate": {
          "type": "string",
          "description": "Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure."
        },
        "kubernetesVersion": {
          "type": "string",
          "description": "The Kubernetes version of the connected cluster resource",
          "readOnly": true
        },
        "totalNodeCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of nodes present in the connected cluster resource",
          "readOnly": true
        },
        "totalCoreCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of CPU cores present in the connected cluster resource",
          "readOnly": true
        },
        "agentVersion": {
          "type": "string",
          "description": "Version of the agent running on the connected cluster resource",
          "readOnly": true
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "Provisioning state of the connected cluster resource."
        },
        "distribution": {
          "type": "string",
          "description": "The Kubernetes distribution running on this connected cluster."
        },
        "distributionVersion": {
          "type": "string",
          "description": "The Kubernetes distribution version on this connected cluster."
        },
        "infrastructure": {
          "type": "string",
          "description": "The infrastructure on which the Kubernetes cluster represented by this connected cluster is running on."
        },
        "offering": {
          "type": "string",
          "description": "Connected cluster offering",
          "readOnly": true
        },
        "managedIdentityCertificateExpirationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Expiration time of the managed identity certificate",
          "readOnly": true
        },
        "lastConnectivityTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time representing the last instance when heart beat was received from the cluster",
          "readOnly": true
        },
        "connectivityStatus": {
          "$ref": "#/$defs/ConnectivityStatus",
          "description": "Represents the connectivity status of the connected cluster.",
          "readOnly": true
        },
        "privateLinkState": {
          "type": "string",
          "description": "Property which describes the state of private link on a connected cluster resource.",
          "default": "Disabled",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "x-ms-enum": {
            "name": "PrivateLinkState",
            "modelAsString": true,
            "values": [
              {
                "name": "Enabled",
                "value": "Enabled"
              },
              {
                "name": "Disabled",
                "value": "Disabled"
              }
            ]
          }
        },
        "privateLinkScopeResourceId": {
          "type": "string",
          "description": "This is populated only if privateLinkState is enabled. The resource id of the private link scope this connected cluster is assigned to, if any."
        },
        "azureHybridBenefit": {
          "type": "string",
          "description": "Indicates whether Azure Hybrid Benefit is opted in",
          "default": "NotApplicable",
          "enum": [
            "True",
            "False",
            "NotApplicable"
          ],
          "x-ms-enum": {
            "name": "AzureHybridBenefit",
            "modelAsString": true,
            "values": [
              {
                "name": "True",
                "value": "True"
              },
              {
                "name": "False",
                "value": "False"
              },
              {
                "name": "NotApplicable",
                "value": "NotApplicable"
              }
            ]
          }
        },
        "aadProfile": {
          "$ref": "#/$defs/AadProfile",
          "description": "AAD profile for the connected cluster."
        },
        "arcAgentProfile": {
          "$ref": "#/$defs/ArcAgentProfile",
          "description": "Arc agentry configuration for the provisioned cluster."
        },
        "securityProfile": {
          "$ref": "#/$defs/SecurityProfile",
          "description": "Security profile for the connected cluster."
        },
        "oidcIssuerProfile": {
          "$ref": "#/$defs/OidcIssuerProfile",
          "description": "Open ID Connect (OIDC) Issuer Profile for the connected cluster."
        },
        "gateway": {
          "$ref": "#/$defs/Gateway",
          "description": "Details of the gateway used by the Arc router for connectivity."
        },
        "arcAgentryConfigurations": {
          "type": [
            "array",
            "null"
          ],
          "description": "Configuration settings for customizing the behavior of the connected cluster.",
          "items": {
            "$ref": "#/$defs/ArcAgentryConfigurations"
          }
        },
        "miscellaneousProperties": {
          "type": "object",
          "description": "More properties related to the Connected Cluster",
          "additionalProperties": {
            "type": "string"
          },
          "readOnly": true
        }
      },
      "required": [
        "agentPublicKeyCertificate"
      ]
    },
    "ConnectivityStatus": {
      "type": "string",
      "description": "Represents the connectivity status of the connected cluster.",
      "enum": [
        "Connecting",
        "Connected",
        "Offline",
        "Expired",
        "AgentNotInstalled"
      ],
      "x-ms-enum": {
        "name": "ConnectivityStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Connecting",
            "value": "Connecting"
          },
          {
            "name": "Connected",
            "value": "Connected"
          },
          {
            "name": "Offline",
            "value": "Offline"
          },
          {
            "name": "Expired",
            "value": "Expired"
          },
          {
            "name": "AgentNotInstalled",
            "value": "AgentNotInstalled"
          }
        ]
      }
    },
    "Gateway": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Indicates whether the gateway for arc router connectivity is enabled."
        }
      }
    },
    "OidcIssuerProfile": {
      "type": "object",
      "description": "OIDC Issuer Profile specifies attributes for workload identity integration.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether to enable oidc issuer for workload identity integration."
        },
        "issuerUrl": {
          "type": "string",
          "description": "The issuer url for hybrid clusters connected to Arc used for the workload identity feature.",
          "readOnly": true
        },
        "selfHostedIssuerUrl": {
          "type": "string",
          "description": "The issuer url for public cloud clusters - AKS, EKS, GKE - used for the workload identity feature."
        }
      }
    },
    "ProvisioningState": {
      "type": "string",
      "description": "The current deployment state of connectedClusters.",
      "enum": [
        "Succeeded",
        "Failed",
        "Canceled",
        "Provisioning",
        "Updating",
        "Deleting",
        "Accepted"
      ],
      "x-ms-enum": {
        "name": "ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded"
          },
          {
            "name": "Failed",
            "value": "Failed"
          },
          {
            "name": "Canceled",
            "value": "Canceled"
          },
          {
            "name": "Provisioning",
            "value": "Provisioning"
          },
          {
            "name": "Updating",
            "value": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting"
          },
          {
            "name": "Accepted",
            "value": "Accepted"
          }
        ]
      }
    },
    "SecurityProfile": {
      "type": "object",
      "description": "Security Profile specifies attributes for cluster security features.",
      "properties": {
        "workloadIdentity": {
          "$ref": "#/$defs/SecurityProfileWorkloadIdentity",
          "description": "The workload identity feature webhook."
        }
      }
    },
    "SecurityProfileWorkloadIdentity": {
      "type": "object",
      "description": "The workload identity feature webhook.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether to enable or disable the workload identity Webhook"
        }
      }
    },
    "SystemComponent": {
      "type": "object",
      "description": "System extensions and its current versions installed on the cluster resource.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the system extension"
        },
        "userSpecifiedVersion": {
          "type": "string",
          "description": "Version of the system extension to be installed on the cluster resource."
        },
        "majorVersion": {
          "type": "integer",
          "format": "int32",
          "description": "Major Version of the system extension that is currently installed on the cluster resource."
        },
        "currentVersion": {
          "type": "string",
          "description": "Version of the system extension that is currently installed on the cluster resource.",
          "readOnly": true
        }
      }
    },
    "TrackedResource": {
      "type": "object",
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ]
        },
        "location": {
          "type": "string",
          "description": "The geo-location where the resource lives",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}