{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-integration-services/json-schema/microsoft-azure-integration-services-namespace-schema.json",
  "title": "Namespace",
  "description": "Namespace resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-integration-services-namespaces-api-openapi.yml#/components/schemas/Namespace",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/NamespaceProperties",
      "description": "Properties of the Namespace resource.",
      "x-ms-client-flatten": true
    },
    "sku": {
      "$ref": "#/$defs/NamespaceSku",
      "description": "Represents available Sku pricing tiers."
    },
    "identity": {
      "$ref": "#/$defs/IdentityInfo",
      "description": "Identity information for the Namespace resource."
    },
    "systemData": {
      "$ref": "#/$defs/systemData",
      "description": "The system metadata relating to the Event Grid resource.",
      "type": "object",
      "readOnly": true
    }
  },
  "$defs": {
    "ConnectionState": {
      "description": "ConnectionState information.",
      "type": "object",
      "properties": {
        "status": {
          "description": "Status of the connection.",
          "enum": [
            "Pending",
            "Approved",
            "Rejected",
            "Disconnected"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "PersistedConnectionStatus",
            "modelAsString": true
          }
        },
        "description": {
          "description": "Description of the connection state.",
          "type": "string"
        },
        "actionsRequired": {
          "description": "Actions required (if any).",
          "type": "string"
        }
      }
    },
    "CustomDomainConfiguration": {
      "description": "A custom domain configuration that allows users to publish to their own domain name.",
      "required": [
        "fullyQualifiedDomainName"
      ],
      "type": "object",
      "properties": {
        "fullyQualifiedDomainName": {
          "description": "Fully Qualified Domain Name (FQDN) for the custom domain.",
          "type": "string"
        },
        "validationState": {
          "description": "Validation state for the custom domain. This is a read only property and is initially set to 'Pending' and will be updated to 'Approved' by Event Grid only after ownership of the domain name has been successfully validated.",
          "enum": [
            "Pending",
            "Approved",
            "ErrorRetrievingDnsRecord"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "CustomDomainValidationState",
            "modelAsString": true
          }
        },
        "identity": {
          "$ref": "#/$defs/CustomDomainIdentity",
          "description": "Identity info for accessing the certificate for the custom domain. This identity info must match an identity that has been set on the namespace."
        },
        "certificateUrl": {
          "description": "The URL for the certificate that is used for publishing to the custom domain. We currently support certificates stored in Azure Key Vault only. While certificate URL can be either\nversioned URL of the following format https://{key-vault-name}.vault.azure.net/certificates/{certificate-name}/{version-id}, or unversioned URL of the following format (e.g.,\nhttps://contosovault.vault.azure.net/certificates/contosocert, we support unversioned certificate URL only (e.g., https://contosovault.vault.azure.net/certificates/contosocert)",
          "type": "string"
        },
        "expectedTxtRecordName": {
          "description": "Expected DNS TXT record name. Event Grid will check for a TXT record with this name in the DNS record set of the custom domain name to prove ownership over the domain.\nThe values under this TXT record must contain the expected TXT record value.",
          "type": "string"
        },
        "expectedTxtRecordValue": {
          "description": "Expected DNS TXT record value. Event Grid will check for a TXT record with this value in the DNS record set of the custom domain name to prove ownership over the domain.",
          "type": "string"
        }
      }
    },
    "CustomDomainIdentity": {
      "description": "The identity information for retrieving the certificate for the custom domain.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.",
          "enum": [
            "SystemAssigned",
            "UserAssigned"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "CustomDomainIdentityType",
            "modelAsString": true
          }
        },
        "userAssignedIdentity": {
          "description": "The user identity associated with the resource.",
          "type": "string"
        }
      }
    },
    "DynamicRoutingEnrichment": {
      "type": "object",
      "properties": {
        "key": {
          "description": "Dynamic routing enrichment key.",
          "type": "string"
        },
        "value": {
          "description": "Dynamic routing enrichment value.",
          "type": "string"
        }
      }
    },
    "IdentityInfo": {
      "description": "The identity information for the resource.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity.",
          "enum": [
            "None",
            "SystemAssigned",
            "UserAssigned",
            "SystemAssigned, UserAssigned"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "IdentityType",
            "modelAsString": true
          }
        },
        "principalId": {
          "description": "The principal ID of resource identity.",
          "type": "string"
        },
        "tenantId": {
          "description": "The tenant ID of resource.",
          "type": "string"
        },
        "userAssignedIdentities": {
          "description": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.\nThis property is currently not used and reserved for future usage.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/UserIdentityProperties"
          }
        }
      }
    },
    "InboundIpRule": {
      "type": "object",
      "properties": {
        "ipMask": {
          "description": "IP Address in CIDR notation e.g., 10.0.0.0/8.",
          "type": "string"
        },
        "action": {
          "description": "Action to perform based on the match or no match of the IpMask.",
          "enum": [
            "Allow"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "IpActionType",
            "modelAsString": true
          }
        }
      }
    },
    "NamespaceProperties": {
      "description": "Properties of the namespace resource.",
      "type": "object",
      "properties": {
        "privateEndpointConnections": {
          "description": "List of private endpoint connections.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/PrivateEndpointConnection"
          }
        },
        "provisioningState": {
          "description": "Provisioning state of the namespace resource.",
          "enum": [
            "Creating",
            "Updating",
            "Deleting",
            "Succeeded",
            "Canceled",
            "Failed",
            "Deleted",
            "DeleteFailed",
            "CreateFailed",
            "UpdatedFailed"
          ],
          "type": "string",
          "readOnly": true,
          "x-ms-enum": {
            "name": "NamespaceProvisioningState",
            "modelAsString": true
          }
        },
        "topicsConfiguration": {
          "$ref": "#/$defs/TopicsConfiguration",
          "description": "Topics configuration information for the namespace resource"
        },
        "topicSpacesConfiguration": {
          "$ref": "#/$defs/TopicSpacesConfiguration",
          "description": "Topic spaces configuration information for the namespace resource"
        },
        "isZoneRedundant": {
          "description": "This is an optional property and it allows the user to specify if the namespace resource supports zone-redundancy capability or not. If this\nproperty is not specified explicitly by the user, its default value depends on the following conditions:\n    a. For Availability Zones enabled regions - The default property value would be true.\n    b. For non-Availability Zones enabled regions - The default property value would be false.\nOnce specified, this property cannot be updated.",
          "type": "boolean"
        },
        "publicNetworkAccess": {
          "description": "This determines if traffic is allowed over public network. By default it is enabled.\nYou can further restrict to specific IPs by configuring <seealso cref=\"P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules\" />",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "PublicNetworkAccess",
            "modelAsString": true
          }
        },
        "inboundIpRules": {
          "description": "This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/InboundIpRule"
          },
          "x-ms-identifiers": []
        },
        "minimumTlsVersionAllowed": {
          "description": "Minimum TLS version of the publisher allowed to publish to this namespace. Only TLS version 1.2 is supported.",
          "enum": [
            "1.0",
            "1.1",
            "1.2"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "TlsVersion",
            "modelAsString": true
          }
        }
      }
    },
    "NamespaceSku": {
      "description": "Represents available Sku pricing tiers.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the SKU.",
          "enum": [
            "Standard"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "SkuName",
            "modelAsString": true
          }
        },
        "capacity": {
          "format": "int32",
          "description": "Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value is\n1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. Min capacity is 1 and\nmax allowed capacity is 20.",
          "type": "integer"
        }
      }
    },
    "PrivateEndpoint": {
      "description": "PrivateEndpoint information.",
      "type": "object",
      "properties": {
        "id": {
          "description": "The ARM identifier for Private Endpoint.",
          "type": "string"
        }
      }
    },
    "PrivateEndpointConnection": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ],
      "properties": {
        "properties": {
          "$ref": "#/$defs/PrivateEndpointConnectionProperties",
          "description": "Properties of the PrivateEndpointConnection.",
          "x-ms-client-flatten": true
        }
      }
    },
    "PrivateEndpointConnectionProperties": {
      "description": "Properties of the private endpoint connection resource.",
      "type": "object",
      "properties": {
        "privateEndpoint": {
          "$ref": "#/$defs/PrivateEndpoint",
          "description": "The Private Endpoint resource for this Connection."
        },
        "groupIds": {
          "description": "GroupIds from the private link service resource.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "privateLinkServiceConnectionState": {
          "$ref": "#/$defs/ConnectionState",
          "description": "Details about the state of the connection."
        },
        "provisioningState": {
          "description": "Provisioning state of the Private Endpoint Connection.",
          "enum": [
            "Creating",
            "Updating",
            "Deleting",
            "Succeeded",
            "Canceled",
            "Failed"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "ResourceProvisioningState",
            "modelAsString": true
          }
        }
      }
    },
    "Resource": {
      "description": "Definition of a Resource.",
      "type": "object",
      "properties": {
        "id": {
          "description": "Fully qualified identifier of the resource.",
          "type": "string",
          "readOnly": true
        },
        "name": {
          "description": "Name of the resource.",
          "type": "string",
          "readOnly": true
        },
        "type": {
          "description": "Type of the resource.",
          "type": "string",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "RoutingEnrichments": {
      "type": "object",
      "properties": {
        "static": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StaticRoutingEnrichment"
          },
          "x-ms-identifiers": []
        },
        "dynamic": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DynamicRoutingEnrichment"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "RoutingIdentityInfo": {
      "description": "Routing identity info for topic spaces configuration.",
      "type": "object",
      "properties": {
        "type": {
          "description": "Routing identity type for topic spaces configuration.",
          "enum": [
            "None",
            "SystemAssigned",
            "UserAssigned"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "RoutingIdentityType",
            "modelAsString": true
          }
        },
        "userAssignedIdentity": {
          "type": "string"
        }
      }
    },
    "StaticRoutingEnrichment": {
      "description": "Static routing enrichment details.",
      "required": [
        "valueType"
      ],
      "type": "object",
      "properties": {
        "key": {
          "description": "Static routing enrichment key.",
          "type": "string"
        },
        "valueType": {
          "description": "Static routing enrichment value type. For e.g. this property value can be 'String'.",
          "enum": [
            "String"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "StaticRoutingEnrichmentType",
            "modelAsString": true
          }
        }
      }
    },
    "TopicSpacesConfiguration": {
      "description": "Properties of the Topic Spaces Configuration.",
      "type": "object",
      "properties": {
        "state": {
          "description": "Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled.",
          "default": "Disabled",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "TopicSpacesConfigurationState",
            "modelAsString": true
          }
        },
        "routeTopicResourceId": {
          "description": "Fully qualified Azure Resource Id for the Event Grid Topic to which events will be routed to from TopicSpaces under a namespace.\nThis property should be in the following format '/subscriptions/{subId}/resourcegroups/{resourceGroupName}/providers/microsoft.EventGrid/topics/{topicName}'.\nThis topic should reside in the same region where namespace is located.",
          "type": "string"
        },
        "hostname": {
          "description": "The endpoint for the topic spaces configuration. This is a read-only property.",
          "type": "string",
          "readOnly": true
        },
        "routingEnrichments": {
          "$ref": "#/$defs/RoutingEnrichments",
          "description": "Routing enrichments for topic spaces configuration"
        },
        "maximumSessionExpiryInHours": {
          "format": "int32",
          "description": "The maximum session expiry in hours. The property default value is 1 hour.\nMin allowed value is 1 hour and max allowed value is 8 hours.",
          "type": "integer"
        },
        "maximumClientSessionsPerAuthenticationName": {
          "format": "int32",
          "description": "The maximum number of sessions per authentication name. The property default value is 1.\nMin allowed value is 1 and max allowed value is 100.",
          "type": "integer"
        },
        "routingIdentityInfo": {
          "$ref": "#/$defs/RoutingIdentityInfo",
          "description": "Routing identity info for topic spaces configuration."
        },
        "customDomains": {
          "description": "List of custom domain configurations for the namespace.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomDomainConfiguration"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "TopicsConfiguration": {
      "description": "Properties of the Topics Configuration.",
      "type": "object",
      "properties": {
        "hostname": {
          "description": "The hostname for the topics configuration. This is a read-only property.",
          "type": "string",
          "readOnly": true
        },
        "customDomains": {
          "description": "List of custom domain configurations for the namespace.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomDomainConfiguration"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "TrackedResource": {
      "description": "Definition of a Tracked Resource.",
      "required": [
        "location"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ],
      "properties": {
        "location": {
          "description": "Location of the resource.",
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "tags": {
          "description": "Tags of the resource.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "UserIdentityProperties": {
      "description": "The information about the user identity.",
      "type": "object",
      "properties": {
        "principalId": {
          "description": "The principal id of user assigned identity.",
          "type": "string"
        },
        "clientId": {
          "description": "The client id of user assigned identity.",
          "type": "string"
        }
      }
    },
    "systemData": {
      "type": "object",
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      },
      "readOnly": true
    }
  }
}