Delen via


Set-AzureRmEventHub

Hiermee wordt de opgegeven Event Hub bijgewerkt.

Waarschuwing

De AzureRM PowerShell-module is vanaf 29 februari 2024 officieel afgeschaft. Gebruikers wordt aangeraden om van AzureRM naar de Az PowerShell-module te migreren om ondersteuning en updates te garanderen.

Hoewel de AzureRM-module nog steeds kan functioneren, wordt deze niet meer onderhouden of ondersteund, waardoor het gebruik naar eigen goeddunken en risico van de gebruiker blijft bestaan. Raadpleeg onze migratiebronnen voor hulp bij de overgang naar de Az-module.

Syntaxis

Set-AzureRmEventHub
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-Name] <String>
   [-InputObject <PSEventHubAttributes>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzureRmEventHub
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-Name] <String>
   [-messageRetentionInDays <Int64>]
   [-partitionCount <Int64>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

De set-AzureRmEventHub-cmdlet werkt de eigenschappen van de opgegeven Event Hub bij.

Voorbeelden

Voorbeeld 1

Als u Eventhub wilt bijwerken met de beschrijvingseigenschappen van Capture, volgt u de onderstaande stappen.

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

Hiermee wordt de Event Hub 'MyEventHubName' bijgewerkt die wordt vertegenwoordigd door het object 'MyCreatedEventHub', waarbij de bewaarperiode van het bericht wordt ingesteld op 4 dagen, het aantal partities op 2 en captureDescription-eigenschappen

Voorbeeld 2

PS C:\> Set-AzureRmEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject MyCreatedEventHub -messageRetentionInDays 4 -partitionCount 2

Hiermee werkt u de Event Hub 'MyEventHubName' die wordt vertegenwoordigd door het object 'MyCreatedEventHub' bij, stelt u de bewaarperiode voor berichten in op 4 dagen en het aantal partities op 2.

Parameters

-Confirm

Hiermee wordt u 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, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.

Type:IAzureContextContainer
Aliassen:AzureRmContext, AzureCredential
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-InputObject

EventHub-object

Type:PSEventHubAttributes
Aliassen:EventHubObj
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-messageRetentionInDays

Retentie van Eventhub-berichten in dagen

Type:Nullable<T>[Int64]
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-Name

Naam naamruimte

Type:String
Aliassen:EventHubName
Position:2
Default value:None
Vereist:True
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-Namespace

Naam naamruimte

Type:String
Aliassen:NamespaceName
Position:1
Default value:None
Vereist:True
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-partitionCount

Eventhub PartitionCount

Type:Nullable<T>[Int64]
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-ResourceGroupName

Naam resourcegroep

Type:String
Position:0
Default value:None
Vereist:True
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-WhatIf

Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.

Type:SwitchParameter
Aliassen:wi
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

Invoerwaarden

String

PSEventHubAttributes

Nullable<T>[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Uitvoerwaarden

PSEventHubAttributes