共用方式為


az tsi event-source eventhub

注意

此參考是 Azure CLI 的 timeseriesinsights 延伸模組的一部分 (2.50.0 版或更高版本)。 擴充功能會在您第一次執行 az tsi event-source eventhub 命令時自動安裝。 深入了解擴充功能。

使用 timeseriesinsights 子群組事件中樞來管理事件來源。

命令

名稱 Description 類型 狀態
az tsi event-source eventhub create

在指定的環境中建立事件來源。

擴充 GA
az tsi event-source eventhub update

在指定的環境中更新事件來源。

擴充 GA

az tsi event-source eventhub create

在指定的環境中建立事件來源。

az tsi event-source eventhub create --consumer-group-name
                                    --environment-name
                                    --event-hub-name
                                    --event-source-name
                                    --event-source-resource-id
                                    --key-name
                                    --location
                                    --namespace
                                    --resource-group
                                    --shared-access-key
                                    [--local-timestamp]
                                    [--tags]
                                    [--timestamp-property-name]

範例

CreateEventHubEventSource

az tsi event-source eventhub create --environment-name "env1" --name "es1" --location westus --consumer-group-name "cgn" --event-hub-name "ehn" --event-source-resource-id "somePathInArm" --key-name "managementKey" --service-bus-namespace "sbn" --shared-access-key "someSecretvalue" --timestamp-property-name "someTimestampProperty" --resource-group "rg1"

必要參數

--consumer-group-name

事件中樞取用者群組的名稱,此群組會保存要從中讀取事件的資料分割。

--environment-name

與指定資源群組相關聯的時間序列深入解析環境名稱。

--event-hub-name

事件中樞的名稱。

--event-source-name --name -n

與指定環境相關聯的時間序列深入解析事件來源名稱。

--event-source-resource-id --resource-id

Azure Resource Manager 中事件來源的資源識別碼。

--key-name --shared-access-policy-name

授與事件中樞之時間序列深入解析服務存取權的 SAS 金鑰名稱。 此金鑰的共用存取原則必須授與事件中樞的「接聽」許可權。

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--namespace --service-bus-namespace

包含事件中樞的服務匯流排名稱。

--resource-group -g

環境資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--shared-access-key

授與時間序列深入解析服務讀取事件中樞之共用存取金鑰的值。 這個屬性不會顯示在事件來源回應中。

選擇性參數

--local-timestamp

物件,表示本機時間戳屬性。 其中包含需要使用的本機時間戳格式,以及對應的時區位移資訊。 如果未為 localTimestamp 指定值,或為 null,則不會使用事件輸入本機時間戳。 預期值:json-string/@json-file。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

--timestamp-property-name --ts-property-name

將做為事件來源時間戳記的事件屬性。 如果未為 timestampPropertyName 指定值,或指定 null 或空字串,則會使用事件建立時間。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az tsi event-source eventhub update

在指定的環境中更新事件來源。

az tsi event-source eventhub update [--environment-name]
                                    [--event-source-name]
                                    [--ids]
                                    [--local-timestamp]
                                    [--resource-group]
                                    [--shared-access-key]
                                    [--subscription]
                                    [--tags]
                                    [--timestamp-property-name]

範例

UpdateEventHubEventSource

az tsi event-source eventhub update --environment-name "env1" --name "es1" --shared-access-key "someSecretvalue" --timestamp-property-name "someTimestampProperty" --resource-group "rg1"

選擇性參數

--environment-name

與指定資源群組相關聯的時間序列深入解析環境名稱。

--event-source-name --name -n

與指定環境相關聯的時間序列深入解析事件來源名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--local-timestamp

物件,表示本機時間戳屬性。 其中包含需要使用的本機時間戳格式,以及對應的時區位移資訊。 如果未為 localTimestamp 指定值,或為 null,則不會使用事件輸入本機時間戳。 預期值:json-string/@json-file。

--resource-group -g

環境資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--shared-access-key

授與時間序列深入解析服務讀取事件中樞之共用存取金鑰的值。 這個屬性不會顯示在事件來源回應中。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

--timestamp-property-name --ts-property-name

將做為事件來源時間戳記的事件屬性。 如果未為 timestampPropertyName 指定值,或指定 null 或空字串,則會使用事件建立時間。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。