הדרכה
מודול
סיור במרכזי האירועים של Azure - Training
למד כיצד מרכזי האירועים של Azure לוכדים אירועים וכיצד לשנות את קנה המידה של יישום העיבוד שלך.
הדפדפן הזה אינו נתמך עוד.
שדרג ל- Microsoft Edge כדי לנצל את התכונות, עדכוני האבטחה והתמיכה הטכנית העדכניים ביותר.
The Az.EventHub
PowerShell module version 9.0.1 of Azure PowerShell that would be released in October introduces improvised cmdlets for public use.
These changes are focused towards making the PowerShell use more productive and seamless for the end users.
The following example installs the latest version of the Az.Eventhub
Azure PowerShell module.
Install-Module -Name Az.EventHub -Repository PSGallery -Scope CurrentUser
Until Module 8.3.0, -InputObject supports passing an in memory object to additional cmdlet in pipeline. Due to above design, updating resources becomes a multi step approach.
With the new module release, -InputObject parameter set would be changing for a seamless experience.
In contrast to earlier approach, -InputObject would now support object of corresponding input type as well as resource Id directly to the cmdlet. This would make cmdlet usage fairly easy and faster as compared to the old approach.
Below example shows the difference in -InputObject Usage:
Below example shows how to update capture description on existing event hub with Module version 8.3.0 or older
$createdEventHub = Get-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyCreatedEventHub
$createdEventHub.CaptureDescription = New-Object -TypeName Microsoft.Azure.Commands.EventHub.Models.PSCaptureDescriptionAttributes
$createdEventHub.CaptureDescription.Enabled = $true
$createdEventHub.CaptureDescription.IntervalInSeconds = 120
$createdEventHub.CaptureDescription.Encoding = "Avro"
$createdEventHub.CaptureDescription.SizeLimitInBytes = 10485763
$createdEventHub.CaptureDescription.Destination.Name = "EventHubArchive.AzureBlockBlob"
$createdEventHub.CaptureDescription.Destination.BlobContainer = "container"
$createdEventHub.CaptureDescription.Destination.ArchiveNameFormat = "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
$createdEventHub.CaptureDescription.Destination.StorageAccountResourceId = "/subscriptions/{SubscriptionId}/resourceGroups/MyResourceGroupName/providers/Microsoft.ClassicStorage/storageAccounts/teststorage"
Set-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -InputObject $createdEventHub
Below example shows how to update capture description on existing event hub with starting with / after Module version 9.0.1
$eventhub = Get-AzEventHub -InputObject <ResourceID of event hub>
Set-AzEventHub -InputObject $eventhub -CaptureEnabled -SizeLimitInBytes 10485763 -IntervalInSeconds 120 -Encoding Avro -DestinationName EventHubArchive.AzureBlockBlob -BlobContainer container -ArchiveNameFormat "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}" -StorageAccountResourceId "/subscriptions/{SubscriptionId}/resourceGroups/MyResourceGroupName/providers/Microsoft.ClassicStorage/storageAccounts/teststorage"
Get-AzEventHub -InputObject <ResourceId of the eventhub> | Set-AzEventHub -MessageRetentionInDays 6
-InputObject
would accept pipeline input.-InputObject
parameter would no longer support parameter aliasing.With new release,below cmdlets are marked to be deprecated:
Use Set-AzEventHubNetworkRuleSet to add/remove IP or virtual network rules.
Below list talks about the changes to existing cmdlets in detailed manner:
-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubApplicationGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IApplicationGroup
.Microsoft.Azure.Commands.EventHub.Models.PSEventHubApplicationGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IApplicationGroup
.-ThrottlingPolicyConfig
would be renamed to -Policy
and type would change from Microsoft.Azure.Commands.EventHub.Models.PSEventHubThrottlingPolicyConfigAttributes[]
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IApplicationGroupPolicy[]
. New-AzEventHubThrottlingPolicyConfig can still be used to construct this object.-InputObject
and Output type of the cmdlet has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubApplicationGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IApplicationGroup
.-ThrottlingPolicyConfig
would be renamed to -Policy
and type would change from Microsoft.Azure.Commands.EventHub.Models.PSEventHubThrottlingPolicyConfigAttributes[]
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IApplicationGroupPolicy[]
. New-AzEventHubThrottlingPolicyConfig can still be used to construct this object.-InputObject
parameter set would have a change in behaviour. Refer the section to know more.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubThrottlingPolicyConfigAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IThrottlingPolicy
.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubApplicationGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IApplicationGroup
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.-InputObject
and Output type has been changed from Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.INetworkRuleSet
.-IPRule
is changing type from Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes[]
to Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.INwRuleSetIPRules[]
. Please use New-AzEventHubIPRuleConfig
cmdlet to construct an in-memory object which can be fed as input to -IPRule
.-VirtualNetworkRule
is changing type from Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes[]
to Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.INwRuleSetVirtualNetworkRules[]
. Please use New-AzEventHubVirtualNetworkRuleConfig
cmdlet to construct an in-memory object which can then be fed as input to -VirtualNetworkRule
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided to -InputObject
parameter.-InputObject
parameter set would have a change in behaviour. Refer the section to know more.Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.INetworkRuleSet
.Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IAuthorizationRule
.-InputObject
and Output type of the cmdlet has been changed from Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IAuthorizationRule
.-InputObject
parameter set would have a change in behaviour. Refer the section to know more.-InputObject
parameter would no longer support alias -AuthRuleObj
.Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IAuthorizationRule
.Microsoft.Azure.Commands.EventHub.Models.PSListKeysAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IAccessKeys
.-ResourceGroupName
would no longer support alias -ResourceGroup
.Microsoft.Azure.Commands.EventHub.Models.PSListKeysAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IAccessKeys
.Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IConsumerGroup
.Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IConsumerGroup
.-InputObject
parameter set would have a change in behaviour. Refer the section to know more.Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IConsumerGroup
.-MaxCount
has been removed. Use -Skip
and -Top
pagination use case.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IConsumerGroup
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubClusterAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ICluster
.-ResourceId
would be removed as it is not supported for Creation operation and is available for use after resource is created.-InputObject
and Output type of the cmdlet has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubClusterAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ICluster
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.-InputObject
parameter set would have a change in behaviour. Refer the section to know more.Microsoft.Azure.Commands.EventHub.Models.PSEventHubClusterAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ICluster
.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubClusterAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ICluster
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models. PSEventHubsAvailableCluster[]
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IAvailableCluster
.Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEventhub
.-InputObject
would be removed as it is not supported for Creation operation and is available for use after resource is created.-InputObject
and output type of the cmdlet have been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEventhub
. CaptureDescription class data members would be flattened and would directly be accessible as data members within Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEventhub
. Please refer to example on top to know more.-InputObject
parameter set would have a change in behaviour. Refer the section to know more.-InputObject
parameter would no longer support alias -EventHubObj
.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEventhub
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEventhub
.-MaxCount
has been removed. Use -Skip
and -Top
for pagination use case.-NamespaceObject
is being replaced by -InputObject
of type Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IEventhub
.Microsoft.Azure.Commands.EventHub.Models.PSEventHubPrivateEndpointConnectionAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IPrivateEndpointConnection
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubPrivateEndpointConnectionAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IPrivateEndpointConnection
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubPrivateEndpointConnectionAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IPrivateEndpointConnection
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubPrivateLinkResourceAttributes[]
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IPrivateLinkResourcesListResult
.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IArmDisasterRecovery
.Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IArmDisasterRecovery
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IArmDisasterRecovery
.-InputObject
and -ResourceId
are not supported during resource creation, hence are being removed.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IArmDisasterRecovery
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IArmDisasterRecovery
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.IArmDisasterRecovery
.Microsoft.Azure.Commands.EventHub.Models.PSEventHubsSchemaRegistryAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ISchemaGroup
.Microsoft.Azure.Commands.EventHub.Models.PSEventHubsSchemaRegistryAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ISchemaGroup
.-ResourceId
parameter would be deprecated. Henceforth, resource id can be provided as input to -InputObject
parameter.-InputObject
has been changed from Microsoft.Azure.Commands.EventHub.Models.PSEventHubsSchemaRegistryAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ISchemaGroup
.Microsoft.Azure.Commands.EventHub.Models. PSCheckNameAvailabilityResultAttributes
to
Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.Api202201Preview.ICheckNameAvailabilityResult
.משוב של Azure PowerShell
Azure PowerShell הוא פרויקט קוד פתוח. בחר קישור כדי לספק משוב:
הדרכה
מודול
סיור במרכזי האירועים של Azure - Training
למד כיצד מרכזי האירועים של Azure לוכדים אירועים וכיצד לשנות את קנה המידה של יישום העיבוד שלך.
תיעוד
Azure Microsoft.ManagedIdentity/identities syntax and properties to use in Azure Resource Manager templates for deploying the resource. API version 2023-07-31-preview
Azure Microsoft.DocumentDB/databaseAccounts syntax and properties to use in Azure Resource Manager templates for deploying the resource. API version 2024-09-01-preview
Microsoft.EventHub/namespaces 2021-01-01-preview - Bicep, ARM template & Terraform AzAPI reference
Azure Microsoft.EventHub/namespaces syntax and properties to use in Azure Resource Manager templates for deploying the resource. API version 2021-01-01-preview
Azure Microsoft.EventGrid/systemTopics syntax and properties to use in Azure Resource Manager templates for deploying the resource. API version 2024-12-15-preview