Skip to main content

domains

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

Overview

Namedomains
TypeResource
Idazure.event_grid.domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
autoCreateTopicWithFirstSubscriptionbooleanThis Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic when the first event subscription is created at the scope of the domain topic. If this property is set to false, then creating the first event subscription will require creating a domain topic by the user. The self-management mode can be used if the user wants full control of when the domain topic is created, while auto-managed mode provides the flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed creation mode, user is allowed to create the domain topic on demand if needed.
autoDeleteTopicWithLastSubscriptionbooleanThis Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain resource. In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The default value for this property is true. When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the last event subscription at the scope of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the domain topic when it is no longer needed (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management mode can be used if the user wants full control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to perform less operations and manage fewer resources by the user.
dataResidencyBoundarystringData Residency Boundary of the resource. Known values are: "WithinGeopair" and "WithinRegion". (WithinGeopair, WithinRegion)
disableLocalAuthbooleanThis 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 domain.
endpointstringEndpoint for the Event Grid Domain Resource which is used for publishing the events.
eventTypeInfoobjectEvent Type Information for the domain. This information is provided by the publisher and can be used by the subscriber to view different types of events that are published.
identityobjectIdentity information for the Event Grid Domain resource.
inboundIpRulesarrayThis can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
inputSchemastringThis determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource. Known values are: "EventGridSchema", "CustomEventSchema", and "CloudEventSchemaV1_0". (EventGridSchema, CustomEventSchema, CloudEventSchemaV1_0)
inputSchemaMappingobjectInformation about the InputSchemaMapping which specified the info about mapping event payload.
locationstringThe geo-location where the resource lives. Required.
metricResourceIdstringMetric resource id for the Event Grid Domain Resource.
minimumTlsVersionAllowedstringMinimum TLS version of the publisher allowed to publish to this domain. Known values are: "1.0", "1.1", and "1.2". (1.0, 1.1, 1.2)
privateEndpointConnectionsarrayList of private endpoint connections.
provisioningStatestringProvisioning state of the Event Grid Domain Resource. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". (Creating, Updating, Deleting, Succeeded, Canceled, Failed)
publicNetworkAccessstringThis 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)
skuobjectThe Sku pricing tier for the Event Grid Domain resource.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, domain_name, subscription_idGet a domain. Get properties of a domain.
list_by_resource_groupselectresource_group_name, subscription_id$filter, $topList domains under a resource group. List all the domains under a resource group.
list_by_subscriptionselectsubscription_id$filter, $topList domains under an Azure subscription. List all the domains under an Azure subscription.
create_or_updateinsertresource_group_name, domain_name, subscription_id, locationCreate or update a domain. Asynchronously creates or updates a new domain with the specified parameters.
updateupdateresource_group_name, domain_name, subscription_idUpdate a domain. Asynchronously updates a domain with the specified parameters.
create_or_updatereplaceresource_group_name, domain_name, subscription_id, locationCreate or update a domain. Asynchronously creates or updates a new domain with the specified parameters.
deletedeleteresource_group_name, domain_name, subscription_idDelete a domain. Delete existing domain.
list_shared_access_keysexecresource_group_name, domain_name, subscription_idList keys for a domain. List the two keys used to publish to a domain.
regenerate_keyexecresource_group_name, domain_name, subscription_id, keyNameRegenerate key for a domain. Regenerate a shared access key for a domain.

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.

NameDatatypeDescription
domain_namestringName of the domain. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringThe 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.
$topintegerThe 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

Get a domain. Get properties of a domain.

SELECT
id,
name,
autoCreateTopicWithFirstSubscription,
autoDeleteTopicWithLastSubscription,
dataResidencyBoundary,
disableLocalAuth,
endpoint,
eventTypeInfo,
identity,
inboundIpRules,
inputSchema,
inputSchemaMapping,
location,
metricResourceId,
minimumTlsVersionAllowed,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
sku,
systemData,
tags,
type
FROM azure.event_grid.domains
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND domain_name = '{{ domain_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a domain. Asynchronously creates or updates a new domain with the specified parameters.

INSERT INTO azure.event_grid.domains (
tags,
location,
properties,
sku,
identity,
resource_group_name,
domain_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ sku }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ domain_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Update a domain. Asynchronously updates a domain with the specified parameters.

UPDATE azure.event_grid.domains
SET
tags = '{{ tags }}',
properties = '{{ properties }}',
identity = '{{ identity }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND domain_name = '{{ domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Create or update a domain. Asynchronously creates or updates a new domain with the specified parameters.

REPLACE azure.event_grid.domains
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND domain_name = '{{ domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Delete a domain. Delete existing domain.

DELETE FROM azure.event_grid.domains
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND domain_name = '{{ domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

List keys for a domain. List the two keys used to publish to a domain.

EXEC azure.event_grid.domains.list_shared_access_keys 
@resource_group_name='{{ resource_group_name }}' --required,
@domain_name='{{ domain_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;