< Back
Set-AzureRmEventHub
Post
NAME Set-AzureRmEventHub
SYNOPSIS
Updates the specified Event Hub.
SYNTAX
Set-AzureRmEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-InputObject
<PSEventHubAttributes>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-AzureRmEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[-messageRetentionInDays <Int64>] [-partitionCount <Int64>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmEventHub cmdlet updates the properties of the specified Event Hub.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with Azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <PSEventHubAttributes>
EventHub object
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-messageRetentionInDays <Int64>
Eventhub Message Retention In Days
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Namespace Name
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Namespace <String>
Namespace Name
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-partitionCount <Int64>
Eventhub PartitionCount
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Resource Group Name
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes System.Nullable`1[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]]
OUTPUTS
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
NOTES
Example 1
PS C:\\> $CreatedEventHub = Get-AzureRmEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName
PS C:\\> $createdEventHub.CaptureDescription = New-Object -TypeName Microsoft.Azure.Commands.EventHub.Models.PSCaptureDescriptionAttributes
PS C:\\> $createdEventHub.CaptureDescription.Enabled = $true
PS C:\\> $createdEventHub.CaptureDescription.IntervalInSeconds = 120
PS C:\\> $createdEventHub.CaptureDescription.Encoding = "Avro"
PS C:\\> $createdEventHub.CaptureDescription.SizeLimitInBytes = 10485763
PS C:\\> $createdEventHub.CaptureDescription.Destination.Name = "EventHubArchive.AzureBlockBlob"
PS C:\\> $createdEventHub.CaptureDescription.Destination.BlobContainer = "container"
PS C:\\> $createdEventHub.CaptureDescription.Destination.ArchiveNameFormat =
"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
PS C:\\> $createdEventHub.CaptureDescription.Destination.StorageAccountResourceId =
"/subscriptions/{SubscriptionId}/resourceGroups/MyResourceGroupName/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"
PS C:\\> Set-AzureRmEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject MyCreatedEventHub
-messageRetentionInDays 4 -partitionCount 2
Updates the Event Hub `MyEventHubName` represented by the `MyCreatedEventHub` object, setting the message retention period to 4 days, the number
of partitions to 2 and CaptureDescription properties
Example 2
PS C:\\> Set-AzureRmEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject MyCreatedEventHub
-messageRetentionInDays 4 -partitionCount 2
Updates the Event Hub `MyEventHubName` represented by the `MyCreatedEventHub` object, setting the message retention period to 4 days, and the
number of partitions to 2.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... rmeventhub
SYNOPSIS
Updates the specified Event Hub.
SYNTAX
Set-AzureRmEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-InputObject
<PSEventHubAttributes>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-AzureRmEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[-messageRetentionInDays <Int64>] [-partitionCount <Int64>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmEventHub cmdlet updates the properties of the specified Event Hub.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with Azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <PSEventHubAttributes>
EventHub object
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-messageRetentionInDays <Int64>
Eventhub Message Retention In Days
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Namespace Name
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Namespace <String>
Namespace Name
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-partitionCount <Int64>
Eventhub PartitionCount
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Resource Group Name
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes System.Nullable`1[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]]
OUTPUTS
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
NOTES
Example 1
PS C:\\> $CreatedEventHub = Get-AzureRmEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName
PS C:\\> $createdEventHub.CaptureDescription = New-Object -TypeName Microsoft.Azure.Commands.EventHub.Models.PSCaptureDescriptionAttributes
PS C:\\> $createdEventHub.CaptureDescription.Enabled = $true
PS C:\\> $createdEventHub.CaptureDescription.IntervalInSeconds = 120
PS C:\\> $createdEventHub.CaptureDescription.Encoding = "Avro"
PS C:\\> $createdEventHub.CaptureDescription.SizeLimitInBytes = 10485763
PS C:\\> $createdEventHub.CaptureDescription.Destination.Name = "EventHubArchive.AzureBlockBlob"
PS C:\\> $createdEventHub.CaptureDescription.Destination.BlobContainer = "container"
PS C:\\> $createdEventHub.CaptureDescription.Destination.ArchiveNameFormat =
"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
PS C:\\> $createdEventHub.CaptureDescription.Destination.StorageAccountResourceId =
"/subscriptions/{SubscriptionId}/resourceGroups/MyResourceGroupName/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"
PS C:\\> Set-AzureRmEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject MyCreatedEventHub
-messageRetentionInDays 4 -partitionCount 2
Updates the Event Hub `MyEventHubName` represented by the `MyCreatedEventHub` object, setting the message retention period to 4 days, the number
of partitions to 2 and CaptureDescription properties
Example 2
PS C:\\> Set-AzureRmEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject MyCreatedEventHub
-messageRetentionInDays 4 -partitionCount 2
Updates the Event Hub `MyEventHubName` represented by the `MyCreatedEventHub` object, setting the message retention period to 4 days, and the
number of partitions to 2.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... rmeventhub