{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-functions/json-schema/microsoft-azure-functions-kube-environment-schema.json",
  "title": "KubeEnvironment",
  "description": "A Kubernetes cluster specialized for web workloads by Azure App Service",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-functions-kubeenvironments-api-openapi.yml#/components/schemas/KubeEnvironment",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/KubeEnvironmentProperties",
      "description": "KubeEnvironment resource specific properties",
      "x-ms-client-flatten": true
    },
    "extendedLocation": {
      "$ref": "#/$defs/ExtendedLocation",
      "description": "Extended Location."
    },
    "kind": {
      "type": "string",
      "description": "Kind of resource."
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource"
    }
  ],
  "$defs": {
    "AppLogsConfiguration": {
      "type": "object",
      "properties": {
        "destination": {
          "type": "string"
        },
        "logAnalyticsConfiguration": {
          "$ref": "#/$defs/LogAnalyticsConfiguration"
        }
      }
    },
    "ArcConfiguration": {
      "type": "object",
      "properties": {
        "artifactsStorageType": {
          "$ref": "#/$defs/StorageType",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "artifactStorageClassName": {
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "artifactStorageMountPath": {
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "artifactStorageNodeName": {
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "artifactStorageAccessMode": {
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "frontEndServiceConfiguration": {
          "$ref": "#/$defs/FrontEndConfiguration"
        },
        "kubeConfig": {
          "type": "string",
          "format": "password",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        }
      }
    },
    "ContainerAppsConfiguration": {
      "type": "object",
      "properties": {
        "daprAIInstrumentationKey": {
          "type": "string",
          "description": "Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "platformReservedCidr": {
          "type": "string",
          "description": "IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "platformReservedDnsIP": {
          "type": "string",
          "description": "An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "controlPlaneSubnetResourceId": {
          "type": "string",
          "description": "Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "appSubnetResourceId": {
          "type": "string",
          "description": "Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "dockerBridgeCidr": {
          "type": "string",
          "description": "CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      }
    },
    "ExtendedLocation": {
      "type": "object",
      "description": "Extended Location.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of extended location."
        },
        "type": {
          "type": "string",
          "description": "Type of extended location.",
          "readOnly": true
        }
      }
    },
    "FrontEndConfiguration": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/FrontEndServiceType"
        }
      }
    },
    "FrontEndServiceType": {
      "type": "string",
      "enum": [
        "NodePort",
        "LoadBalancer"
      ],
      "x-ms-enum": {
        "name": "FrontEndServiceType",
        "modelAsString": false
      }
    },
    "KubeEnvironmentProperties": {
      "type": "object",
      "description": "KubeEnvironment resource specific properties",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/KubeEnvironmentProvisioningState",
          "description": "Provisioning state of the Kubernetes Environment.",
          "readOnly": true
        },
        "deploymentErrors": {
          "type": "string",
          "description": "Any errors that occurred during deployment or deployment validation",
          "readOnly": true
        },
        "internalLoadBalancerEnabled": {
          "type": "boolean",
          "description": "Only visible within Vnet/Subnet",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "defaultDomain": {
          "type": "string",
          "description": "Default Domain Name for the cluster",
          "readOnly": true
        },
        "staticIp": {
          "type": "string",
          "description": "Static IP of the KubeEnvironment",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "environmentType": {
          "type": "string",
          "description": "Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "arcConfiguration": {
          "$ref": "#/$defs/ArcConfiguration",
          "description": "Cluster configuration which determines the ARC cluster\ncomponents types. Eg: Choosing between BuildService kind,\nFrontEnd Service ArtifactsStorageType etc."
        },
        "appLogsConfiguration": {
          "$ref": "#/$defs/AppLogsConfiguration",
          "description": "Cluster configuration which enables the log daemon to export\napp logs to a destination. Currently only \"log-analytics\" is\nsupported"
        },
        "containerAppsConfiguration": {
          "$ref": "#/$defs/ContainerAppsConfiguration",
          "description": "Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration"
        },
        "aksResourceID": {
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      }
    },
    "KubeEnvironmentProvisioningState": {
      "type": "string",
      "description": "Provisioning state of the Kubernetes Environment.",
      "enum": [
        "Succeeded",
        "Failed",
        "Canceled",
        "Waiting",
        "InitializationInProgress",
        "InfrastructureSetupInProgress",
        "InfrastructureSetupComplete",
        "ScheduledForDelete",
        "UpgradeRequested",
        "UpgradeFailed"
      ],
      "x-ms-enum": {
        "name": "KubeEnvironmentProvisioningState",
        "modelAsString": false
      }
    },
    "LogAnalyticsConfiguration": {
      "type": "object",
      "properties": {
        "customerId": {
          "type": "string"
        },
        "sharedKey": {
          "type": "string",
          "format": "password",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        }
      }
    },
    "StorageType": {
      "type": "string",
      "enum": [
        "LocalNode",
        "NetworkFileSystem"
      ],
      "x-ms-enum": {
        "name": "StorageType",
        "modelAsString": false
      }
    }
  }
}