topics
Creates, updates, deletes, gets or lists a topics resource.
Overview
| Name | topics |
| Type | Resource |
| Id | azure.event_grid.topics |
Fields
The following fields are returned by SELECT queries:
- list_event_types
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | Description of the event type. |
displayName | string | Display name of the event type. |
isInDefaultSet | boolean | IsInDefaultSet flag of the event type. |
schemaUrl | string | URL of the schema for this event type. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
dataResidencyBoundary | string | Data Residency Boundary of the resource. Known values are: "WithinGeopair" and "WithinRegion". (WithinGeopair, WithinRegion) |
disableLocalAuth | boolean | This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. |
encryption | object | Key encryption configuration properties of the topic resource. This is an optional property. When not specified, no key encryption is used. |
endpoint | string | Endpoint for the topic. |
eventTypeInfo | object | Event Type Information for the user topic. This information is provided by the publisher and can be used by the subscriber to view different types of events that are published. |
extendedLocation | object | Extended location of the resource. |
identity | object | Identity information for the resource. |
inboundIpRules | array | This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. |
inputSchema | string | This determines the format that Event Grid should expect for incoming events published to the topic. Known values are: "EventGridSchema", "CustomEventSchema", and "CloudEventSchemaV1_0". (EventGridSchema, CustomEventSchema, CloudEventSchemaV1_0) |
inputSchemaMapping | object | 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. |
kind | string | Kind of the resource. Known values are: "Azure" and "AzureArc". (Azure, AzureArc) |
location | string | The geo-location where the resource lives. Required. |
metricResourceId | string | Metric resource id for the topic. |
minimumTlsVersionAllowed | string | Minimum TLS version of the publisher allowed to publish to this topic. Known values are: "1.0", "1.1", and "1.2". (1.0, 1.1, 1.2) |
platformCapabilities | object | Represents the platform capabilities of the resource, including Azure Confidential Compute related properties. |
privateEndpointConnections | array | List of private endpoint connections. |
provisioningState | string | Provisioning state of the topic. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". (Creating, Updating, Deleting, Succeeded, Canceled, Failed) |
publicNetworkAccess | string | This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring . Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". (Enabled, Disabled, SecuredByPerimeter) |
sku | object | The Sku pricing tier for the topic. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
dataResidencyBoundary | string | Data Residency Boundary of the resource. Known values are: "WithinGeopair" and "WithinRegion". (WithinGeopair, WithinRegion) |
disableLocalAuth | boolean | This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. |
encryption | object | Key encryption configuration properties of the topic resource. This is an optional property. When not specified, no key encryption is used. |
endpoint | string | Endpoint for the topic. |
eventTypeInfo | object | Event Type Information for the user topic. This information is provided by the publisher and can be used by the subscriber to view different types of events that are published. |
extendedLocation | object | Extended location of the resource. |
identity | object | Identity information for the resource. |
inboundIpRules | array | This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. |
inputSchema | string | This determines the format that Event Grid should expect for incoming events published to the topic. Known values are: "EventGridSchema", "CustomEventSchema", and "CloudEventSchemaV1_0". (EventGridSchema, CustomEventSchema, CloudEventSchemaV1_0) |
inputSchemaMapping | object | 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. |
kind | string | Kind of the resource. Known values are: "Azure" and "AzureArc". (Azure, AzureArc) |
location | string | The geo-location where the resource lives. Required. |
metricResourceId | string | Metric resource id for the topic. |
minimumTlsVersionAllowed | string | Minimum TLS version of the publisher allowed to publish to this topic. Known values are: "1.0", "1.1", and "1.2". (1.0, 1.1, 1.2) |
platformCapabilities | object | Represents the platform capabilities of the resource, including Azure Confidential Compute related properties. |
privateEndpointConnections | array | List of private endpoint connections. |
provisioningState | string | Provisioning state of the topic. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". (Creating, Updating, Deleting, Succeeded, Canceled, Failed) |
publicNetworkAccess | string | This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring . Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". (Enabled, Disabled, SecuredByPerimeter) |
sku | object | The Sku pricing tier for the topic. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
dataResidencyBoundary | string | Data Residency Boundary of the resource. Known values are: "WithinGeopair" and "WithinRegion". (WithinGeopair, WithinRegion) |
disableLocalAuth | boolean | This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only Microsoft Entra ID token will be used to authenticate if user is allowed to publish to the topic. |
encryption | object | Key encryption configuration properties of the topic resource. This is an optional property. When not specified, no key encryption is used. |
endpoint | string | Endpoint for the topic. |
eventTypeInfo | object | Event Type Information for the user topic. This information is provided by the publisher and can be used by the subscriber to view different types of events that are published. |
extendedLocation | object | Extended location of the resource. |
identity | object | Identity information for the resource. |
inboundIpRules | array | This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. |
inputSchema | string | This determines the format that Event Grid should expect for incoming events published to the topic. Known values are: "EventGridSchema", "CustomEventSchema", and "CloudEventSchemaV1_0". (EventGridSchema, CustomEventSchema, CloudEventSchemaV1_0) |
inputSchemaMapping | object | 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. |
kind | string | Kind of the resource. Known values are: "Azure" and "AzureArc". (Azure, AzureArc) |
location | string | The geo-location where the resource lives. Required. |
metricResourceId | string | Metric resource id for the topic. |
minimumTlsVersionAllowed | string | Minimum TLS version of the publisher allowed to publish to this topic. Known values are: "1.0", "1.1", and "1.2". (1.0, 1.1, 1.2) |
platformCapabilities | object | Represents the platform capabilities of the resource, including Azure Confidential Compute related properties. |
privateEndpointConnections | array | List of private endpoint connections. |
provisioningState | string | Provisioning state of the topic. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". (Creating, Updating, Deleting, Succeeded, Canceled, Failed) |
publicNetworkAccess | string | This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring . Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". (Enabled, Disabled, SecuredByPerimeter) |
sku | object | The Sku pricing tier for the topic. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_event_types | select | resource_group_name, provider_namespace, resource_type_name, resource_name, subscription_id | List topic event types. List event types for a topic. | |
get | select | resource_group_name, topic_name, subscription_id | Get a topic. Get properties of a topic. | |
list_by_resource_group | select | resource_group_name, subscription_id | $filter, $top | List topics under a resource group. List all the topics under a resource group. |
list_by_subscription | select | subscription_id | $filter, $top | List topics under an Azure subscription. List all the topics under an Azure subscription. |
create_or_update | insert | resource_group_name, topic_name, subscription_id, location | Create a topic. Asynchronously creates a new topic with the specified parameters. | |
update | update | resource_group_name, topic_name, subscription_id | Update a topic. Asynchronously updates a topic with the specified parameters. | |
create_or_update | replace | resource_group_name, topic_name, subscription_id, location | Create a topic. Asynchronously creates a new topic with the specified parameters. | |
delete | delete | resource_group_name, topic_name, subscription_id | Delete a topic. Delete existing topic. | |
list_shared_access_keys | exec | resource_group_name, topic_name, subscription_id | List keys for a topic. List the two keys used to publish to a topic. | |
regenerate_key | exec | resource_group_name, topic_name, subscription_id, keyName | Regenerate key for a topic. Regenerate a shared access key for a topic. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
provider_namespace | string | the provider namespace. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
resource_name | string | Name of the topic. Required. |
resource_type_name | string | Name of the topic type. Required. |
subscription_id | string | |
topic_name | string | Name of the topic. Required. |
$filter | 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'. Default value is None. |
$top | integer | 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. Default value is None. |
SELECT examples
- list_event_types
- get
- list_by_resource_group
- list_by_subscription
List topic event types. List event types for a topic.
SELECT
id,
name,
description,
displayName,
isInDefaultSet,
schemaUrl,
systemData,
type
FROM azure.event_grid.topics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND provider_namespace = '{{ provider_namespace }}' -- required
AND resource_type_name = '{{ resource_type_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get a topic. Get properties of a topic.
SELECT
id,
name,
dataResidencyBoundary,
disableLocalAuth,
encryption,
endpoint,
eventTypeInfo,
extendedLocation,
identity,
inboundIpRules,
inputSchema,
inputSchemaMapping,
kind,
location,
metricResourceId,
minimumTlsVersionAllowed,
platformCapabilities,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
sku,
systemData,
tags,
type
FROM azure.event_grid.topics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND topic_name = '{{ topic_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List topics under a resource group. List all the topics under a resource group.
SELECT
id,
name,
dataResidencyBoundary,
disableLocalAuth,
encryption,
endpoint,
eventTypeInfo,
extendedLocation,
identity,
inboundIpRules,
inputSchema,
inputSchemaMapping,
kind,
location,
metricResourceId,
minimumTlsVersionAllowed,
platformCapabilities,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
sku,
systemData,
tags,
type
FROM azure.event_grid.topics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
;
List topics under an Azure subscription. List all the topics under an Azure subscription.
SELECT
id,
name,
dataResidencyBoundary,
disableLocalAuth,
encryption,
endpoint,
eventTypeInfo,
extendedLocation,
identity,
inboundIpRules,
inputSchema,
inputSchemaMapping,
kind,
location,
metricResourceId,
minimumTlsVersionAllowed,
platformCapabilities,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
sku,
systemData,
tags,
type
FROM azure.event_grid.topics
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
;
INSERT examples
- create_or_update
- Manifest
Create a topic. Asynchronously creates a new topic with the specified parameters.
INSERT INTO azure.event_grid.topics (
tags,
location,
properties,
sku,
identity,
kind,
extendedLocation,
resource_group_name,
topic_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ sku }}',
'{{ identity }}',
'{{ kind }}',
'{{ extendedLocation }}',
'{{ resource_group_name }}',
'{{ topic_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: topics
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the topics resource.
- name: topic_name
value: "{{ topic_name }}"
description: Required parameter for the topics resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the topics resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Properties of the topic.
value:
privateEndpointConnections:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
systemData:
createdBy: "{{ createdBy }}"
createdByType: "{{ createdByType }}"
createdAt: "{{ createdAt }}"
lastModifiedBy: "{{ lastModifiedBy }}"
lastModifiedByType: "{{ lastModifiedByType }}"
lastModifiedAt: "{{ lastModifiedAt }}"
properties:
privateEndpoint:
id: "{{ id }}"
groupIds:
- "{{ groupIds }}"
privateLinkServiceConnectionState:
status: "{{ status }}"
description: "{{ description }}"
actionsRequired: "{{ actionsRequired }}"
provisioningState: "{{ provisioningState }}"
provisioningState: "{{ provisioningState }}"
endpoint: "{{ endpoint }}"
eventTypeInfo:
kind: "{{ kind }}"
inlineEventTypes: "{{ inlineEventTypes }}"
minimumTlsVersionAllowed: "{{ minimumTlsVersionAllowed }}"
inputSchema: "{{ inputSchema }}"
inputSchemaMapping:
inputSchemaMappingType: "{{ inputSchemaMappingType }}"
metricResourceId: "{{ metricResourceId }}"
publicNetworkAccess: "{{ publicNetworkAccess }}"
inboundIpRules:
- ipMask: "{{ ipMask }}"
action: "{{ action }}"
disableLocalAuth: {{ disableLocalAuth }}
dataResidencyBoundary: "{{ dataResidencyBoundary }}"
encryption:
customerManagedKeyEncryption:
- keyEncryptionKeyUrl: "{{ keyEncryptionKeyUrl }}"
keyEncryptionKeyIdentity:
type: "{{ type }}"
userAssignedIdentityResourceId: "{{ userAssignedIdentityResourceId }}"
keyEncryptionKeyStatus: "{{ keyEncryptionKeyStatus }}"
keyEncryptionKeyStatusFriendlyDescription: "{{ keyEncryptionKeyStatusFriendlyDescription }}"
platformCapabilities:
confidentialCompute:
mode: "{{ mode }}"
- name: sku
description: |
The Sku pricing tier for the topic.
value:
name: "{{ name }}"
- name: identity
description: |
Identity information for the resource.
value:
type: "{{ type }}"
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: kind
value: "{{ kind }}"
description: |
Kind of the resource. Known values are: "Azure" and "AzureArc".
valid_values: ['Azure', 'AzureArc']
- name: extendedLocation
description: |
Extended location of the resource.
value:
name: "{{ name }}"
type: "{{ type }}"
UPDATE examples
- update
Update a topic. Asynchronously updates a topic with the specified parameters.
UPDATE azure.event_grid.topics
SET
tags = '{{ tags }}',
identity = '{{ identity }}',
properties = '{{ properties }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND topic_name = '{{ topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Create a topic. Asynchronously creates a new topic with the specified parameters.
REPLACE azure.event_grid.topics
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
kind = '{{ kind }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND topic_name = '{{ topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
extendedLocation,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;
DELETE examples
- delete
Delete a topic. Delete existing topic.
DELETE FROM azure.event_grid.topics
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND topic_name = '{{ topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_shared_access_keys
- regenerate_key
List keys for a topic. List the two keys used to publish to a topic.
EXEC azure.event_grid.topics.list_shared_access_keys
@resource_group_name='{{ resource_group_name }}' --required,
@topic_name='{{ topic_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Regenerate key for a topic. Regenerate a shared access key for a topic.
EXEC azure.event_grid.topics.regenerate_key
@resource_group_name='{{ resource_group_name }}' --required,
@topic_name='{{ topic_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"keyName": "{{ keyName }}"
}'
;