| external help file | |
|---|---|
| Module Name | Az.EventHub |
| online version | https://learn.microsoft.com/powershell/module/az.eventhub/set-azeventhubapplicationgroup |
| schema | 2.0.0 |
Sets an EventHub Application Group
Set-AzEventHubApplicationGroup -Name <String> -NamespaceName <String> -ResourceGroupName <String>
[-SubscriptionId <String>] [-ClientAppGroupIdentifier <String>] [-IsEnabled]
[-Policy <IApplicationGroupPolicy[]>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-AzEventHubApplicationGroup -InputObject <IEventHubIdentity> [-ClientAppGroupIdentifier <String>]
[-IsEnabled] [-Policy <IApplicationGroupPolicy[]>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm]
[-WhatIf] [<CommonParameters>]
Sets an EventHub Application Group
$t3 = New-AzEventHubThrottlingPolicyConfig -Name t3 -MetricId OutgoingMessages -RateLimitThreshold 12000
$appGroup = Get-AzEventHubApplicationGroup -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myAppGroup
$appGroup.Policy += $t3
Set-AzEventHubApplicationGroup -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myAppGroup -Policy $appGroup.PolicyClientAppGroupIdentifier : NamespaceSASKeyName=a
Id : /subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace/applicationGroups/
myAppGroup
IsEnabled : True
Location : Central US
Name : myAppGroup
Policy : {{
"name": "t1",
"type": "ThrottlingPolicy",
"rateLimitThreshold": 10000,
"metricId": "IncomingMessages"
}, {
"name": "t2",
"type": "ThrottlingPolicy",
"rateLimitThreshold": 20000,
"metricId": "OutgoingBytes"
}, {
"name": "t3",
"type": "ThrottlingPolicy",
"rateLimitThreshold": 12000,
"metricId": "OutgoingMessages"
}}
ResourceGroupName : myResourceGroup
-Policy takes an array of Policy objects.
It represents the entire set of throttling policies defined on the application group and not just the one.
If you want to add or remove throttling policies, the right way to do it is to get the application group and query the Policy data member of the object returned as shown above.
$appGroup = Get-AzEventHubApplicationGroup -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name myAppGroup
Set-AzEventHubApplicationGroup -InputObject $appGroup -IsEnabled:$falseClientAppGroupIdentifier : NamespaceSASKeyName=a
Id : /subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace/applicationGroups/
myAppGroup
IsEnabled : False
Location : Central US
Name : myAppGroup
Policy : {{
"name": "t1",
"type": "ThrottlingPolicy",
"rateLimitThreshold": 10000,
"metricId": "IncomingMessages"
}, {
"name": "t2",
"type": "ThrottlingPolicy",
"rateLimitThreshold": 20000,
"metricId": "OutgoingBytes"
}, {
"name": "t3",
"type": "ThrottlingPolicy",
"rateLimitThreshold": 12000,
"metricId": "OutgoingMessages"
}}
ResourceGroupName : myResourceGroup
Disables application group myAppGroup.
Run the command as a job
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid)
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThe credentials, account, tenant, and subscription used for communication with Azure.
Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIdentity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEventHubIdentity
Parameter Sets: SetViaIdentityExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseDetermines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThe name of the Application Group.
Type: System.String
Parameter Sets: SetExpanded
Aliases: ApplicationGroupName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of EventHub namespace
Type: System.String
Parameter Sets: SetExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRun the command asynchronously
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseList of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic.
Type: Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThe name of the resource group. The name is case insensitive.
Type: System.String
Parameter Sets: SetExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe ID of the target subscription.
Type: System.String
Parameter Sets: SetExpanded
Aliases:
Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.