Set-AzCommunicationServiceNotificationHub

Links an Azure Notification Hub to this communication service.

Syntax

Set-AzCommunicationServiceNotificationHub
   -CommunicationServiceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -ConnectionString <String>
   -NotificationHubResourceId <String>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzCommunicationServiceNotificationHub
   -CommunicationServiceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -LinkNotificationHubParameter <ILinkNotificationHubParameters>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Links an Azure Notification Hub to this communication service.

Examples

Example 1: Provide Notification Hub details interactively

Set-AzCommunicationServiceNotificationHub -CommunicationServiceName ContosoAcsResource2 -ResourceGroupName ContosoResourceProvider1 -ConnectionString "<notificationhub-connectionstring>" -NotificationHubResourceId "<notificationhub-resourceid>"

A linked notification hub allows a ACS resource to send notifications for certain events.

Parameters

-CommunicationServiceName

The name of the CommunicationService resource.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
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

-ConnectionString

Connection string for the notification hub

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LinkNotificationHubParameter

Description of an Azure Notification Hub to link to the communication service To construct, see NOTES section for LINKNOTIFICATIONHUBPARAMETER properties and create a hash table.

Type:ILinkNotificationHubParameters
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NotificationHubResourceId

The resource ID of the notification hub

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription. The value must be an UUID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
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

ILinkNotificationHubParameters

Outputs

String