Skip to content

Commit d53002d

Browse files
authored
Update Set-AzEventHub.md (#13921)
Corrected input object variable in example 1.
1 parent b16f435 commit d53002d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/EventHub/EventHub/help/Set-AzEventHub.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ The Set-AzEventHub cmdlet updates the properties of the specified Event Hub.
3535
To update Eventhub with Capture description properties, please follow the below steps.
3636

3737
```
38-
PS C:\> $CreatedEventHub = Get-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName
39-
PS C:\> $createdEventHub.CaptureDescription = New-Object -TypeName Microsoft.Azure.Commands.EventHub.Models.PSCaptureDescriptionAttributes
38+
PS C:\> $createdEventHub = Get-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyCreatedEventHub
39+
PS C:\> $ceatedEventHub.CaptureDescription = New-Object -TypeName Microsoft.Azure.Commands.EventHub.Models.PSCaptureDescriptionAttributes
4040
PS C:\> $createdEventHub.CaptureDescription.Enabled = $true
4141
PS C:\> $createdEventHub.CaptureDescription.IntervalInSeconds = 120
4242
PS C:\> $createdEventHub.CaptureDescription.Encoding = "Avro"
@@ -45,10 +45,10 @@ PS C:\> $createdEventHub.CaptureDescription.Destination.Name = "EventHubArchive.
4545
PS C:\> $createdEventHub.CaptureDescription.Destination.BlobContainer = "container"
4646
PS C:\> $createdEventHub.CaptureDescription.Destination.ArchiveNameFormat = "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
4747
PS C:\> $createdEventHub.CaptureDescription.Destination.StorageAccountResourceId = "/subscriptions/{SubscriptionId}/resourceGroups/MyResourceGroupName/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"
48-
PS C:\> Set-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject MyCreatedEventHub -messageRetentionInDays 4 -partitionCount 2
48+
PS C:\> Set-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject $createdEventHub
4949
```
5050

51-
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
51+
Updates the Event Hub \`MyEventHubName\` represented by the \`MyCreatedEventHub\` object, setting the CaptureDescription properties
5252

5353
### Example 2
5454
```

0 commit comments

Comments
 (0)