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

az sphere product

注意

此参考是 Azure CLI(版本 2.45.0 或更高版本)的 azure-sphere 扩展的一部分。 该扩展将在首次运行 az sphere product 命令时自动安装。 详细了解扩展。

管理资源组和目录中的产品。

命令

名称 说明 类型 状态
az sphere product create

在资源组和目录中创建新产品。

扩展 GA
az sphere product delete

删除指定的产品。

扩展 GA
az sphere product list

列出资源组和目录中的所有产品。

扩展 GA
az sphere product show

在资源组和目录中显示产品的详细信息。

扩展 GA
az sphere product update

更新资源组和目录中的产品详细信息。

扩展 GA

az sphere product create

在资源组和目录中创建新产品。

az sphere product create --catalog
                         --description
                         --name
                         --resource-group
                         [--no-default-device-groups]

示例

在资源组“MyResourceGroup”和目录“MyCatalog”中创建新的产品“MyProduct”。

az sphere product create --resource-group MyResourceGroup --catalog MyCatalog --name MyProduct --description MyDescription

在资源组“MyResourceGroup”和目录“MyCatalog”中创建没有默认设备组的新产品“MyProduct”。

az sphere product create --resource-group MyResourceGroup --catalog MyCatalog --name MyProduct --description MyDescription --no-default-device-groups

必需参数

--catalog -c

要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 值来源:az sphere catalog list。

--description -d

产品的说明。

--name -n

产品的字母数字名称。

--resource-group -g

Azure 资源组的名称。 可以使用 az config set defaults.group=<name> 配置默认组。 值来源:az group list。

可选参数

--no-default-device-groups

如果已设置,则不会为此产品创建默认设备组。

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

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az sphere product delete

删除指定的产品。

az sphere product delete --catalog
                         --product
                         --resource-group

示例

使用资源组、目录名称和产品名称删除产品。

az sphere product delete --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct

必需参数

--catalog -c

要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 值来源:az sphere catalog list。

--product -p

产品名称。

值来自: az sphere product list
--resource-group -g

Azure 资源组的名称。 可以使用 az config set defaults.group=<name> 配置默认组。 值来源:az group list。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az sphere product list

列出资源组和目录中的所有产品。

az sphere product list --catalog
                       --resource-group

示例

列出资源组和目录中的所有产品。

az sphere product list --resource-group MyResourceGroup --catalog MyCatalog

必需参数

--catalog -c

要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 值来源:az sphere catalog list。

--resource-group -g

Azure 资源组的名称。 可以使用 az config set defaults.group=<name> 配置默认组。 值来源:az group list。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az sphere product show

在资源组和目录中显示产品的详细信息。

az sphere product show --catalog
                       --product
                       --resource-group

示例

使用资源组、目录名称和产品名称显示产品的详细信息。

az sphere product show --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct

必需参数

--catalog -c

要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 值来源:az sphere catalog list。

--product -p

产品名称。

值来自: az sphere product list
--resource-group -g

Azure 资源组的名称。 可以使用 az config set defaults.group=<name> 配置默认组。 值来源:az group list。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az sphere product update

更新资源组和目录中的产品详细信息。

az sphere product update --catalog
                         --description
                         --product
                         --resource-group

示例

更新产品的属性。

az sphere product update --resource-group MyResourceGroup --catalog MyCatalog --product MyProduct --description MyDescription

必需参数

--catalog -c

要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 值来源:az sphere catalog list。

--description -d

要将产品更新到的新产品说明。

--product -p

产品名称。

值来自: az sphere product list
--resource-group -g

Azure 资源组的名称。 可以使用 az config set defaults.group=<name> 配置默认组。 值来源:az group list。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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