New-AzEventGridSystemTopic
Creates a new Azure Event Grid System Topic.
Syntax
New-AzEventGridSystemTopic
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzEventGridSystemTopic
-ResourceGroupName <String>
-Name <String>
-Source <String>
-TopicType <String>
[-Location <String>]
[-IdentityType <String>]
[-IdentityId <String[]>]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Creates a new Azure Event Grid System Topic. Once the system topic is created, an azure service application can publish events to the system topic.
Examples
Example 1
New-AzEventGridSystemTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Source ServiceBusNamespaceResourceId -TopicType 'Microsoft.ServiceBus.Namespaces' -Location westus2
Creates an Event Grid System topic `Topic1` for the Azure ServiceBus namespace with resource id `ServiceBusNamespaceResourceId` in the specified geographic location `westus2`, in resource group `MyResourceGroupName`.
Example 2
New-AzEventGridSystemTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Source ServiceBusNamespaceResourceId -TopicType 'Microsoft.ServiceBus.Namespaces' -Location westus2 -Tag @{ Department="Finance"; Environment="Test" }
Creates an Event Grid System topic `Topic1` for the Azure ServiceBus namespace with resource id `ServiceBusNamespaceResourceId` in the specified geographic location `westus2`, in resource group `MyResourceGroupName` with the specified tags "Department" and "Environment".
Example 3
$id1 = '/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName'
$id2 = '/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName'
New-AzEventGridSystemTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Source ServiceBusNamespaceResourceId -TopicType 'Microsoft.ServiceBus.Namespaces' -Location westus2 -IdentityType "UserAssigned" -IdentityId $id1,$id2
Creates an Event Grid System topic `Topic1` for the Azure ServiceBus namespace with resource id `ServiceBusNamespaceResourceId` in the specified geographic location `westus2`, in resource group `MyResourceGroupName` with `UserAssigned` identity type with given identity ids.
Example 4
New-AzEventGridSystemTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Source ServiceBusNamespaceResourceId -TopicType 'Microsoft.ServiceBus.Namespaces' -Location westus2 -IdentityType "SystemAssigned"
Creates an Event Grid System topic `Topic1` for the Azure ServiceBus namespace with resource id `ServiceBusNamespaceResourceId` in the specified geographic location `westus2`, in resource group `MyResourceGroupName` with `SystemAssigned` identity type.
Parameters
-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 |
-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 |
-Location
The location of the topic.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
EventGrid topic name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group.
Type: | String |
Aliases: | ResourceGroup |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Source
Source for a system topic
Type: | String |
Position: | Named |
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 |
-TopicType
EventGrid topic type name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
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 |
Inputs
String[]
Outputs
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for