{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-functions/json-schema/microsoft-azure-functions-kube-environment-patch-resource-schema.json",
  "title": "KubeEnvironmentPatchResource",
  "description": "ARM resource for a KubeEnvironment when patching",
  "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/KubeEnvironmentPatchResource",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/KubeEnvironmentPatchResourceProperties",
      "description": "KubeEnvironmentPatchResource resource specific properties",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyOnlyResource"
    }
  ],
  "$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"
          ]
        }
      }
    },
    "FrontEndConfiguration": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/FrontEndServiceType"
        }
      }
    },
    "FrontEndServiceType": {
      "type": "string",
      "enum": [
        "NodePort",
        "LoadBalancer"
      ],
      "x-ms-enum": {
        "name": "FrontEndServiceType",
        "modelAsString": false
      }
    },
    "KubeEnvironmentPatchResourceProperties": {
      "type": "object",
      "description": "KubeEnvironmentPatchResource 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"
          ]
        },
        "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
        }
      }
    },
    "ProxyOnlyResource": {
      "type": "object",
      "description": "Azure proxy only resource. This resource is not tracked by Azure Resource Manager.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource Id.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Resource Name.",
          "readOnly": true
        },
        "kind": {
          "type": "string",
          "description": "Kind of resource."
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        }
      }
    },
    "StorageType": {
      "type": "string",
      "enum": [
        "LocalNode",
        "NetworkFileSystem"
      ],
      "x-ms-enum": {
        "name": "StorageType",
        "modelAsString": false
      }
    }
  }
}