az monitor log-analytics workspace
管理 Azure Log Analytics 工作区。
命令
az monitor log-analytics workspace create
创建工作区实例。
az monitor log-analytics workspace create --name --workspace-name
--resource-group
[--capacity-reservation-level --level {100, 1000, 10000, 200, 2000, 25000, 300, 400, 500, 5000, 50000}]
[--identity-type --type {None, SystemAssigned, UserAssigned}]
[--ingestion-access {Disabled, Enabled}]
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--query-access {Disabled, Enabled}]
[--quota]
[--replication-enabled {0, 1, f, false, n, no, t, true, y, yes}]
[--replication-location]
[--retention-time]
[--sku --sku-name {CapacityReservation, Free, LACluster, PerGB2018, PerNode, Premium, Standalone, Standard}]
[--tags]
[--user-assigned]
示例
创建工作区实例
az monitor log-analytics workspace create -g MyResourceGroup -n MyWorkspace
必需参数
Log Analytics 工作区的名称。
资源组的名称。 可以使用 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.
选择 CapacityReservation sku 时,此工作区的容量预留级别。 最大值为 1000,并且必须位于 100 的倍数中。 如果要增加限制,请联系 LAIngestionRate@microsoft.com。
属性 | 值 |
---|---|
Parameter group: | Sku Arguments |
接受的值: | 100, 1000, 10000, 200, 2000, 25000, 300, 400, 500, 5000, 50000 |
托管服务标识的类型。
属性 | 值 |
---|---|
Parameter group: | Identity Arguments |
接受的值: | None, SystemAssigned, UserAssigned |
用于访问工作区引入的公共网络访问类型。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
默认值: | Enabled |
接受的值: | Disabled, Enabled |
未指定资源所在的地理位置,将使用资源组的位置。
属性 | 值 |
---|---|
Parameter group: | Parameters Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
用于访问工作区查询的公共网络访问类型。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
默认值: | Enabled |
接受的值: | Disabled, Enabled |
引入的工作区每日配额(以 GB 为单位)。 最小值为 0.023,默认值为 -1 这意味着无限制。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
指定是否启用复制。 如果为 true,工作区配置和数据将复制到指定位置。 如果已启用复制,则必须提供位置。
属性 | 值 |
---|---|
Parameter group: | Replication Arguments |
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
复制的位置。
属性 | 值 |
---|---|
Parameter group: | Replication Arguments |
工作区数据保留期(以天为单位)。 允许的值按定价计划进行。 有关详细信息,请参阅定价层文档。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
默认值: | 30 |
SKU 的名称。
属性 | 值 |
---|---|
Parameter group: | Sku Arguments |
默认值: | PerGB2018 |
接受的值: | CapacityReservation, Free, LACluster, PerGB2018, PerNode, Premium, Standalone, Standard |
Resource tags. 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | Parameters Arguments |
与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | Identity Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace delete
删除工作区资源。
该名称保留 14 天,不能用于另一个工作区。 若要完全删除工作区并释放名称,请使用 --force 标志。
az monitor log-analytics workspace delete [--force {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--name --workspace-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--yes]
示例
软删除工作区实例。
az monitor log-analytics workspace delete --resource-group MyResourceGroup --workspace-name MyWorkspace
完全删除工作区实例。
az monitor log-analytics workspace delete --force --resource-group MyResourceGroup --workspace-name MyWorkspace
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
删除没有恢复选项的工作区。 无法恢复使用此标志删除的工作区。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Log Analytics 工作区的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace failback
停用指定工作区的故障转移。故障回复作是异步的,最长可能需要 30 分钟才能完成。可以使用响应中返回的 operationId 检查作的状态。
az monitor log-analytics workspace failback [--ids]
[--name --workspace-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
示例
指定工作区的取消活动故障转移
az monitor log-analytics workspace failback --resource-group oiautorest6685 --workspace-name oiautorest6685
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
工作区的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 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 monitor log-analytics workspace failover
激活指定工作区的故障转移。指定的复制位置必须与此工作区的已启用复制的位置匹配。故障转移作是异步的,最长可能需要 30 分钟才能完成。可以使用响应中返回的 operationId 检查作的状态。
az monitor log-analytics workspace failover [--ids]
[--location]
[--name --workspace-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
示例
激活指定工作区的故障转移
az monitor log-analytics workspace failover --resource-group oiautorest6685 --location eastus --workspace-name oiautorest6685
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Location.
az account list-locations
中的值。 可以使用 az configure --defaults location=<location>
配置默认位置。 如果未指定,将使用资源组的位置。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
工作区的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 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 monitor log-analytics workspace get-schema
获取给定工作区的架构。
架构表示工作区的内部结构,可在查询期间使用。 有关详细信息,请访问:https://learn.microsoft.com/en-us/rest/api/loganalytics/workspace-schema/get。
az monitor log-analytics workspace get-schema --name --workspace-name
--resource-group
示例
获取给定工作区的架构。
az monitor log-analytics workspace get-schema --resource-group MyResourceGroup --workspace-name MyWorkspace
必需参数
工作区的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace get-shared-keys
获取工作区的共享密钥。
az monitor log-analytics workspace get-shared-keys --name --workspace-name
--resource-group
示例
获取工作区的共享密钥。
az monitor log-analytics workspace get-shared-keys --resource-group MyResourceGroup --workspace-name MyWorkspace
必需参数
工作区的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace list
获取资源组或订阅下工作区的列表。
az monitor log-analytics workspace list [--resource-group]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace list-available-service-tier
列出工作区的可用服务层。
az monitor log-analytics workspace list-available-service-tier [--ids]
[--resource-group]
[--subscription]
[--workspace-name]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
工作区的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace list-deleted-workspaces
获取可在订阅或资源组中恢复的已删除工作区的列表。
az monitor log-analytics workspace list-deleted-workspaces [--resource-group]
示例
获取可在资源组中恢复的已删除工作区的列表
az monitor log-analytics workspace list-deleted-workspaces --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace list-link-target
列出当前用户具有管理员权限且未与 Azure 订阅关联的工作区的列表。
az monitor log-analytics workspace list-link-target
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace list-management-groups
获取连接到工作区的管理组的列表。
az monitor log-analytics workspace list-management-groups --name --workspace-name
--resource-group
示例
获取连接到工作区的管理组的列表。
az monitor log-analytics workspace list-management-groups --resource-group MyResourceGroup --workspace-name MyWorkspace
必需参数
工作区的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace list-usages
获取工作区的使用指标列表。
az monitor log-analytics workspace list-usages --name --workspace-name
--resource-group
示例
获取工作区的使用指标列表。
az monitor log-analytics workspace list-usages --resource-group MyResourceGroup --workspace-name MyWorkspace
必需参数
工作区的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace recover
在 14 天内恢复处于软删除状态的工作区。
az monitor log-analytics workspace recover --workspace-name
[--no-wait]
[--resource-group]
示例
在 14 天内恢复处于软删除状态的工作区
az monitor log-analytics workspace recover --resource-group MyResourceGroup -n MyWorkspace
必需参数
Log Analytics 工作区的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace show
显示工作区实例。
az monitor log-analytics workspace show [--ids]
[--name --workspace-name]
[--resource-group]
[--subscription]
示例
显示工作区实例。
az monitor log-analytics workspace show --resource-group MyResourceGroup --workspace-name MyWorkspace
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Log Analytics 工作区的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 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 monitor log-analytics workspace update
更新工作区实例。
az monitor log-analytics workspace update [--add]
[--capacity-reservation-level --level {100, 1000, 10000, 200, 2000, 25000, 300, 400, 500, 5000, 50000}]
[--data-collection-rule]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--identity-type --type {None, SystemAssigned, UserAssigned}]
[--ids]
[--ingestion-access {Disabled, Enabled}]
[--name --workspace-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--query-access {Disabled, Enabled}]
[--quota]
[--remove]
[--replication-enabled {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--retention-time]
[--set]
[--sku --sku-name {CapacityReservation, Free, LACluster, PerGB2018, PerNode, Premium, Standalone, Standard}]
[--subscription]
[--tags]
[--user-assigned]
示例
更新工作区实例。
az monitor log-analytics workspace update --resource-group myresourcegroup --retention-time 30 --workspace-name myworkspace
更新工作区的 defaultDataCollectionRuleResourceId
az monitor log-analytics workspace update --resource-group myresourcegroup --workspace-name myworkspace --data-collection-rule "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}".
可选参数
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 |
选择 CapacityReservation sku 时,此工作区的容量预留级别。 最大值为 1000,并且必须位于 100 的倍数中。 如果要增加限制,请联系 LAIngestionRate@microsoft.com。
属性 | 值 |
---|---|
Parameter group: | Sku Arguments |
接受的值: | 100, 1000, 10000, 200, 2000, 25000, 300, 400, 500, 5000, 50000 |
要用于此工作区的默认数据收集规则的资源 ID。 预期格式为 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
托管服务标识的类型。
属性 | 值 |
---|---|
Parameter group: | Identity Arguments |
接受的值: | None, SystemAssigned, UserAssigned |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
用于访问工作区引入的公共网络访问类型。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
接受的值: | Disabled, Enabled |
Log Analytics 工作区的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
用于访问工作区查询的公共网络访问类型。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
接受的值: | Disabled, Enabled |
引入的工作区每日配额(以 GB 为单位)。 最小值为 0.023,默认值为 -1 这意味着无限制。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
指定是否启用复制。 如果为 true,工作区配置和数据将复制到指定位置。 如果已启用复制,则必须提供位置。
属性 | 值 |
---|---|
Parameter group: | Replication Arguments |
接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
工作区数据保留期(以天为单位)。 允许的值按定价计划进行。 有关详细信息,请参阅定价层文档。
属性 | 值 |
---|---|
Parameter group: | Properties Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
SKU 的名称。
属性 | 值 |
---|---|
Parameter group: | Sku Arguments |
接受的值: | CapacityReservation, Free, LACluster, PerGB2018, PerNode, Premium, Standalone, Standard |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Resource tags. 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | Parameters Arguments |
与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
属性 | 值 |
---|---|
Parameter group: | Identity Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az monitor log-analytics workspace wait
将 CLI 置于等待状态,直到满足条件。
az monitor log-analytics workspace wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name --workspace-name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
等待在“Succeeded”中使用“provisioningState”创建。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
等到删除为止。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
等待资源存在。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
轮询间隔(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 30 |
Log Analytics 工作区的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
最大等待(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |