Namespaces - Create Or Update
Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}?api-version=2024-01-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
namespace
|
path | True |
string |
The namespace name. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string |
Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| parameters |
Parameters supplied to create a namespace resource. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Namespace created successfully. |
|
| 201 Created |
Namespace create request accepted. |
|
| 202 Accepted |
Namespace create or update request accepted. |
|
| Other Status Codes |
ServiceBus error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
NameSpaceCreate
Sample request
PUT https://management.azure.com/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace2924?api-version=2024-01-01
{
"sku": {
"name": "Premium",
"tier": "Premium",
"capacity": 4
},
"location": "South Central US",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"properties": {
"premiumMessagingPartitions": 2
}
}
Sample response
{
"sku": {
"name": "Premium",
"tier": "Premium",
"capacity": 4
},
"id": "/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924",
"name": "sdk-Namespace-2924",
"type": "Microsoft.ServiceBus/Namespaces",
"location": "South Central US",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"properties": {
"provisioningState": "Created",
"metricId": "5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924",
"createdAt": "2017-05-25T22:26:36.76Z",
"updatedAt": "2017-05-25T22:26:36.76Z",
"serviceBusEndpoint": "https://sdk-Namespace-2924.servicebus.windows-int.net:443/",
"minimumTlsVersion": "1.2",
"premiumMessagingPartitions": 2
}
}
{
"sku": {
"name": "Premium",
"tier": "Premium",
"capacity": 4
},
"id": "/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924",
"name": "sdk-Namespace-2924",
"type": "Microsoft.ServiceBus/Namespaces",
"location": "South Central US",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"properties": {
"provisioningState": "Created",
"metricId": "5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924",
"createdAt": "2017-05-25T22:26:36.76Z",
"updatedAt": "2017-05-25T22:26:36.76Z",
"serviceBusEndpoint": "https://sdk-Namespace-2924.servicebus.windows-int.net:443/",
"disableLocalAuth": false,
"minimumTlsVersion": "1.2",
"premiumMessagingPartitions": 2
}
}
Definitions
| Name | Description |
|---|---|
|
Connection |
Details about the state of the connection. |
|
created |
The type of identity that created the resource. |
|
End |
Provisioning state of the Private Endpoint Connection. |
| Error |
The error object. |
|
Error |
The resource management error additional info. |
|
Error |
The resource management error response. |
|
key |
Enumerates the possible value of keySource for Encryption |
|
Key |
Properties of KeyVault |
|
Managed |
Type of managed service identity. |
|
Private |
The Private Endpoint resource for this Connection. |
|
Private |
List of private endpoint connections. |
|
Private |
Status of the connection. |
|
Public |
This determines if traffic is allowed over public network. By default it is enabled. |
| SBNamespace |
Description of a namespace resource. |
| SBSku |
Properties of SKU |
|
Sku |
Name of this SKU. |
|
Sku |
The billing tier of this particular SKU. |
|
system |
The system meta data relating to this resource. |
|
Tls |
The minimum TLS version for the cluster to support, e.g. '1.2' |
|
User |
Recognized Dictionary value. |
ConnectionState
Details about the state of the connection.
| Name | Type | Description |
|---|---|---|
| description |
string |
Description of the connection state. |
| status |
Status of the connection. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
EndPointProvisioningState
Provisioning state of the Private Endpoint Connection.
| Value | Description |
|---|---|
| Creating | |
| Updating | |
| Deleting | |
| Succeeded | |
| Canceled | |
| Failed |
Error
The error object.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorResponse
The resource management error response.
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
keySource
Enumerates the possible value of keySource for Encryption
| Value | Description |
|---|---|
| Microsoft.KeyVault |
KeyVaultProperties
Properties of KeyVault
| Name | Type | Description |
|---|---|---|
| identity.userAssignedIdentity |
string |
ARM ID of user Identity selected for encryption |
| keyName |
string |
Name of the Key from KeyVault |
| keyVaultUri |
string |
Uri of KeyVault |
| keyVersion |
string |
Version of KeyVault |
ManagedServiceIdentityType
Type of managed service identity.
| Value | Description |
|---|---|
| SystemAssigned | |
| UserAssigned | |
| SystemAssigned, UserAssigned | |
| None |
PrivateEndpoint
The Private Endpoint resource for this Connection.
| Name | Type | Description |
|---|---|---|
| id |
string |
The ARM identifier for Private Endpoint. |
PrivateEndpointConnection
List of private endpoint connections.
| Name | Type | Description |
|---|---|---|
| id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| location |
string |
The geo-location where the resource lives |
| name |
string |
The name of the resource |
| properties.privateEndpoint |
The Private Endpoint resource for this Connection. |
|
| properties.privateLinkServiceConnectionState |
Details about the state of the connection. |
|
| properties.provisioningState |
Provisioning state of the Private Endpoint Connection. |
|
| systemData |
The system meta data relating to this resource. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" |
PrivateLinkConnectionStatus
Status of the connection.
| Value | Description |
|---|---|
| Pending | |
| Approved | |
| Rejected | |
| Disconnected |
PublicNetworkAccess
This determines if traffic is allowed over public network. By default it is enabled.
| Value | Description |
|---|---|
| Enabled | |
| Disabled | |
| SecuredByPerimeter |
SBNamespace
Description of a namespace resource.
| Name | Type | Default value | Description |
|---|---|---|---|
| id |
string |
Resource Id |
|
| identity.principalId |
string |
ObjectId from the KeyVault |
|
| identity.tenantId |
string |
TenantId from the KeyVault |
|
| identity.type |
Type of managed service identity. |
||
| identity.userAssignedIdentities |
<string,
User |
Properties for User Assigned Identities |
|
| location |
string |
The Geo-location where the resource lives |
|
| name |
string |
Resource name |
|
| properties.alternateName |
string |
Alternate name for namespace |
|
| properties.createdAt |
string (date-time) |
The time the namespace was created |
|
| properties.disableLocalAuth |
boolean |
This property disables SAS authentication for the Service Bus namespace. |
|
| properties.encryption.keySource | Microsoft.KeyVault |
Enumerates the possible value of keySource for Encryption |
|
| properties.encryption.keyVaultProperties |
Properties of KeyVault |
||
| properties.encryption.requireInfrastructureEncryption |
boolean |
Enable Infrastructure Encryption (Double Encryption) |
|
| properties.metricId |
string |
Identifier for Azure Insights metrics |
|
| properties.minimumTlsVersion |
The minimum TLS version for the cluster to support, e.g. '1.2' |
||
| properties.premiumMessagingPartitions |
integer (int32) |
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 |
|
| properties.privateEndpointConnections |
List of private endpoint connections. |
||
| properties.provisioningState |
string |
Provisioning state of the namespace. |
|
| properties.publicNetworkAccess | Enabled |
This determines if traffic is allowed over public network. By default it is enabled. |
|
| properties.serviceBusEndpoint |
string |
Endpoint you can use to perform Service Bus operations. |
|
| properties.status |
string |
Status of the namespace. |
|
| properties.updatedAt |
string (date-time) |
The time the namespace was updated. |
|
| properties.zoneRedundant |
boolean |
This property reflects if zone redundancy has been enabled for namespaces in regions that support availability zones. |
|
| sku |
Properties of SKU |
||
| systemData |
The system meta data relating to this resource. |
||
| tags |
object |
Resource tags |
|
| type |
string |
Resource type |
SBSku
Properties of SKU
| Name | Type | Description |
|---|---|---|
| capacity |
integer (int32) |
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 |
| name |
Name of this SKU. |
|
| tier |
The billing tier of this particular SKU. |
SkuName
Name of this SKU.
| Value | Description |
|---|---|
| Basic | |
| Standard | |
| Premium |
SkuTier
The billing tier of this particular SKU.
| Value | Description |
|---|---|
| Basic | |
| Standard | |
| Premium |
systemData
The system meta data relating to this resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The type of identity that last modified the resource. |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
TlsVersion
The minimum TLS version for the cluster to support, e.g. '1.2'
| Value | Description |
|---|---|
| 1.0 | |
| 1.1 | |
| 1.2 |
UserAssignedIdentity
Recognized Dictionary value.
| Name | Type | Description |
|---|---|---|
| clientId |
string |
Client Id of user assigned identity |
| principalId |
string |
Principal Id of user assigned identity |