Topics - List By Resource Group

List topics under a resource group.
List all the topics under a resource group.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics?api-version=2022-06-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics?api-version=2022-06-15&$filter={$filter}&$top={$top}

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group within the user's 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

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

TopicsListResult

OK

Other Status Codes

*** Error Responses: ***

  • 400 Bad Request.

  • 500 Internal Server Error.

Examples

Topics_ListByResourceGroup

Sample Request

GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics?api-version=2022-06-15

Sample Response

{
  "value": [
    {
      "properties": {
        "endpoint": "https://exampletopic1.westus2-1.eventgrid.azure.net/api/events",
        "provisioningState": "Succeeded"
      },
      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1",
      "location": "westus2",
      "name": "exampletopic1",
      "tags": {
        "tag1": "value1",
        "tag2": "value2"
      },
      "type": "Microsoft.EventGrid/topics"
    },
    {
      "properties": {
        "endpoint": "https://exampletopic2.westcentralus-1.eventgrid.azure.net/api/events",
        "provisioningState": "Succeeded"
      },
      "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
      "location": "westcentralus",
      "name": "exampletopic2",
      "tags": {
        "tag1": "value1",
        "tag2": "value2"
      },
      "type": "Microsoft.EventGrid/topics"
    }
  ]
}

Definitions

Name Description
ConnectionState

ConnectionState information.

createdByType

The type of identity that created the resource.

DataResidencyBoundary

Data Residency Boundary of the resource.

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
InputSchema

This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource.

IpActionType

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

JsonField

This is used to express the source of an input schema mapping for a single target field in the Event Grid Event schema. This is currently used in the mappings for the 'id', 'topic' and 'eventtime' properties. This represents a field in the input event schema.

JsonFieldWithDefault

This is used to express the source of an input schema mapping for a single target field in the Event Grid Event schema. This is currently used in the mappings for the 'subject', 'eventtype' and 'dataversion' properties. This represents a field in the input event schema along with a default value to be used, and at least one of these two properties should be provided.

JsonInputSchemaMapping

This enables publishing to Event Grid using a custom input schema. This can be used to map properties from a custom input JSON schema to the Event Grid event schema.

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

ResourceProvisioningState

Provisioning state of the Private Endpoint Connection.

systemData

Metadata pertaining to creation and last modification of the resource.

Topic

EventGrid Topic

TopicProvisioningState

Provisioning state of the topic.

TopicsListResult

Result of the List Topics operation

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.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DataResidencyBoundary

Data Residency Boundary of the resource.

Name Type Description
WithinGeopair

string

WithinRegion

string

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.

Name Type Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

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.

InputSchema

This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource.

Name Type Description
CloudEventSchemaV1_0

string

CustomEventSchema

string

EventGridSchema

string

IpActionType

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

Name Type Description
Allow

string

JsonField

This is used to express the source of an input schema mapping for a single target field in the Event Grid Event schema. This is currently used in the mappings for the 'id', 'topic' and 'eventtime' properties. This represents a field in the input event schema.

Name Type Description
sourceField

string

Name of a field in the input event schema that's to be used as the source of a mapping.

JsonFieldWithDefault

This is used to express the source of an input schema mapping for a single target field in the Event Grid Event schema. This is currently used in the mappings for the 'subject', 'eventtype' and 'dataversion' properties. This represents a field in the input event schema along with a default value to be used, and at least one of these two properties should be provided.

Name Type Description
defaultValue

string

The default value to be used for mapping when a SourceField is not provided or if there's no property with the specified name in the published JSON event payload.

sourceField

string

Name of a field in the input event schema that's to be used as the source of a mapping.

JsonInputSchemaMapping

This enables publishing to Event Grid using a custom input schema. This can be used to map properties from a custom input JSON schema to the Event Grid event schema.

Name Type Description
inputSchemaMappingType string:

Json

Type of the custom mapping

properties.dataVersion

JsonFieldWithDefault

The mapping information for the DataVersion property of the Event Grid Event.

properties.eventTime

JsonField

The mapping information for the EventTime property of the Event Grid Event.

properties.eventType

JsonFieldWithDefault

The mapping information for the EventType property of the Event Grid Event.

properties.id

JsonField

The mapping information for the Id property of the Event Grid Event.

properties.subject

JsonFieldWithDefault

The mapping information for the Subject property of the Event Grid Event.

properties.topic

JsonField

The mapping information for the Topic property of the Event Grid Event.

PersistedConnectionStatus

Status of the connection.

Name Type Description
Approved

string

Disconnected

string

Pending

string

Rejected

string

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

Name Type Description
Disabled

string

Enabled

string

ResourceProvisioningState

Provisioning state of the Private Endpoint Connection.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

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 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.

Topic

EventGrid Topic

Name Type Default Value Description
id

string

Fully qualified identifier of the resource.

identity

IdentityInfo

Identity information for the resource.

location

string

Location of the resource.

name

string

Name of the resource.

properties.dataResidencyBoundary

DataResidencyBoundary

Data Residency Boundary of the resource.

properties.disableLocalAuth

boolean

False

This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.

properties.endpoint

string

Endpoint for the topic.

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.inputSchema

InputSchema

EventGridSchema

This determines the format that Event Grid should expect for incoming events published to the topic.

properties.inputSchemaMapping InputSchemaMapping:

JsonInputSchemaMapping

This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema.

properties.metricResourceId

string

Metric resource id for the topic.

properties.privateEndpointConnections

PrivateEndpointConnection[]

properties.provisioningState

TopicProvisioningState

Provisioning state of the topic.

properties.publicNetworkAccess

PublicNetworkAccess

Enabled

This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring

systemData

systemData

The system metadata relating to Topic resource.

tags

object

Tags of the resource.

type

string

Type of the resource.

TopicProvisioningState

Provisioning state of the topic.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

TopicsListResult

Result of the List Topics operation

Name Type Description
nextLink

string

A link for the next page of topics

value

Topic[]

A collection of Topics

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.