{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-arc/json-schema/microsoft-azure-arc-network-security-perimeter-configuration-schema.json",
  "title": "NetworkSecurityPerimeterConfiguration",
  "description": "Properties that define a Network Security Perimeter resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-arc-networksecurityperimeterconfiguration-api-openapi.yml#/components/schemas/NetworkSecurityPerimeterConfiguration",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/NetworkSecurityPerimeterConfigurationProperties",
      "description": "Properties that define a Network Security Perimeter resource.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "AccessMode": {
      "type": "string",
      "description": "Property that impacts a resource's logging behavior and its connectivity with other resources and public networks.",
      "enum": [
        "enforced",
        "audit",
        "learning"
      ],
      "x-ms-enum": {
        "name": "AccessMode",
        "modelAsString": true,
        "values": [
          {
            "name": "enforced",
            "value": "enforced",
            "description": "Indicates that resource access is controlled by the NSP definition."
          },
          {
            "name": "audit",
            "value": "audit",
            "description": "Dry run mode, where traffic is evaluated against NSP Rules, logged but not enforced."
          },
          {
            "name": "learning",
            "value": "learning",
            "description": "Enables traffic evaluation to fall back to resource-specific firewall configurations."
          }
        ]
      }
    },
    "AccessRule": {
      "type": "object",
      "description": "Access rule.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the access rule.",
          "readOnly": true
        },
        "properties": {
          "$ref": "#/$defs/AccessRuleProperties",
          "description": "Access rule properties",
          "readOnly": true,
          "x-ms-client-flatten": true
        }
      }
    },
    "AccessRuleDirection": {
      "type": "string",
      "description": "Indicates direction of an access rule.",
      "enum": [
        "Inbound",
        "Outbound"
      ],
      "x-ms-enum": {
        "name": "AccessRuleDirection",
        "modelAsString": true,
        "values": [
          {
            "name": "Inbound",
            "value": "Inbound",
            "description": "Traffic originates outside of network."
          },
          {
            "name": "Outbound",
            "value": "Outbound",
            "description": "Traffic originates inside the network"
          }
        ]
      }
    },
    "AccessRuleProperties": {
      "type": "object",
      "description": "Properties of an access rule.",
      "properties": {
        "direction": {
          "$ref": "#/$defs/AccessRuleDirection",
          "description": "Direction of the access rule.",
          "readOnly": true
        },
        "addressPrefixes": {
          "type": "array",
          "description": "Address prefixes that are allowed access.",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "NetworkSecurityPerimeter": {
      "type": "object",
      "description": "Properties that define a Network Security Perimeter resource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Azure resource Id",
          "readOnly": true
        },
        "perimeterGuid": {
          "type": "string",
          "description": "Guid of the Network Security Perimeter",
          "readOnly": true
        },
        "location": {
          "type": "string",
          "description": "Regional location of the perimeter",
          "readOnly": true
        }
      }
    },
    "NetworkSecurityPerimeterConfigurationProperties": {
      "type": "object",
      "description": "Properties that define a Network Security Perimeter resource.",
      "properties": {
        "provisioningState": {
          "type": "string",
          "description": "Current state of this NetworkSecurityPerimeter: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed.",
          "readOnly": true
        },
        "provisioningIssues": {
          "type": "array",
          "description": "Provisioning issues.",
          "items": {
            "$ref": "#/$defs/ProvisioningIssue"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        },
        "networkSecurityPerimeter": {
          "$ref": "#/$defs/NetworkSecurityPerimeter",
          "description": "The Network Security Perimeter associated with this configuration."
        },
        "resourceAssociation": {
          "$ref": "#/$defs/ResourceAssociation",
          "description": "The Resource Association."
        },
        "profile": {
          "$ref": "#/$defs/NetworkSecurityPerimeterProfile",
          "description": "Network Security Perimeter profile"
        }
      }
    },
    "NetworkSecurityPerimeterProfile": {
      "type": "object",
      "description": "Network Security Perimeter profile",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the resource",
          "readOnly": true
        },
        "accessRulesVersion": {
          "type": "integer",
          "format": "int32",
          "description": "Access rules version number",
          "readOnly": true
        },
        "accessRules": {
          "type": "array",
          "description": "Collection of access rules for the profile",
          "items": {
            "$ref": "#/$defs/AccessRule"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        },
        "diagnosticSettingsVersion": {
          "type": "integer",
          "format": "int32",
          "description": "Diagnostic settings version number",
          "readOnly": true
        },
        "enabledLogCategories": {
          "type": "array",
          "description": "Collection of enabled log categories for the profile",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "ProvisioningIssue": {
      "type": "object",
      "description": "Details on issues that occurred during provisioning.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the provisioning issue.",
          "readOnly": true
        },
        "properties": {
          "$ref": "#/$defs/ProvisioningIssueProperties",
          "description": "Provisioning issue properties",
          "readOnly": true,
          "x-ms-client-flatten": true
        }
      }
    },
    "ProvisioningIssueProperties": {
      "type": "object",
      "description": "Properties of a provisioning issue.",
      "properties": {
        "issueType": {
          "$ref": "#/$defs/ProvisioningIssueType",
          "description": "Issue type",
          "readOnly": true
        },
        "severity": {
          "$ref": "#/$defs/ProvisioningIssueSeverity",
          "description": "Severity of the provisioning issue.",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "description": "Description of the provisioning issue.",
          "readOnly": true
        },
        "suggestedResourceIds": {
          "type": "array",
          "description": "ARM Ids of the resources that can be associated to the same perimeter to remediate the issue",
          "items": {
            "type": "string"
          },
          "readOnly": true
        },
        "suggestedAccessRules": {
          "type": "array",
          "description": "Access rules that can be added to the perimeter to remediate the issue",
          "items": {
            "$ref": "#/$defs/AccessRule"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "ProvisioningIssueSeverity": {
      "type": "string",
      "description": "Severity of the provisioning issue.",
      "enum": [
        "Warning",
        "Error"
      ],
      "x-ms-enum": {
        "name": "ProvisioningIssueSeverity",
        "modelAsString": true,
        "values": [
          {
            "name": "Warning",
            "value": "Warning",
            "description": "Warnings can cause connectivity issues after provisioning succeeds."
          },
          {
            "name": "Error",
            "value": "Error",
            "description": "Errors will cause association provisioning to fail."
          }
        ]
      }
    },
    "ProvisioningIssueType": {
      "type": "string",
      "description": "Type of provisioning issue.",
      "enum": [
        "MissingPerimeterConfiguration",
        "MissingIdentityConfiguration",
        "ConfigurationPropagationFailure",
        "Other"
      ],
      "x-ms-enum": {
        "name": "ProvisioningIssueType",
        "modelAsString": true,
        "values": [
          {
            "name": "MissingPerimeterConfiguration",
            "value": "MissingPerimeterConfiguration",
            "description": "Perimeter configuration is missing."
          },
          {
            "name": "MissingIdentityConfiguration",
            "value": "MissingIdentityConfiguration",
            "description": "Identity configuration is missing."
          },
          {
            "name": "ConfigurationPropagationFailure",
            "value": "ConfigurationPropagationFailure",
            "description": "Configuration failed to propagate."
          },
          {
            "name": "Other",
            "value": "Other",
            "description": "Other failure."
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "ResourceAssociation": {
      "type": "object",
      "description": "Properties that define a Resource Association.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the Resource Association",
          "readOnly": true
        },
        "accessMode": {
          "$ref": "#/$defs/AccessMode",
          "description": "The access mode",
          "readOnly": true
        }
      }
    }
  }
}