Share via


az eventhubs eventhub

Manage Azure EventHubs eventhub and authorization-rule.

Commands

Name Description Type Status
az eventhubs eventhub authorization-rule

Eventhub authorization rule.

Core GA
az eventhubs eventhub authorization-rule create

Create an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.

Core GA
az eventhubs eventhub authorization-rule delete

Delete an Event Hub AuthorizationRule.

Core GA
az eventhubs eventhub authorization-rule keys

Authorization-rule keys.

Core GA
az eventhubs eventhub authorization-rule keys list

Gets the ACS and SAS connection strings for the Event Hub.

Core GA
az eventhubs eventhub authorization-rule keys renew

Regenerates the ACS and SAS connection strings for the Event Hub.

Core GA
az eventhubs eventhub authorization-rule list

List the authorization rules for an Event Hub.

Core GA
az eventhubs eventhub authorization-rule show

Get an AuthorizationRule for an Event Hub by rule name.

Core GA
az eventhubs eventhub authorization-rule update

Update an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.

Core GA
az eventhubs eventhub consumer-group

Manage Azure Event Hubs consumergroup.

Core GA
az eventhubs eventhub consumer-group create

Create an Event Hubs consumer group as a nested resource within a Namespace.

Core GA
az eventhubs eventhub consumer-group delete

Delete a consumer group from the specified Event Hub and resource group.

Core GA
az eventhubs eventhub consumer-group list

List all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.

Core GA
az eventhubs eventhub consumer-group show

Get a description for the specified consumer group.

Core GA
az eventhubs eventhub consumer-group update

Update an Event Hubs consumer group as a nested resource within a Namespace.

Core GA
az eventhubs eventhub create

Creates the EventHubs Eventhub.

Core GA
az eventhubs eventhub delete

Delete an Event Hub from the specified Namespace and resource group.

Core GA
az eventhubs eventhub list

List all the Event Hubs in a Namespace.

Core GA
az eventhubs eventhub show

Get an Event Hubs description for the specified Event Hub.

Core GA
az eventhubs eventhub update

Update a new Event Hub as a nested resource within a Namespace.

Core GA

az eventhubs eventhub create

Creates the EventHubs Eventhub.

az eventhubs eventhub create --name
                             --namespace-name
                             --resource-group
                             [--archive-name-format]
                             [--blob-container]
                             [--capture-interval]
                             [--capture-size-limit]
                             [--cleanup-policy {Compact, Delete, DeleteOrCompact}]
                             [--destination-name]
                             [--enable-capture {false, true}]
                             [--mi-system-assigned {false, true}]
                             [--mi-user-assigned]
                             [--min-compaction-lag-in-mins --min-lag]
                             [--partition-count]
                             [--retention-time --retention-time-in-hours]
                             [--skip-empty-archives {false, true}]
                             [--status {Active, Disabled, SendDisabled}]
                             [--storage-account]
                             [--timestamp-type {Create, LogAppend}]
                             [--tombstone-retention-time-in-hours --tombstone-time]
                             [--user-metadata]

Examples

Create a new Eventhub.

az eventhubs eventhub create --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub --cleanup-policy Delete --partition-count 15

Required Parameters

--name -n

Name of Eventhub.

--namespace-name

Name of Namespace.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--archive-name-format

Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order.

Property Value
Parameter group: Capture-Destination Arguments
--blob-container

Blob container Name.

Property Value
Parameter group: Capture-Destination Arguments
--capture-interval

Allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds.

Property Value
Parameter group: Capture Arguments
--capture-size-limit

Defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes.

Property Value
Parameter group: Capture Arguments
--cleanup-policy

Enumerates the possible values for cleanup policy.

Property Value
Parameter group: Retention-Description Arguments
Accepted values: Compact, Delete, DeleteOrCompact
--destination-name

Name for capture destination, should be EventHubArchive.AzureBlockBlob.

Property Value
Parameter group: Capture-Destination Arguments
--enable-capture

A boolean value that indicates whether capture is enabled.

Property Value
Parameter group: Capture Arguments
Accepted values: false, true
--mi-system-assigned

Enable System Assigned Identity.

Property Value
Parameter group: Capture-Destination Arguments
Default value: False
Accepted values: false, true
--mi-user-assigned

List of User Assigned Identity ids.

Property Value
Parameter group: Capture-Destination Arguments
--min-compaction-lag-in-mins --min-lag

The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.

Property Value
Parameter group: Retention-Description Arguments
--partition-count

Number of partitions created for the Event Hub. By default, allowed values are 2-32. Lower value of 1 is supported with Kafka enabled namespaces. In presence of a custom quota, the upper limit will match the upper limit of the quota.

--retention-time --retention-time-in-hours

Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compaction the returned value of this property is Long.MaxValue.

Property Value
Parameter group: Retention-Description Arguments
--skip-empty-archives

A boolean value that indicates whether to Skip Empty.

Property Value
Accepted values: false, true
--status

Status of Eventhub.

Property Value
Accepted values: Active, Disabled, SendDisabled
--storage-account

