Skip to main content

topic_event_subscriptions

Creates, updates, deletes, gets or lists a topic_event_subscriptions resource.

Overview

Nametopic_event_subscriptions
TypeResource
Idazure.event_grid.topic_event_subscriptions

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
nametextThe name of the resource
dead_letter_destinationtextfield from the properties object
dead_letter_with_resource_identitytextfield from the properties object
delivery_with_resource_identitytextfield from the properties object
destinationtextfield from the properties object
eventSubscriptionNametextfield from the properties object
event_delivery_schematextfield from the properties object
expiration_time_utctextfield from the properties object
filtertextfield from the properties object
labelstextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
retry_policytextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
topictextfield from the properties object
topicNametextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTeventSubscriptionName, resourceGroupName, subscriptionId, topicNameGet properties of an event subscription of a topic.
listSELECTresourceGroupName, subscriptionId, topicNameList all event subscriptions that have been created for a specific topic.
create_or_updateINSERTeventSubscriptionName, resourceGroupName, subscriptionId, topicNameAsynchronously creates a new event subscription or updates an existing event subscription.
deleteDELETEeventSubscriptionName, resourceGroupName, subscriptionId, topicNameDelete an existing event subscription for a topic.
updateUPDATEeventSubscriptionName, resourceGroupName, subscriptionId, topicNameUpdate an existing event subscription for a topic.

SELECT examples

List all event subscriptions that have been created for a specific topic.

SELECT
id,
name,
dead_letter_destination,
dead_letter_with_resource_identity,
delivery_with_resource_identity,
destination,
eventSubscriptionName,
event_delivery_schema,
expiration_time_utc,
filter,
labels,
provisioning_state,
resourceGroupName,
retry_policy,
subscriptionId,
system_data,
topic,
topicName,
type
FROM azure.event_grid.vw_topic_event_subscriptions
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND topicName = '{{ topicName }}';

INSERT example

Use the following StackQL query and manifest file to create a new topic_event_subscriptions resource.

/*+ create */
INSERT INTO azure.event_grid.topic_event_subscriptions (
eventSubscriptionName,
resourceGroupName,
subscriptionId,
topicName,
properties
)
SELECT
'{{ eventSubscriptionName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ topicName }}',
'{{ properties }}'
;

UPDATE example

Updates a topic_event_subscriptions resource.

/*+ update */
UPDATE azure.event_grid.topic_event_subscriptions
SET
destination = '{{ destination }}',
deliveryWithResourceIdentity = '{{ deliveryWithResourceIdentity }}',
filter = '{{ filter }}',
labels = '{{ labels }}',
expirationTimeUtc = '{{ expirationTimeUtc }}',
eventDeliverySchema = '{{ eventDeliverySchema }}',
retryPolicy = '{{ retryPolicy }}',
deadLetterDestination = '{{ deadLetterDestination }}',
deadLetterWithResourceIdentity = '{{ deadLetterWithResourceIdentity }}'
WHERE
eventSubscriptionName = '{{ eventSubscriptionName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND topicName = '{{ topicName }}';

DELETE example

Deletes the specified topic_event_subscriptions resource.

/*+ delete */
DELETE FROM azure.event_grid.topic_event_subscriptions
WHERE eventSubscriptionName = '{{ eventSubscriptionName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND topicName = '{{ topicName }}';