Share via


Namespaces - List By Subscription

List namespaces under an Azure subscription.
List all the namespaces under an Azure subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces?api-version=2025-02-15
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces?api-version=2025-02-15&$filter={$filter}&$top={$top}

URI Parameters

Name In Required Type Description
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

Version of the API to be used with the client request.

$filter
query

string

The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'.

$top
query

integer (int32)

The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page.

Responses

Name Type Description
200 OK

NamespacesListResult

OK

Other Status Codes

ErrorResponse

Error response returned if request was unsuccessful.

Examples

Namespaces_ListBySubscription

Sample request

GET https://management.azure.com/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/providers/Microsoft.EventGrid/namespaces?api-version=2025-02-15

Sample response

{
  "value": [
    {
      "properties": {
        "provisioningState": "Succeeded",
        "topicSpacesConfiguration": {
          "state": "Enabled",
          "routeTopicResourceId": "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1",
          "hostname": "exampleNamespaceName1.westus-1.mqtt.eventgrid-int.azure.net"
        }
      },
      "location": "West US",
      "tags": {
        "key1": "value1",
        "key2": "value2",
        "key3": "value3"
      },
      "id": "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/namespaces/exampleNamespaceName1",
      "name": "exampleNamespaceName1",
      "type": "Microsoft.EventGrid/namespaces"
    }
  ],
  "nextLink": "https://xyz.net/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/providers/microsoft.eventgrid/namespaces?2025-02-15&%24skiptoken=7ZjtaqQwFIbvRWp%2f1dHJ6GgHypK1yro707F%2bdOn%2bUxPdMJhIkmqh9N43cYfeg6CE%2bB45mI%2bHlxz9MCh%2bl0dCL8I4fBi%2fo7woc%2bNg%2fJVyEAfbrgZiIda1jKENx4K98QaLzUQoYpOwCJUbiqUt3mrRcDJIwqiwkRt4%2b30VWMAFgeVW%2b8YKdq5v3e99Dzn3bR14W3vgbCQIc2H3pOFMsFZu8Iip7DhBtmQDacQ3PfqoctRrH4ADgLV1rK1nDRyPBE%2b3N%2bKixmQXTB9Mrzb92gRgDtXd3FW6B3WWPGrt49F5fYS%2ffP7SJxf4dZk7pBvYZYVK2ypRZKFSwFEyyV%2b01Co6K7X3PE%2bnPIexigKl4lQnwy7SL%2bxgeIIlDKGcTslrB6cu5SZoJ6dpwziCbqqC8ll1QQtDeqp5k81zbFTPK9rh67znhfSEXkO9DNV0Vl%2b9fz2MYy19pJuHbm%2fUnqlNMu6uEMFKcdEU83NZ%2fAijpyKDx9WSC7fk9wz%2bSY4z0tWWi7alPiGjMjun0Qpy0SAjqEud9ZTUBc5ya53%2fFFcrLh4izBO4Ylw0xrm80YZcWS7%2bG%2fInTOGTrnVWTy7Yk593RsV72HUcd5XEqND%2fShRRmJ2Mz38%3d"
}

Definitions

Name Description
ConnectionState

ConnectionState information.

createdByType

The type of identity that created the resource.

CustomDomainConfiguration

A custom domain configuration that allows users to publish to their own domain name.

CustomDomainIdentity

The identity information for retrieving the certificate for the custom domain.

CustomDomainIdentityType

The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.

CustomDomainValidationState

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.

DynamicRoutingEnrichment
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IdentityInfo

The identity information for the resource.

IdentityType

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.

InboundIpRule
IpActionType

Action to perform based on the match or no match of the IpMask.

Namespace

Namespace resource.

NamespaceProvisioningState

Provisioning state of the namespace resource.

NamespaceSku

Represents available Sku pricing tiers.

NamespacesListResult

Result of the List Namespaces operation.

PersistedConnectionStatus

Status of the connection.

PrivateEndpoint

PrivateEndpoint information.

PrivateEndpointConnection
PublicNetworkAccess

This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainProperties.InboundIpRules" />

ResourceProvisioningState

Provisioning state of the Private Endpoint Connection.

RoutingEnrichments
RoutingIdentityInfo

Routing identity info for topic spaces configuration.

RoutingIdentityType

