Set-AzNotificationHub
Hiermee stelt u eigenschapswaarden in voor een Notification Hub.
Syntaxis
Set-AzNotificationHub
[-ResourceGroup] <String>
[-Namespace] <String>
[-InputFile] <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNotificationHub
[-ResourceGroup] <String>
[-Namespace] <String>
[-NotificationHubObj] <NotificationHubAttributes>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
De cmdlet Set-AzNotificationHub wijzigt de eigenschapswaarden van een Notification Hub.
U kunt een eigenschapswaarde van de Notification Hub op twee manieren wijzigen.
Voor één kunt u een exemplaar van de NotificationHubAttributes object maken en dat object vervolgens configureren met de eigenschapswaarden die de nieuwe hub moet bezitten.
Dit kan worden gedaan via .NET Framework.
U kunt deze eigenschapswaarden vervolgens naar uw hub kopiëren via de parameter NotificationHubObj.
U kunt ook een JSON-bestand (JavaScript Object Notation) maken dat de relevante configuratiewaarden bevat en deze waarden vervolgens toepassen via de parameter InputFile.
Een JSON-bestand is een tekstbestand dat gebruikmaakt van syntaxis die vergelijkbaar is met het volgende: {
"Name": "ContosoNotificationHub",
"Locatie": "VS - west",
} Wanneer deze wordt gebruikt in combinatie met de cmdlet Set-AzNotificationHub, wordt in het voorgaande JSON-voorbeeld de locatiewaarde van een notification hub met de naam ContosoNotificationHub ingesteld op VS - west.
Voorbeelden
Voorbeeld 1: De eigenschapswaarden voor een Notification Hub wijzigen
Set-AzNotificationHub -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -InputFile "C:\Configuration\Hubs.json"
Met deze opdracht worden de eigenschapswaarden gewijzigd voor een Notification Hub die is gevonden in de naamruimte ContosoNamespace en toegewezen aan de resourcegroep ContosoNotificationsGroup. De eigenschapswaarden, evenals de naam van de hub die moet worden gewijzigd, worden niet opgegeven in de opdracht. In plaats daarvan bevindt die informatie zich in het invoerbestand C:\Configuration\Hubs.jsaan.
Voorbeeld 2
Hiermee stelt u eigenschapswaarden in voor een Notification Hub. (automatisch gegenereerd)
Set-AzNotificationHub -Namespace 'ContosoNamespace' -NotificationHubObj <NotificationHubAttributes> -ResourceGroup 'ContosoNotificationsGroup'
Parameters
-Confirm
U wordt gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliassen: | cf |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DefaultProfile
De referenties, het account, de tenant en het abonnement dat wordt gebruikt voor communicatie met Azure
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Force
Vraag niet om bevestiging.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-InputFile
Hiermee geeft u het pad naar een JSON-bestand dat configuratiegegevens voor de Notification Hub bevat.
Type: | String |
Position: | 2 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Namespace
Hiermee geeft u de naamruimte aan waaraan de Notification Hub is toegewezen. Naamruimten bieden een manier om Notification Hubs te groeperen en te categoriseren.
Type: | String |
Position: | 1 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-NotificationHubObj
Hiermee geeft u de NotificationHubAttributes-object dat configuratiegegevens bevat voor de hub die door deze cmdlet wordt gewijzigd.
Type: | NotificationHubAttributes |
Position: | 2 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceGroup
Hiermee geeft u de resourcegroep aan waaraan de Notification Hub is toegewezen. Resourcegroepen organiseren items zoals naamruimten, notification hubs en autorisatieregels op manieren die eenvoudig voorraadbeheer en Azure-beheer helpen.
Type: | String |
Position: | 0 |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-WhatIf
Toont wat er zou gebeuren als de cmdlet wordt uitgevoerd. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliassen: | wi |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Invoerwaarden
Uitvoerwaarden
Verwante koppelingen
Azure PowerShell