{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-integration-services/json-schema/microsoft-azure-integration-services-sbnamespace-schema.json",
  "title": "SBNamespace",
  "description": "Description of a 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/SBNamespace",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/SBNamespaceProperties",
      "description": "Properties of the namespace.",
      "x-ms-client-flatten": true
    },
    "sku": {
      "$ref": "#/$defs/SBSku",
      "description": "Properties of SKU"
    },
    "identity": {
      "$ref": "#/$defs/Identity",
      "description": "Properties of BYOK Identity description"
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "ConfidentialCompute": {
      "type": "object",
      "properties": {
        "mode": {
          "$ref": "#/$defs/Mode",
          "description": "Setting to Enable or Disable Confidential Compute"
        }
      }
    },
    "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"
        }
      }
    },
    "Encryption": {
      "type": "object",
      "description": "Properties to configure Encryption",
      "properties": {
        "keyVaultProperties": {
          "type": "array",
          "description": "Properties of KeyVault",
          "items": {
            "$ref": "#/$defs/KeyVaultProperties"
          },
          "x-ms-client-name": "KeyVaultProperties"
        },
        "keySource": {
          "type": "string",
          "description": "Enumerates the possible value of keySource for Encryption",
          "default": "Microsoft.KeyVault",
          "enum": [
            "Microsoft.KeyVault"
          ],
          "x-ms-enum": {
            "modelAsString": false
          }
        },
        "requireInfrastructureEncryption": {
          "type": "boolean",
          "description": "Enable Infrastructure Encryption (Double Encryption)"
        }
      }
    },
    "GeoDRRoleType": {
      "type": "string",
      "description": "GeoDR Role Types",
      "enum": [
        "Primary",
        "Secondary"
      ],
      "x-ms-enum": {
        "name": "GeoDRRoleType",
        "modelAsString": true,
        "values": [
          {
            "name": "Primary",
            "value": "Primary"
          },
          {
            "name": "Secondary",
            "value": "Secondary"
          }
        ]
      }
    },
    "GeoDataReplicationProperties": {
      "type": "object",
      "description": "GeoDR Replication properties",
      "properties": {
        "maxReplicationLagDurationInSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary replicas.  When the lag exceeds the configured amount, operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day."
        },
        "locations": {
          "type": "array",
          "description": "A list of regions where replicas of the namespace are maintained.",
          "items": {
            "$ref": "#/$defs/NamespaceReplicaLocation"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "Identity": {
      "type": "object",
      "description": "Properties to configure User Assigned Identities for Bring your Own Keys",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "ObjectId from the KeyVault",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "description": "TenantId from the KeyVault",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ManagedServiceIdentityType",
          "description": "Type of managed service identity."
        },
        "userAssignedIdentities": {
          "type": "object",
          "description": "Properties for User Assigned Identities",
          "additionalProperties": {
            "$ref": "#/$defs/UserAssignedIdentity"
          }
        }
      }
    },
    "IpAddressType": {
      "type": "string",
      "description": "The IP address type for the namespace. Determines whether the namespace supports IPv4 only or both IPv4 and IPv6 (dual stack).",
      "enum": [
        "IPv4",
        "DualStack"
      ],
      "x-ms-enum": {
        "name": "IpAddressType",
        "modelAsString": true,
        "values": [
          {
            "name": "IPv4",
            "value": "IPv4",
            "description": "The namespace supports IPv4 addresses only."
          },
          {
            "name": "DualStack",
            "value": "DualStack",
            "description": "The namespace supports both IPv4 and IPv6 addresses (dual stack)."
          }
        ]
      }
    },
    "KeyVaultProperties": {
      "type": "object",
      "description": "Properties to configure keyVault Properties",
      "properties": {
        "keyName": {
          "type": "string",
          "description": "Name of the Key from KeyVault"
        },
        "keyVaultUri": {
          "type": "string",
          "description": "Uri of KeyVault"
        },
        "keyVersion": {
          "type": "string",
          "description": "Version of KeyVault"
        },
        "identity": {
          "$ref": "#/$defs/UserAssignedIdentityProperties"
        }
      }
    },
    "ManagedServiceIdentityType": {
      "type": "string",
      "description": "Type of managed service identity.",
      "enum": [
        "SystemAssigned",
        "UserAssigned",
        "SystemAssigned, UserAssigned",
        "None"
      ],
      "x-ms-enum": {
        "name": "ManagedServiceIdentityType",
        "modelAsString": false
      }
    },
    "Mode": {
      "type": "string",
      "description": "Setting to Enable or Disable Confidential Compute",
      "enum": [
        "Disabled",
        "Enabled"
      ],
      "x-ms-enum": {
        "name": "Mode",
        "modelAsString": true,
        "values": [
          {
            "name": "Disabled",
            "value": "Disabled"
          },
          {
            "name": "Enabled",
            "value": "Enabled"
          }
        ]
      }
    },
    "NamespaceReplicaLocation": {
      "type": "object",
      "description": "Namespace replication properties",
      "properties": {
        "locationName": {
          "type": "string",
          "description": "Azure regions where a replica of the namespace is maintained"
        },
        "roleType": {
          "$ref": "#/$defs/GeoDRRoleType",
          "description": "GeoDR Role Types"
        }
      }
    },
    "PlatformCapabilities": {
      "type": "object",
      "properties": {
        "confidentialCompute": {
          "$ref": "#/$defs/ConfidentialCompute"
        }
      }
    },
    "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
    },
    "SBNamespaceProperties": {
      "type": "object",
      "description": "Properties of the namespace.",
      "properties": {
        "minimumTlsVersion": {
          "$ref": "#/$defs/TlsVersion",
          "description": "The minimum TLS version for the cluster to support, e.g. '1.2'"
        },
        "provisioningState": {
          "type": "string",
          "description": "Provisioning state of the namespace.",
          "readOnly": true
        },
        "status": {
          "type": "string",
          "description": "Status of the namespace.",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time the namespace was created",
          "readOnly": true
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time the namespace was updated.",
          "readOnly": true
        },
        "serviceBusEndpoint": {
          "type": "string",
          "description": "Endpoint you can use to perform Service Bus operations.",
          "readOnly": true
        },
        "metricId": {
          "type": "string",
          "description": "Identifier for Azure Insights metrics",
          "readOnly": true
        },
        "zoneRedundant": {
          "type": "boolean",
          "description": "Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "encryption": {
          "$ref": "#/$defs/Encryption",
          "description": "Properties of BYOK Encryption description"
        },
        "privateEndpointConnections": {
          "type": "array",
          "description": "List of private endpoint connections.",
          "items": {
            "$ref": "#/$defs/PrivateEndpointConnection"
          }
        },
        "disableLocalAuth": {
          "type": "boolean",
          "description": "This property disables SAS authentication for the Service Bus namespace."
        },
        "alternateName": {
          "type": "string",
          "description": "Alternate name for namespace"
        },
        "publicNetworkAccess": {
          "type": "string",
          "description": "This determines if traffic is allowed over public network. By default it is enabled.",
          "default": "Enabled",
          "enum": [
            "Enabled",
            "Disabled",
            "SecuredByPerimeter"
          ],
          "x-ms-enum": {
            "name": "PublicNetworkAccess",
            "modelAsString": true,
            "values": [
              {
                "name": "Enabled",
                "value": "Enabled"
              },
              {
                "name": "Disabled",
                "value": "Disabled"
              },
              {
                "name": "SecuredByPerimeter",
                "value": "SecuredByPerimeter"
              }
            ]
          }
        },
        "premiumMessagingPartitions": {
          "type": "integer",
          "format": "int32",
          "description": "The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4"
        },
        "platformCapabilities": {
          "$ref": "#/$defs/PlatformCapabilities"
        },
        "geoDataReplication": {
          "$ref": "#/$defs/GeoDataReplicationProperties",
          "description": "Geo Data Replication settings for the namespace"
        },
        "ipAddressType": {
          "$ref": "#/$defs/IpAddressType",
          "description": "The IP address type for the namespace. Determines whether the namespace supports IPv4 only or both IPv4 and IPv6 (dual stack)."
        }
      }
    },
    "SBSku": {
      "type": "object",
      "description": "SKU of the namespace.",
      "properties": {
        "name": {
          "$ref": "#/$defs/SkuName",
          "description": "Name of this SKU."
        },
        "tier": {
          "$ref": "#/$defs/SkuTier",
          "description": "The billing tier of this particular SKU."
        },
        "capacity": {
          "type": "integer",
          "format": "int32",
          "description": "Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of your properties.premiumMessagingPartitions setting. For example, If properties.premiumMessagingPartitions is 1 then possible capacity values are 1, 2, 4, 8, and 16. If properties.premiumMessagingPartitions is 4 then possible capacity values are 4, 8, 16, 32 and 64"
        }
      },
      "required": [
        "name"
      ]
    },
    "SkuName": {
      "type": "string",
      "description": "Name of this SKU.",
      "enum": [
        "Basic",
        "Standard",
        "Premium"
      ],
      "x-ms-enum": {
        "name": "SkuName",
        "modelAsString": false
      }
    },
    "SkuTier": {
      "type": "string",
      "description": "The billing tier of this particular SKU.",
      "enum": [
        "Basic",
        "Standard",
        "Premium"
      ],
      "x-ms-enum": {
        "name": "SkuTier",
        "modelAsString": false
      }
    },
    "TlsVersion": {
      "type": "string",
      "description": "The minimum TLS version for the cluster to support, e.g. '1.3'",
      "enum": [
        "1.0",
        "1.1",
        "1.2",
        "1.3"
      ],
      "x-ms-enum": {
        "name": "TlsVersion",
        "modelAsString": true,
        "values": [
          {
            "name": "1.0",
            "value": "1.0"
          },
          {
            "name": "1.1",
            "value": "1.1"
          },
          {
            "name": "1.2",
            "value": "1.2"
          },
          {
            "name": "1.3",
            "value": "1.3"
          }
        ]
      }
    },
    "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"
          }
        }
      }
    },
    "UserAssignedIdentity": {
      "type": "object",
      "description": "Recognized Dictionary value.",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "Principal Id of user assigned identity",
          "readOnly": true,
          "x-ms-client-name": "PrincipalId"
        },
        "clientId": {
          "type": "string",
          "description": "Client Id of user assigned identity",
          "readOnly": true,
          "x-ms-client-name": "ClientId"
        }
      }
    },
    "UserAssignedIdentityProperties": {
      "type": "object",
      "properties": {
        "userAssignedIdentity": {
          "type": "string",
          "description": "ARM ID of user Identity selected for encryption"
        }
      }
    }
  }
}