Routing identity type for topic spaces configuration.

SkuName

The name of the SKU.

StaticStringRoutingEnrichment
systemData

Metadata pertaining to creation and last modification of the resource.

TlsVersion

Minimum TLS version of the publisher allowed to publish to this domain

TopicsConfiguration

Properties of the Topics Configuration.

TopicSpacesConfiguration

Properties of the Topic Spaces Configuration.

TopicSpacesConfigurationState

Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled.

UserIdentityProperties

The information about the user identity.

ConnectionState

ConnectionState information.

Name Type Description
actionsRequired

string

Actions required (if any).

description

string

Description of the connection state.

status

PersistedConnectionStatus

Status of the connection.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

CustomDomainConfiguration

A custom domain configuration that allows users to publish to their own domain name.

Name Type Description
certificateUrl

string

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 versioned 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., https://contosovault.vault.azure.net/certificates/contosocert, we support unversioned certificate URL only (e.g., https://contosovault.vault.azure.net/certificates/contosocert)

expectedTxtRecordName

string

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. The values under this TXT record must contain the expected TXT record value.

expectedTxtRecordValue

string

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.

fullyQualifiedDomainName

string

Fully Qualified Domain Name (FQDN) for the custom domain.

identity

CustomDomainIdentity

Identity info for accessing the certificate for the custom domain. This identity info must match an identity that has been set on the namespace.

validationState

CustomDomainValidationState

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.

CustomDomainIdentity

The identity information for retrieving the certificate for the custom domain.

Name Type Description
type

CustomDomainIdentityType

The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.

userAssignedIdentity

string

The user identity associated with the resource.

CustomDomainIdentityType

The type of managed identity used. Can be either 'SystemAssigned' or 'UserAssigned'.

Value Description
SystemAssigned
UserAssigned

CustomDomainValidationState

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.

Value Description
Pending
Approved
ErrorRetrievingDnsRecord

DynamicRoutingEnrichment

Name Type Description
key

string

Dynamic routing enrichment key.

value

string

Dynamic routing enrichment value.

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

Name Type Description
error

ErrorDetail

The error object.

IdentityInfo

The identity information for the resource.

Name Type Description
principalId

string

The principal ID of resource identity.

tenantId

string

The tenant ID of resource.

type

IdentityType

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.

userAssignedIdentities

<string,  UserIdentityProperties>

The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. This property is currently not used and reserved for future usage.

IdentityType

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.

Value Description
None
SystemAssigned
UserAssigned
SystemAssigned, UserAssigned

InboundIpRule

Name Type Description
action

IpActionType

Action to perform based on the match or no match of the IpMask.

ipMask

string

IP Address in CIDR notation e.g., 10.0.0.0/8.

IpActionType

Action to perform based on the match or no match of the IpMask.

Value Description
Allow

Namespace

Namespace resource.

Name Type Description
id

string

Fully qualified identifier of the resource.

identity

IdentityInfo

Identity information for the Namespace resource.

location

string

Location of the resource.

name

string

Name of the resource.

properties.inboundIpRules

InboundIpRule[]

This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.

properties.isZoneRedundant

boolean

This is an optional property and it allows the user to specify if the namespace resource supports zone-redundancy capability or not. If this property is not specified explicitly by the user, its default value depends on the following conditions: a. For Availability Zones enabled regions - The default property value would be true. b. For non-Availability Zones enabled regions - The default property value would be false. Once specified, this property cannot be updated.

properties.minimumTlsVersionAllowed

TlsVersion

Minimum TLS version of the publisher allowed to publish to this namespace. Only TLS version 1.2 is supported.

properties.privateEndpointConnections

PrivateEndpointConnection[]

List of private endpoint connections.

properties.provisioningState

NamespaceProvisioningState

Provisioning state of the namespace resource.

properties.publicNetworkAccess

PublicNetworkAccess

This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" />

properties.topicSpacesConfiguration

TopicSpacesConfiguration

Topic spaces configuration information for the namespace resource

properties.topicsConfiguration

TopicsConfiguration

Topics configuration information for the namespace resource

sku

NamespaceSku

Represents available Sku pricing tiers.

systemData

systemData

The system metadata relating to the Event Grid resource.

tags

object

Tags of the resource.

type

string

Type of the resource.

