{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/power-platform/json-schema/power-platform-enterprise-policy-schema.json",
  "title": "EnterprisePolicy",
  "description": "Definition of the EnterprisePolicy.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/power-platform-enterprisepolicies-api-openapi.yml#/components/schemas/EnterprisePolicy",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/Properties",
      "description": "The properties that define configuration for the enterprise policy",
      "x-ms-client-flatten": true
    },
    "identity": {
      "$ref": "#/$defs/EnterprisePolicyIdentity",
      "description": "The identity of the EnterprisePolicy."
    },
    "kind": {
      "$ref": "#/$defs/EnterprisePolicyKind",
      "description": "The kind (type) of Enterprise Policy."
    }
  },
  "required": [
    "kind"
  ],
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource"
    }
  ],
  "$defs": {
    "EnterprisePolicyIdentity": {
      "type": "object",
      "description": "The identity of the EnterprisePolicy.",
      "properties": {
        "systemAssignedIdentityPrincipalId": {
          "type": "string",
          "description": "The principal id of EnterprisePolicy identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant id associated with the EnterprisePolicy.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ResourceIdentityType",
          "description": "The type of identity used for the EnterprisePolicy. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity."
        }
      }
    },
    "EnterprisePolicyKind": {
      "type": "string",
      "description": "The Kind (type) of Enterprise Policy",
      "enum": [
        "Lockbox",
        "PrivateEndpoint",
        "Encryption",
        "NetworkInjection",
        "Identity"
      ],
      "x-ms-enum": {
        "name": "EnterprisePolicyKind",
        "modelAsString": true,
        "values": [
          {
            "name": "Lockbox",
            "value": "Lockbox",
            "description": "Lockbox"
          },
          {
            "name": "PrivateEndpoint",
            "value": "PrivateEndpoint",
            "description": "PrivateEndpoint"
          },
          {
            "name": "Encryption",
            "value": "Encryption",
            "description": "Encryption"
          },
          {
            "name": "NetworkInjection",
            "value": "NetworkInjection",
            "description": "NetworkInjection"
          },
          {
            "name": "Identity",
            "value": "Identity",
            "description": "Identity"
          }
        ]
      }
    },
    "HealthStatus": {
      "type": "string",
      "description": "The health status of the resource.",
      "enum": [
        "Undetermined",
        "Healthy",
        "Warning",
        "Unhealthy"
      ],
      "x-ms-enum": {
        "name": "HealthStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Undetermined",
            "value": "Undetermined",
            "description": "Undetermined"
          },
          {
            "name": "Healthy",
            "value": "Healthy",
            "description": "Healthy"
          },
          {
            "name": "Warning",
            "value": "Warning",
            "description": "Warning"
          },
          {
            "name": "Unhealthy",
            "value": "Unhealthy",
            "description": "Unhealthy"
          }
        ]
      }
    },
    "KeyVaultProperties": {
      "type": "object",
      "description": "Settings concerning key vault encryption for a configuration store.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Uri of KeyVault"
        },
        "key": {
          "$ref": "#/$defs/keyProperties",
          "description": "Identity of the secret that includes name and version."
        }
      }
    },
    "Properties": {
      "type": "object",
      "description": "The properties that define configuration for the enterprise policy.",
      "properties": {
        "systemId": {
          "type": "string",
          "description": "The internally assigned unique identifier of the resource.",
          "readOnly": true
        },
        "lockbox": {
          "$ref": "#/$defs/PropertiesLockbox",
          "description": "Settings concerning lockbox."
        },
        "encryption": {
          "$ref": "#/$defs/PropertiesEncryption",
          "description": "The encryption settings for a configuration store."
        },
        "networkInjection": {
          "$ref": "#/$defs/PropertiesNetworkInjection",
          "description": "Settings concerning network injection."
        },
        "healthStatus": {
          "$ref": "#/$defs/HealthStatus",
          "description": "The health status of the resource."
        }
      }
    },
    "PropertiesEncryption": {
      "type": "object",
      "description": "The encryption settings for a configuration store.",
      "properties": {
        "keyVault": {
          "$ref": "#/$defs/KeyVaultProperties",
          "description": "Key vault properties."
        },
        "state": {
          "$ref": "#/$defs/State",
          "description": "The state of onboarding, which only appears in the response."
        }
      }
    },
    "PropertiesLockbox": {
      "type": "object",
      "description": "Settings concerning lockbox.",
      "properties": {
        "state": {
          "$ref": "#/$defs/State",
          "description": "lockbox configuration"
        }
      }
    },
    "PropertiesNetworkInjection": {
      "type": "object",
      "description": "Settings concerning network injection.",
      "properties": {
        "virtualNetworks": {
          "type": "array",
          "description": "Network injection configuration",
          "items": {
            "$ref": "#/$defs/VirtualNetworkProperties"
          }
        }
      }
    },
    "ResourceIdentityType": {
      "type": "string",
      "description": "The type of identity used for the EnterprisePolicy. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity.",
      "enum": [
        "SystemAssigned",
        "None"
      ],
      "x-ms-enum": {
        "name": "ResourceIdentityType",
        "modelAsString": false,
        "values": [
          {
            "name": "SystemAssigned",
            "value": "SystemAssigned",
            "description": "SystemAssigned"
          },
          {
            "name": "None",
            "value": "None",
            "description": "None"
          }
        ]
      }
    },
    "State": {
      "type": "string",
      "description": "The state of onboarding, which only appears in the response.",
      "enum": [
        "Enabled",
        "Disabled",
        "NotConfigured"
      ],
      "x-ms-enum": {
        "name": "State",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Enabled"
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Disabled"
          },
          {
            "name": "NotConfigured",
            "value": "NotConfigured",
            "description": "NotConfigured"
          }
        ]
      }
    },
    "SubnetProperties": {
      "type": "object",
      "description": "Properties of a subnet.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Subnet name."
        }
      }
    },
    "VirtualNetworkProperties": {
      "type": "object",
      "description": "Settings concerning the virtual network.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Uri of the virtual network."
        },
        "subnet": {
          "$ref": "#/$defs/SubnetProperties",
          "description": "Properties of a subnet."
        }
      }
    },
    "keyProperties": {
      "type": "object",
      "description": "Url and version of the KeyVault Secret",
      "properties": {
        "name": {
          "type": "string",
          "description": "The identifier of the key vault key used to encrypt data."
        },
        "version": {
          "type": "string",
          "description": "The version of the identity which will be used to access key vault."
        }
      }
    }
  }
}