New-​Azure​Rm​Event​Hub

Creates a new Event Hub.

Syntax

New-AzureRmEventHub
   [-ResourceGroupName] <String>
   [-NamespaceName] <String>
   [-Location] <String>
   [-EventHubName] <String>
   [-EventHubObj <EventHubAttributes>]
   [-MessageRetentionInDays <Int64>]
   [-PartitionCount <Int64>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmEventHub cmdlet creates a new Azure Event Hub.

Examples

Example 1

PS C:\> New-AzureRmEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location WestUS -EventHubName MyEventHubName -MessageRetentionInDays 3 -PartitionCount 2

Creates an Event Hub named MyEventHubName with a 3-day message retention period and two partitions, in the WestUS location, with resource group MyResourceGroupName.

Required Parameters

-EventHubName

The Event Hub name.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Location

Namespace geographic location.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-NamespaceName

The Event Hubs namespace name.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Resource group name.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-EventHubObj

The Event Hubs object.

Type:EventHubAttributes
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-MessageRetentionInDays

Event Hubs message retention time in days.

Type:Int64
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PartitionCount

Number of partitions in the Event Hub.

Type:Int64
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

Outputs

Microsoft.Azure.Commands.EventHub.Models.EventHubAttributes