Name (if within same resource group and not of type Classic Storage) or ARM id of the storage account to be used to create the blobs.

Property Value
Parameter group: Capture-Destination Arguments
--timestamp-type

Denotes the type of timestamp the message will hold.

Property Value
Accepted values: Create, LogAppend
--tombstone-retention-time-in-hours --tombstone-time

Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compaction. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub.

Property Value
Parameter group: Retention-Description Arguments
--user-metadata

Gets and Sets Metadata of User.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az eventhubs eventhub delete

Delete an Event Hub from the specified Namespace and resource group.

az eventhubs eventhub delete [--event-hub-name --name]
                             [--ids]
                             [--namespace-name]
                             [--resource-group]
                             [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--event-hub-name --name -n

The Event Hub name.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--namespace-name

The Namespace name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az eventhubs eventhub list

List all the Event Hubs in a Namespace.

az eventhubs eventhub list --namespace-name
                           --resource-group
                           [--max-items]
                           [--next-token]
                           [--skip]
                           [--top]

Required Parameters

--namespace-name

The Namespace name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
--skip

Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls.

--top

May be used to limit the number of results to the most recent N usageDetails.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az eventhubs eventhub show

Get an Event Hubs description for the specified Event Hub.

az eventhubs eventhub show [--event-hub-name --name]
                           [--ids]
                           [--namespace-name]
                           [--resource-group]
                           [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--event-hub-name --name -n

The Event Hub name.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--namespace-name

The Namespace name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az eventhubs eventhub update

Update a new Event Hub as a nested resource within a Namespace.

az eventhubs eventhub update [--add]
                             [--archive-name-format]
                             [--blob-container]
                             [--capture-interval]
                             [--capture-size-limit]
                             [--cleanup-policy {Compact, Delete, DeleteOrCompact}]
                             [--destination-name]
                             [--enable-capture {0, 1, f, false, n, no, t, true, y, yes}]
                             [--encoding {Avro, AvroDeflate}]
                             [--event-hub-name --name]
                             [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                             [--identity]
                             [--ids]
                             [--min-compaction-lag-in-mins --min-lag]
                             [--namespace-name]
                             [--partition-count]
                             [--remove]
                             [--resource-group]
                             [--retention-time --retention-time-in-hours]
                             [--set]
                             [--skip-empty-archives {0, 1, f, false, n, no, t, true, y, yes}]
                             [--status {Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, Restoring, SendDisabled, Unknown}]
                             [--storage-account]
                             [--subscription]
                             [--timestamp-type {Create, LogAppend}]
                             [--tombstone-retention-time-in-hours]
                             [--user-metadata]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
--archive-name-format

Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order.

Property Value
Parameter group: CaptureDescription Arguments
--blob-container

Blob container Name.

Property Value
Parameter group: CaptureDescription Arguments
--capture-interval

The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds.

Property Value
Parameter group: CaptureDescription Arguments
--capture-size-limit

The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes.

Property Value
Parameter group: CaptureDescription Arguments
--cleanup-policy

Enumerates the possible values for cleanup policy.

Property Value
Parameter group: RetentionDescription Arguments
Accepted values: Compact, Delete, DeleteOrCompact
--destination-name

Name for capture destination.

Property Value
Parameter group: CaptureDescription Arguments
--enable-capture

A value that indicates whether capture description is enabled.

Property Value
Parameter group: CaptureDescription Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--encoding

Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version.

Property Value
Parameter group: CaptureDescription Arguments
Accepted values: Avro, AvroDeflate
--event-hub-name --name -n

The Event Hub name.

Property Value
Parameter group: Resource Id Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--identity

A value that indicates whether capture description is enabled. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Destination Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--min-compaction-lag-in-mins --min-lag

The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.

Property Value
Parameter group: RetentionDescription Arguments
--namespace-name

The Namespace name.

Property Value
Parameter group: Resource Id Arguments
--partition-count

Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.

Property Value
Parameter group: Properties Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--retention-time --retention-time-in-hours

Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compaction the returned value of this property is Long.MaxValue.

Property Value
Parameter group: RetentionDescription Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
--skip-empty-archives

A value that indicates whether to Skip Empty Archives.

Property Value
Parameter group: CaptureDescription Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--status

Enumerates the possible values for the status of the Event Hub.

Property Value
Parameter group: Properties Arguments
Accepted values: Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, Restoring, SendDisabled, Unknown
--storage-account

Resource id of the storage account to be used to create the blobs.

Property Value
Parameter group: CaptureDescription Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--timestamp-type

Denotes the type of timestamp the message will hold.Two types of timestamp types - "AppendTime" and "CreateTime". AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in which the message was generated on source side and producers can set this timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime and its behavior remains the same.

Property Value
Parameter group: MessageTimestampDescription Arguments
Accepted values: Create, LogAppend
--tombstone-retention-time-in-hours -t

Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compaction. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub.

Property Value
Parameter group: RetentionDescription Arguments
--user-metadata

Gets and Sets Metadata of User.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False