Skip to main content

event_subscriptions

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

Overview

Nameevent_subscriptions
TypeResource
Idazure.event_grid.event_subscriptions

Fields

NameDatatypeDescription
idstringFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
propertiesobjectProperties of the Event Subscription.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTeventSubscriptionName, scopeGet properties of an event subscription.
list_by_domain_topicSELECTdomainName, resourceGroupName, subscriptionId, topicNameList all event subscriptions that have been created for a specific domain topic.
list_by_resourceSELECTproviderNamespace, resourceGroupName, resourceName, resourceTypeName, subscriptionIdList all event subscriptions that have been created for a specific resource.
create_or_updateINSERTeventSubscriptionName, scopeAsynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
deleteDELETEeventSubscriptionName, scopeDelete an existing event subscription.
updateUPDATEeventSubscriptionName, scopeAsynchronously updates an existing event subscription.

SELECT examples

Get properties of an event subscription.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.event_grid.event_subscriptions
WHERE eventSubscriptionName = '{{ eventSubscriptionName }}'
AND scope = '{{ scope }}';

INSERT example

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

/*+ create */
INSERT INTO azure.event_grid.event_subscriptions (
eventSubscriptionName,
scope,
properties
)
SELECT
'{{ eventSubscriptionName }}',
'{{ scope }}',
'{{ properties }}'
;

UPDATE example

Updates a event_subscriptions resource.

/*+ update */
UPDATE azure.event_grid.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 scope = '{{ scope }}';

DELETE example

Deletes the specified event_subscriptions resource.

/*+ delete */
DELETE FROM azure.event_grid.event_subscriptions
WHERE eventSubscriptionName = '{{ eventSubscriptionName }}'
AND scope = '{{ scope }}';