NamespaceProvisioningState

Provisioning state of the namespace resource.

Value Description
Creating
Updating
Deleting
Succeeded
Canceled
Failed
Deleted
DeleteFailed
CreateFailed
UpdatedFailed

NamespaceSku

Represents available Sku pricing tiers.

Name Type Description
capacity

integer (int32)

Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value is 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. Min capacity is 1 and max allowed capacity is 20.

name

SkuName

The name of the SKU.

NamespacesListResult

Result of the List Namespaces operation.

Name Type Description
nextLink

string

A link for the next page of namespaces.

value

Namespace[]

A collection of namespaces.

PersistedConnectionStatus

Status of the connection.

Value Description
Pending
Approved
Rejected
Disconnected

PrivateEndpoint

PrivateEndpoint information.

Name Type Description
id

string

The ARM identifier for Private Endpoint.

PrivateEndpointConnection

Name Type Description
id

string

Fully qualified identifier of the resource.

name

string

Name of the resource.

properties.groupIds

string[]

GroupIds from the private link service resource.

properties.privateEndpoint

PrivateEndpoint

The Private Endpoint resource for this Connection.

properties.privateLinkServiceConnectionState

ConnectionState

Details about the state of the connection.

properties.provisioningState

ResourceProvisioningState

Provisioning state of the Private Endpoint Connection.

type

string

Type of the resource.

PublicNetworkAccess

This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainProperties.InboundIpRules" />

Value Description
Enabled
Disabled

ResourceProvisioningState

Provisioning state of the Private Endpoint Connection.

Value Description
Creating
Updating
Deleting
Succeeded
Canceled
Failed

RoutingEnrichments

Name Type Description
dynamic

DynamicRoutingEnrichment[]

static StaticRoutingEnrichment[]:

StaticStringRoutingEnrichment[]

Static routing enrichment details.

RoutingIdentityInfo

Routing identity info for topic spaces configuration.

Name Type Description
type

RoutingIdentityType

Routing identity type for topic spaces configuration.

userAssignedIdentity

string

RoutingIdentityType

Routing identity type for topic spaces configuration.

Value Description
None
SystemAssigned
UserAssigned

SkuName

The name of the SKU.

Value Description
Standard

StaticStringRoutingEnrichment

Name Type Description
key

string

Static routing enrichment key.

value

string

String type routing enrichment value.

valueType string:

String

Static routing enrichment value type. For e.g. this property value can be 'String'.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

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 (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TlsVersion

Minimum TLS version of the publisher allowed to publish to this domain

Value Description
1.0
1.1
1.2

TopicsConfiguration

Properties of the Topics Configuration.

Name Type Description
customDomains

CustomDomainConfiguration[]

List of custom domain configurations for the namespace.

hostname

string

The hostname for the topics configuration. This is a read-only property.

TopicSpacesConfiguration

Properties of the Topic Spaces Configuration.

Name Type Default value Description
customDomains

CustomDomainConfiguration[]

List of custom domain configurations for the namespace.

hostname

string

The endpoint for the topic spaces configuration. This is a read-only property.

maximumClientSessionsPerAuthenticationName

integer (int32)

The maximum number of sessions per authentication name. The property default value is 1. Min allowed value is 1 and max allowed value is 100.

maximumSessionExpiryInHours

integer (int32)

The maximum session expiry in hours. The property default value is 1 hour. Min allowed value is 1 hour and max allowed value is 8 hours.

routeTopicResourceId

string

Fully qualified Azure Resource Id for the Event Grid Topic to which events will be routed to from TopicSpaces under a namespace. This property should be in the following format '/subscriptions/{subId}/resourcegroups/{resourceGroupName}/providers/microsoft.EventGrid/topics/{topicName}'. This topic should reside in the same region where namespace is located.

routingEnrichments

RoutingEnrichments

Routing enrichments for topic spaces configuration

routingIdentityInfo

RoutingIdentityInfo

Routing identity info for topic spaces configuration.

state

TopicSpacesConfigurationState

Disabled

Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled.

TopicSpacesConfigurationState

Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled.

Value Description
Disabled
Enabled

UserIdentityProperties

The information about the user identity.

Name Type Description
clientId

string

The client id of user assigned identity.

principalId

string

The principal id of user assigned identity.