{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-kubernetes-service/json-schema/microsoft-azure-kubernetes-service-cluster-mesh-profile-schema.json",
  "title": "ClusterMeshProfile",
  "description": "A cluster mesh profile stores the general information about the mesh.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-kubernetes-service-clustermeshprofiles-api-openapi.yml#/components/schemas/ClusterMeshProfile",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ClusterMeshProfileProperties",
      "description": "The resource-specific properties for this resource."
    },
    "eTag": {
      "type": "string",
      "description": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.  Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",
      "readOnly": true
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "ClusterMeshProfileProperties": {
      "type": "object",
      "description": "A cluster mesh profile stores the general information about the mesh.",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/ClusterMeshProfileProvisioningState",
          "description": "The provisioning state of the cluster mesh profile.",
          "readOnly": true
        },
        "memberSelector": {
          "$ref": "#/$defs/MemberSelector",
          "description": "Select the members of the mesh.\n  * Only key/value pairs with the `=` operator are accepted in the label selector.\n  * If empty or not specified, no Fleet members will be selected to join the mesh.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "status": {
          "$ref": "#/$defs/ClusterMeshProfileStatus",
          "description": "The cluster mesh profile status.",
          "readOnly": true
        }
      }
    },
    "ClusterMeshProfileProvisioningState": {
      "type": "string",
      "description": "The provisioning state of the cluster mesh profile resource.",
      "enum": [
        "Succeeded",
        "Failed",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "ClusterMeshProfileProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Resource has been created."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Resource creation failed."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Resource creation was canceled."
          }
        ]
      },
      "readOnly": true
    },
    "ClusterMeshProfileStatus": {
      "type": "object",
      "description": "Status of the cluster mesh.",
      "properties": {
        "state": {
          "$ref": "#/$defs/ClusterMeshState",
          "description": "The state of the cluster mesh.",
          "readOnly": true
        },
        "lastAppliedMemberSelector": {
          "$ref": "#/$defs/MemberSelector",
          "description": "The last applied MemberSelector for the cluster mesh profile.",
          "readOnly": true
        },
        "lastOperationId": {
          "type": "string",
          "description": "The last operation ID for the cluster mesh profile.",
          "readOnly": true
        },
        "lastOperationError": {
          "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorDetail",
          "description": "The last operation error of the cluster mesh profile.",
          "readOnly": true
        }
      },
      "required": [
        "state"
      ]
    },
    "ClusterMeshState": {
      "type": "string",
      "description": "Cluster mesh state.",
      "enum": [
        "NotConnected",
        "Applying",
        "Connected",
        "Degraded",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "ClusterMeshState",
        "modelAsString": true,
        "values": [
          {
            "name": "NotConnected",
            "value": "NotConnected",
            "description": "The mesh is not connected."
          },
          {
            "name": "Applying",
            "value": "Applying",
            "description": "The mesh is applying."
          },
          {
            "name": "Connected",
            "value": "Connected",
            "description": "The mesh is connected."
          },
          {
            "name": "Degraded",
            "value": "Degraded",
            "description": "The mesh is degraded."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "The mesh failed to connect."
          }
        ]
      }
    },
    "MemberSelector": {
      "type": "object",
      "description": "Select members of a fleet.",
      "properties": {
        "byLabel": {
          "type": "string",
          "description": "Kubernetes-style label selector for selecting Fleet members, e.g. `env=production`.",
          "maxLength": 512,
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "byLabel"
      ]
    }
  }
}