Domains - Create Or Update
Create or update a domain.
Asynchronously creates or updates a new domain with the specified parameters.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}?api-version=2022-06-15
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
domain
|
path | True |
string |
Name of the domain. |
resource
|
path | True |
string |
The name of the resource group within the user's subscription. |
subscription
|
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. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
Location of the resource. |
identity |
Identity information for the Event Grid Domain resource. |
||
properties.autoCreateTopicWithFirstSubscription |
boolean |
This 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. |
|
properties.autoDeleteTopicWithLastSubscription |
boolean |
This 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. |
|
properties.dataResidencyBoundary |
Data Residency Boundary of the resource. |
||
properties.disableLocalAuth |
boolean |
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 domain. |
|
properties.inboundIpRules |
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 |
This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource. |
||
properties.inputSchemaMapping | InputSchemaMapping: |
Information about the InputSchemaMapping which specified the info about mapping event payload. |
|
properties.publicNetworkAccess |
This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring |
||
tags |
object |
Tags of the resource. |
Responses
Name | Type | Description |
---|---|---|
201 Created |
Created |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Domains_CreateOrUpdate
Sample request
PUT https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/domains/exampledomain1?api-version=2022-06-15
{
"location": "westus2",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"properties": {
"publicNetworkAccess": "Enabled",
"inboundIpRules": [
{
"ipMask": "12.18.30.15",
"action": "Allow"
},
{
"ipMask": "12.18.176.1",
"action": "Allow"
}
]
}
}
Sample response
{
"properties": {
"endpoint": "https://exampledomain1.westus2-1.eventgrid.azure.net/api/events",
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled",
"inboundIpRules": [
{
"ipMask": "12.18.30.15",
"action": "Allow"
},
{
"ipMask": "12.18.176.1",
"action": "Allow"
}
]
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/domains/exampledomain1",
"location": "westus2",
"name": "exampledomain1",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"type": "Microsoft.EventGrid/domains"
}
Definitions
Name | Description |
---|---|
Connection |
ConnectionState information. |
created |
The type of identity that created the resource. |
Data |
Data Residency Boundary of the resource. |
Domain |
EventGrid Domain. |
Domain |
Provisioning state of the Event Grid Domain Resource. |
Identity |
The identity information for the resource. |
Identity |
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. |
Inbound |
|
Input |
This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource. |
Ip |
Action to perform based on the match or no match of the IpMask. |
Json |
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. |
Json |
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. |
Json |
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. |
Persisted |
Status of the connection. |
Private |
PrivateEndpoint information. |
Private |
|
Public |
This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring |
Resource |
Provisioning state of the Private Endpoint Connection. |
system |
Metadata pertaining to creation and last modification of the resource. |
User |
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 |
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 |
Domain
EventGrid Domain.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
Fully qualified identifier of the resource. |
|
identity |
Identity information for the Event Grid Domain resource. |
||
location |
string |
Location of the resource. |
|
name |
string |
Name of the resource. |
|
properties.autoCreateTopicWithFirstSubscription |
boolean |
True |
This 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. |
properties.autoDeleteTopicWithLastSubscription |
boolean |
True |
This 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. |
properties.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 domain. |
properties.endpoint |
string |
Endpoint for the Event Grid Domain Resource which is used for publishing the events. |
|
properties.inboundIpRules |
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 | EventGridSchema |
This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource. |
|
properties.inputSchemaMapping | InputSchemaMapping: |
Information about the InputSchemaMapping which specified the info about mapping event payload. |
|
properties.metricResourceId |
string |
Metric resource id for the Event Grid Domain Resource. |
|
properties.privateEndpointConnections |
List of private endpoint connections. |
||
properties.provisioningState |
Provisioning state of the Event Grid Domain Resource. |
||
properties.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 |
The system metadata relating to the Event Grid Domain resource. |
||
tags |
object |
Tags of the resource. |
|
type |
string |
Type of the resource. |
DomainProvisioningState
Provisioning state of the Event Grid Domain Resource.
Name | Type | Description |
---|---|---|
Canceled |
string |
|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
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 |
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,
User |
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 |
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 |
The mapping information for the DataVersion property of the Event Grid Event. |
|
properties.eventTime |
The mapping information for the EventTime property of the Event Grid Event. |
|
properties.eventType |
The mapping information for the EventType property of the Event Grid Event. |
|
properties.id |
The mapping information for the Id property of the Event Grid Event. |
|
properties.subject |
The mapping information for the Subject property of the Event Grid Event. |
|
properties.topic |
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 |
The Private Endpoint resource for this Connection. |
|
properties.privateLinkServiceConnectionState |
Details about the state of the connection. |
|
properties.provisioningState |
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 |
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 |
The type of identity that last modified the resource. |
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. |