New-AzEventGridDomain
Creates a new Azure Event Grid Domain.
Syntax
New-AzEventGridDomain
[-ResourceGroupName] <String>
[-Name] <String>
[-Location] <String>
[-Tag <Hashtable>]
[-InputSchema <String>]
[-InputMappingField <Hashtable>]
[-InputMappingDefaultValue <Hashtable>]
[-InboundIpRule <Hashtable>]
[-PublicNetworkAccess <String>]
[-DisableLocalAuth]
[-AutoCreateTopicWithFirstSubscription]
[-AutoDeleteTopicWithLastSubscription]
[-IdentityType <String>]
[-IdentityId <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Creates a new Azure Event Grid Domain. Once the domain is created, an application can publish events to the topic endpoint.
Examples
Example 1
Creates an Event Grid domain `Domain1` in the specified geographic location `westus2`, in resource group `MyResourceGroupName`.
New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2
ResourceGroupName : MyResourceGroupName
DomainName : Domain1
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/domain1
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain1.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags :
Example 2
Creates an Event Grid domain `Domain1` in the specified geographic location `westus2`, in resource group `MyResourceGroupName` with the specified tags "Department" and "Environment".
New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2 -Tag @{ Department="Finance"; Environment="Test" }
ResourceGroupName : MyResourceGroupName
DomainName : Domain1
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/domain1
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain1.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags : {[Department, Finance], [Environment, Test]}
Example 3
Creates an Event Grid domain `Domain1` in the specified geographic location `westus2`, in resource group `MyResourceGroupName` `SystemAssigned` identity type.
New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2 -IdentityType "SystemAssigned"
Example 4
Creates an Event Grid domain `Domain1` in the specified geographic location `westus2`, in resource group `MyResourceGroupName` `UserAssigned` identity type with given identity ids.
$id1 = '/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName'
$id2 = '/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName'
New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2 -IdentityType "UserAssigned" -IdentityId $id1,$id2
Parameters
-AutoCreateTopicWithFirstSubscription
Switch param to auto create topic with first subscription
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AutoDeleteTopicWithLastSubscription
Switch param to auto delete topic with last subscription
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableLocalAuth
Switch param to disable local auth.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IdentityId
The list of user assigned identities
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IdentityType
Different identity types. Could be either of following 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'
Type: | String |
Accepted values: | SystemAssigned, UserAssigned, SystemAssigned, UserAssigned, None |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InboundIpRule
Hashtable which represents list of inbound IP rules. Each rule specifies the IP Address in CIDR notation e.g., 10.0.0.0/8 along with the corresponding Action to be performed based on the match or no match of the IpMask. Possible Action values include Allow only
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputMappingDefaultValue
Hashtable which represents the input mapping fields with default value in space separated key = value format. Allowed key names are: subject, eventtype, and dataversion. This is used when InputSchemaHelp is customeventschema only.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputMappingField
Hashtable which represents the input mapping fields in space separated key = value format. Allowed key names are: id, topic, eventtime, subject, eventtype, and dataversion. This is used when InputSchemaHelp is customeventschema only.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputSchema
The schema of the input events for the topic. Allowed values are: eventgridschema, customeventschema, or cloudeventv01Schema. Default value is eventgridschema. Note that if customeventschema is specified, then InputMappingField or/and InputMappingDefaultValue parameters need to be specified as well.
Type: | String |
Accepted values: | EventGridSchema, CustomEventSchema, CloudEventSchemaV1_0 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
The location of the domain.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
EventGrid domain name.
Type: | String |
Aliases: | DomainName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PublicNetworkAccess
This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring InboundIpRule parameters. Allowed values are disabled and enabled.
Type: | String |
Accepted values: | enabled, disabled |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group.
Type: | String |
Aliases: | ResourceGroup |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Hashtable which represents resource Tags.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |