az datadog tag-rule
Note
This reference is part of the datadog extension for the Azure CLI (version 2.70.0 or higher). 擴充功能會在您第一次執行 az datadog tag-rule 命令時自動安裝。 Learn more about extensions.
提供一組命令來管理 Datadog 監視資源的標記規則,可讓您根據其標籤制製哪些 Azure 資源受到監視。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az datadog tag-rule create |
為特定的 Datadog 監視資源建立一組新的標籤規則,根據其標籤判斷要監視哪些 Azure 資源。 |
Extension | GA |
az datadog tag-rule list |
列出與特定 Datadog 監視資源相關聯的所有標籤規則,協助您管理和稽核控制資源監視的規則。 |
Extension | GA |
az datadog tag-rule show |
擷取特定 Datadog 監視資源的標記規則詳細數據,提供其設定和狀態的深入解析。 |
Extension | GA |
az datadog tag-rule update |
更新特定 Datadog 監視資源的卷標規則,讓您修改控制要監視哪些 Azure 資源的規則。 |
Extension | GA |
az datadog tag-rule create
為特定的 Datadog 監視資源建立一組新的標籤規則,根據其標籤判斷要監視哪些 Azure 資源。
az datadog tag-rule create --monitor-name --name
--resource-group
--rule-set-name
[--log-rules]
[--metric-rules]
範例
TagRules_CreateOrUpdate
az datadog tag-rule create --resource-group myResourceGroup --monitor-name myMonitor --rule-set-name default --log-rules "{send-aad-logs:False,send-subscription-logs:True,send-resource-logs:True,filtering-tags:[{name:Environment,value:Prod,action:Include},{name:Environment,value:Dev,action:Exclude}]}" --metric-rules "{filtering-tags:[]}"
必要參數
監視資源名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
規則集名稱。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一組規則,用於傳送監視資源的記錄。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
屬性 | 值 |
---|---|
Parameter group: | Properties Arguments |
一組規則,用於傳送監視資源的計量。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
屬性 | 值 |
---|---|
Parameter group: | Properties Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az datadog tag-rule list
列出與特定 Datadog 監視資源相關聯的所有標籤規則,協助您管理和稽核控制資源監視的規則。
az datadog tag-rule list --monitor-name --name
--resource-group
[--max-items]
[--next-token]
範例
TagRules_List
az datadog tag-rule list --resource-group myResourceGroup --monitor-name myMonitor
必要參數
監視資源名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的 --next-token
自變數中提供令牌值。
屬性 | 值 |
---|---|
Parameter group: | Pagination Arguments |
標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。
屬性 | 值 |
---|---|
Parameter group: | Pagination Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az datadog tag-rule show
擷取特定 Datadog 監視資源的標記規則詳細數據,提供其設定和狀態的深入解析。
az datadog tag-rule show [--ids]
[--monitor-name --name]
[--resource-group]
[--rule-set-name]
[--subscription]
範例
TagRules_Get
az datadog tag-rule show --resource-group myResourceGroup --monitor-name myMonitor --rule-set-name default
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
監視資源名稱。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
規則集名稱。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az datadog tag-rule update
更新特定 Datadog 監視資源的卷標規則,讓您修改控制要監視哪些 Azure 資源的規則。
az datadog tag-rule update [--add]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--log-rules]
[--metric-rules]
[--monitor-name --name]
[--remove]
[--resource-group]
[--rule-set-name]
[--set]
[--subscription]
範例
TagRule_update
az datadog tag-rule update --resource-group myResourceGroup --monitor-name myMonitor --rule-set-name default --log-rules "{send-aad-logs:False,send-subscription-logs:True,send-resource-logs:True,filtering-tags:[{name:Environment,value:Prod,action:Include},{name:Environment,value:Dev,action:Exclude}]}" --metric-rules "{filtering-tags:[]}"
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例: --add property.listProperty <key=value, string or JSON string>
.
屬性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。
屬性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
一組規則,用於傳送監視資源的記錄。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
屬性 | 值 |
---|---|
Parameter group: | Properties Arguments |
一組規則,用於傳送監視資源的計量。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
屬性 | 值 |
---|---|
Parameter group: | Properties Arguments |
監視資源名稱。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>
或 --remove propertyToRemove
。
屬性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
規則集名稱。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
指定要設定的屬性路徑和值,以更新物件。 範例: --set property1.property2=<value>
.
屬性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |