你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az kusto script

Note

此参考是 Azure CLI(版本 2.15.0 或更高版本)的 kusto 扩展的一部分。 该扩展会在首次运行 az kusto script 命令时自动安装。 了解更多关于扩展的信息。

命令组“kusto”是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

使用 kusto 管理脚本。

命令

名称 说明 类型 Status
az kusto script create

创建 Kusto 数据库脚本。

Extension Experimental
az kusto script delete

删除 Kusto principalAssignment。

Extension Experimental
az kusto script list

返回给定数据库的数据库脚本列表。

Extension Experimental
az kusto script show

获取 Kusto 群集数据库脚本。

Extension Experimental
az kusto script update

更新数据库脚本。

Extension Experimental
az kusto script wait

将 CLI 置于等待状态,直到满足 kusto 脚本的条件。

Extension Experimental

az kusto script create

实验

命令组“kusto”是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

创建 Kusto 数据库脚本。

az kusto script create --cluster-name
                       --database-name
                       --name --script-name
                       --resource-group
                       [--continue-on-errors {false, true}]
                       [--force-update-tag]
                       [--no-wait]
                       [--script-content]
                       [--script-url]
                       [--script-url-sas-token]

示例

KustoScriptsCreateOrUpdate

az kusto script create --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --continue-on-errors true --force-update-tag "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe" --script-url "https://mysa.blob.core.windows.net/container/script.txt" --script-url-sas-token "?sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=********************************" --resource-group "kustorptest" --name "kustoScript1"

必需参数

--cluster-name

Kusto 群集的名称。

--database-name

Kusto 群集中数据库的名称。

--name --script-name -n

Kusto 数据库脚本的名称。

--resource-group -g

资源组的名称。 可以使用 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.

--continue-on-errors

指示命令之一失败时是否继续的标志。

属性
接受的值: false, true
--force-update-tag

唯一的字符串。 如果更改了脚本,将再次应用该脚本。

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--script-content

脚本内容。 当脚本提供内联而不是通过 SA 中的文件时,应使用此属性。 不得与 scriptUrl 和 scriptUrlSasToken 属性一起使用。

--script-url

KQL 脚本 Blob 文件的 URL。 不得与 scriptContent 属性一起使用。

--script-url-sas-token

提供对包含脚本的文件的读取访问权限的 SaS 令牌。 在使用 scriptUrl 属性时必须提供。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az kusto script delete

实验

命令组“kusto”是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

删除 Kusto principalAssignment。

az kusto script delete [--cluster-name]
                       [--database-name]
                       [--ids]
                       [--name --script-name]
                       [--no-wait]
                       [--resource-group]
                       [--subscription]
                       [--yes]

示例

KustoScriptsDelete

az kusto script delete --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --resource-group "kustorptest" --name "kustoScript1"

可选参数

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

--cluster-name

Kusto 群集的名称。

属性
Parameter group: Resource Id Arguments
--database-name

Kusto 群集中数据库的名称。

属性
Parameter group: Resource Id Arguments
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name --script-name -n

Kusto 数据库脚本的名称。

属性
Parameter group: Resource Id Arguments
--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
--yes -y

不要提示确认。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az kusto script list

实验

命令组“kusto”是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

返回给定数据库的数据库脚本列表。

az kusto script list --cluster-name
                     --database-name
                     --resource-group

示例

KustoScriptsList

az kusto script list --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest"

必需参数

--cluster-name

Kusto 群集的名称。

--database-name

Kusto 群集中数据库的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az kusto script show

实验

命令组“kusto”是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

获取 Kusto 群集数据库脚本。

az kusto script show [--cluster-name]
                     [--database-name]
                     [--ids]
                     [--name --script-name]
                     [--resource-group]
                     [--subscription]

示例

KustoScriptsGet

az kusto script show --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1"

可选参数

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

--cluster-name

Kusto 群集的名称。

属性
Parameter group: Resource Id Arguments
--database-name

Kusto 群集中数据库的名称。

属性
Parameter group: Resource Id Arguments
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name --script-name -n

Kusto 数据库脚本的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az kusto script update

实验

命令组“kusto”是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

更新数据库脚本。

az kusto script update [--cluster-name]
                       [--continue-on-errors {false, true}]
                       [--database-name]
                       [--force-update-tag]
                       [--ids]
                       [--name --script-name]
                       [--no-wait]
                       [--resource-group]
                       [--script-content]
                       [--script-url]
                       [--script-url-sas-token]
                       [--subscription]

示例

KustoScriptsUpdate

az kusto script update --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --continue-on-errors true --force-update-tag "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe" --script-url "https://mysa.blob.core.windows.net/container/script.txt" --script-url-sas-token "?sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=********************************" --resource-group "kustorptest" --name "kustoScript1"

可选参数

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

--cluster-name

Kusto 群集的名称。

属性
Parameter group: Resource Id Arguments
--continue-on-errors

指示命令之一失败时是否继续的标志。

属性
接受的值: false, true
--database-name

Kusto 群集中数据库的名称。

属性
Parameter group: Resource Id Arguments
--force-update-tag

唯一的字符串。 如果更改了脚本,将再次应用该脚本。

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name --script-name -n

Kusto 数据库脚本的名称。

属性
Parameter group: Resource Id Arguments
--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--script-content

脚本内容。 当脚本提供内联而不是通过 SA 中的文件时,应使用此属性。 不得与 scriptUrl 和 scriptUrlSasToken 属性一起使用。

--script-url

KQL 脚本 Blob 文件的 URL。 不得与 scriptContent 属性一起使用。

--script-url-sas-token

提供对包含脚本的文件的读取访问权限的 SaS 令牌。 在使用 scriptUrl 属性时必须提供。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az kusto script wait

实验

命令组“kusto”是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus

将 CLI 置于等待状态,直到满足 kusto 脚本的条件。

az kusto script wait [--cluster-name]
                     [--created]
                     [--custom]
                     [--database-name]
                     [--deleted]
                     [--exists]
                     [--ids]
                     [--interval]
                     [--name --script-name]
                     [--resource-group]
                     [--subscription]
                     [--timeout]
                     [--updated]

示例

暂停执行下一行 CLI 脚本,直到成功创建 kusto 脚本。

az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --created

暂停执行下一行 CLI 脚本,直到 kusto 脚本成功更新。

az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --updated

暂停执行下一行 CLI 脚本,直到成功删除 kusto 脚本。

az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --deleted

可选参数

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

--cluster-name

Kusto 群集的名称。

属性
Parameter group: Resource Id Arguments
--created

等待在“Succeeded”中使用“provisioningState”创建。

属性
Parameter group: Wait Condition Arguments
默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

属性
Parameter group: Wait Condition Arguments
--database-name

Kusto 群集中数据库的名称。

属性
Parameter group: Resource Id Arguments
--deleted

等到删除为止。

属性
Parameter group: Wait Condition Arguments
默认值: False
--exists

等待资源存在。

属性
Parameter group: Wait Condition Arguments
默认值: False
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--interval

轮询间隔(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 30
--name --script-name -n

Kusto 数据库脚本的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
--timeout

最大等待(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

属性
Parameter group: Wait Condition Arguments
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False