Namespaces - Create Or Update

Creates or updates a 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.EventHub/namespaces/{namespaceName}?api-version=2024-01-01

URI Parameters

Name In Required Type Description
namespaceName
path True

string

The Namespace name

Regex pattern: ^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$

resourceGroupName
path True

string

Name of the resource group within the azure subscription.

subscriptionId
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

Client API Version.

Request Body

Name Type Description
parameters

EHNamespace

Parameters for creating a namespace resource.

Responses

Name Type Description
200 OK

EHNamespace

Namespace successfully created.

201 Created

EHNamespace

Namespace create request accepted.

202 Accepted

Namespace create or update request accepted.

Other Status Codes

ErrorResponse

Eventhub 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/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample?api-version=2024-01-01

{
  "location": "East US",
  "identity": {
    "type": "SystemAssigned, UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": {},
      "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": {}
    }
  },
  "properties": {
    "encryption": {
      "keyVaultProperties": [
        {
          "keyName": "Samplekey",
          "keyVaultUri": "https://aprao-keyvault-user.vault-int.azure-int.net/",
          "identity": {
            "userAssignedIdentity": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"
          }
        }
      ],
      "keySource": "Microsoft.KeyVault"
    },
    "clusterArmId": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test"
  }
}

Sample response

{
  "sku": {
    "name": "Standard",
    "tier": "Standard",
    "capacity": 1
  },
  "id": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample",
  "name": "NamespaceSample",
  "type": "Microsoft.EventHub/Namespaces",
  "location": "East US",
  "tags": {},
  "identity": {
    "principalId": "PrincipalIdGUID",
    "tenantId": "TenantIdGUID",
    "type": "SystemAssigned, UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": {
        "clientId": "ClientIdGUID",
        "principalId": "PrincipalIdGUID"
      },
      "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": {
        "clientId": "6a35400f-6ccb-4817-8f1a-ce19ea4523bc",
        "principalId": "ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"
      }
    }
  },
  "properties": {
    "zoneRedundant": false,
    "isAutoInflateEnabled": false,
    "disableLocalAuth": false,
    "maximumThroughputUnits": 0,
    "minimumTlsVersion": "1.2",
    "encryption": {
      "keySource": "Microsoft.KeyVault",
      "keyVaultProperties": [
        {
          "keyName": "Samplekey",
          "keyVaultUri": "https://sample-keyvault-user.vault-int.azure-int.net",
          "keyVersion": "",
          "identity": {
            "userAssignedIdentity": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"
          }
        }
      ],
      "requireInfrastructureEncryption": false
    },
    "clusterArmId": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test",
    "kafkaEnabled": false,
    "provisioningState": "Succeeded",
    "metricId": "MetricGUID:NamespaceSample",
    "createdAt": "2021-02-16T22:36:06.107Z",
    "updatedAt": "2021-02-16T22:37:42.29Z",
    "serviceBusEndpoint": "https://NamespaceSample.servicebus.windows-int.net:443/"
  }
}
{
  "sku": {
    "name": "Standard",
    "tier": "Standard",
    "capacity": 1
  },
  "id": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample",
  "name": "NamespaceSample",
  "type": "Microsoft.EventHub/Namespaces",
  "location": "East US",
  "tags": {},
  "identity": {
    "principalId": "PrincipalIdGUID",
    "tenantId": "TenantIdGUID",
    "type": "SystemAssigned, UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": {
        "clientId": "ClientIdGUID",
        "principalId": "PrincipalIdGUID"
      },
      "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": {
        "clientId": "6a35400f-6ccb-4817-8f1a-ce19ea4523bc",
        "principalId": "ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"
      }
    }
  },
  "properties": {
    "zoneRedundant": false,
    "isAutoInflateEnabled": false,
    "disableLocalAuth": false,
    "maximumThroughputUnits": 0,
    "encryption": {
      "keySource": "Microsoft.KeyVault",
      "keyVaultProperties": [
        {
          "keyName": "Samplekey",
          "keyVaultUri": "https://sample-keyvault-user.vault-int.azure-int.net",
          "keyVersion": "",
          "identity": {
            "userAssignedIdentity": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"
          }
        }
      ],
      "requireInfrastructureEncryption": false
    },
    "clusterArmId": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test",
    "kafkaEnabled": false,
    "provisioningState": "Succeeded",
    "metricId": "MetricGUID:NamespaceSample",
    "createdAt": "2021-02-16T22:36:06.107Z",
    "updatedAt": "2021-02-16T22:37:42.29Z",
    "serviceBusEndpoint": "https://NamespaceSample.servicebus.windows-int.net:443/"
  }
}

Definitions

Name Description
ConnectionState

Details about the state of the connection.

createdByType

The type of identity that created the resource.

EHNamespace

Single Namespace item in List or Get Operation

EndPointProvisioningState

Provisioning state of the Private Endpoint Connection.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message.

keySource

Enumerates the possible value of keySource for Encryption

KeyVaultProperties

Properties of KeyVault

ManagedServiceIdentityType

Type of managed service identity.

PrivateEndpoint

The Private Endpoint resource for this Connection.

PrivateEndpointConnection

List of private endpoint connections.

PrivateLinkConnectionStatus

Status of the connection.

PublicNetworkAccess

This determines if traffic is allowed over public network. By default it is enabled.

Sku

Properties of sku resource

SkuName

Name of this SKU.

SkuTier

The billing tier of this particular SKU.

systemData

Metadata pertaining to creation and last modification of the resource.

TlsVersion

The minimum TLS version for the cluster to support, e.g. '1.2'

UserAssignedIdentity

Recognized Dictionary value.

ConnectionState

Details about the state of the connection.

Name Type Description
description

string

Description of the connection state.

status

PrivateLinkConnectionStatus

Status of the connection.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

EHNamespace

Single Namespace item in List or Get Operation

Name Type Default value Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity.principalId

string

ObjectId from the KeyVault

identity.tenantId

string

TenantId from the KeyVault

identity.type

ManagedServiceIdentityType

Type of managed service identity.

identity.userAssignedIdentities

<string,  UserAssignedIdentity>

Properties for User Assigned Identities

location

string

Resource location.

name

string

The name of the resource

properties.alternateName

string

Alternate name specified when alias and namespace names are same.

properties.clusterArmId

string

Cluster ARM ID of the Namespace.

properties.createdAt

string

The time the Namespace was created.

properties.disableLocalAuth

boolean

This property disables SAS authentication for the Event Hubs namespace.

properties.encryption.keySource

keySource

Microsoft.KeyVault

Enumerates the possible value of keySource for Encryption

properties.encryption.keyVaultProperties

KeyVaultProperties[]

Properties of KeyVault

properties.encryption.requireInfrastructureEncryption

boolean

Enable Infrastructure Encryption (Double Encryption)

properties.isAutoInflateEnabled

boolean

Value that indicates whether AutoInflate is enabled for eventhub namespace.

properties.kafkaEnabled

boolean

Value that indicates whether Kafka is enabled for eventhub namespace.

properties.maximumThroughputUnits

integer

Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true)

properties.metricId

string

Identifier for Azure Insights metrics.

properties.minimumTlsVersion

TlsVersion

The minimum TLS version for the cluster to support, e.g. '1.2'

properties.privateEndpointConnections

PrivateEndpointConnection[]

List of private endpoint connections.

properties.provisioningState

string

Provisioning state of the Namespace.

properties.publicNetworkAccess

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

The time the Namespace was updated.

properties.zoneRedundant

boolean

Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.

sku

Sku

Properties of sku resource

systemData

systemData

The system meta data relating to this resource.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

EndPointProvisioningState

Provisioning state of the Private Endpoint Connection.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
error

ErrorDetail

The error object.

keySource

Enumerates the possible value of keySource for Encryption

Name Type Description
Microsoft.KeyVault

string

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

Key Version

ManagedServiceIdentityType

Type of managed service identity.

Name Type Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

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

PrivateEndpoint

The Private Endpoint resource for this Connection.

properties.privateLinkServiceConnectionState

ConnectionState

Details about the state of the connection.

properties.provisioningState

EndPointProvisioningState

Provisioning state of the Private Endpoint Connection.

systemData

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.

Name Type Description
Approved

string

Disconnected

string

Pending

string

Rejected

string

PublicNetworkAccess

This determines if traffic is allowed over public network. By default it is enabled.

Name Type Description
Disabled

string

Enabled

string

SecuredByPerimeter

string

Sku

Properties of sku resource

Name Type Description
capacity

integer

The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.

name

SkuName

Name of this SKU.

tier

SkuTier

The billing tier of this particular SKU.

SkuName

Name of this SKU.

Name Type Description
Basic

string

Premium

string

Standard

string

SkuTier

The billing tier of this particular SKU.

Name Type Description
Basic

string

Premium

string

Standard

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The type of identity that last modified the resource.

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TlsVersion

The minimum TLS version for the cluster to support, e.g. '1.2'

Name Type Description
1.0

string

1.1

string

1.2

string

UserAssignedIdentity

Recognized Dictionary value.

Name Type Description
clientId

string

Client Id of user assigned identity

principalId

string

Principal Id of user assigned identity