az sphere product

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

操作 描述
az sphere product create 在资源组和目录中创建新产品。
az sphere product update 更新资源组和目录中的产品详细信息。
az sphere product delete 删除指定的产品。
az sphere product list 列出资源组和目录中的所有产品。
az sphere product show 显示资源组和目录中产品的详细信息。

命令

az sphere product create

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

必需参数

参数 描述
--name -n 要下载的证书。 指定名称。 如果未提供任何名称,则会下载活动证书。 值来自: az sphere ca
--description -d 产品说明。
--no-default-device-groups 如果已设置,则不会为此产品创建默认设备组。
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

在资源组 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

az sphere product update

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

必需参数

参数 描述
--product -p 产品名称。 值来自: az sphere product list
--description -d 要将产品更新到的新产品说明。
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

更新产品的属性。

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

az sphere product delete

删除指定的产品。

必需参数

参数 描述
--product -p 产品名称。 值来自: az sphere product list
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

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

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

az sphere product list

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

必需参数

参数 描述
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

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

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

az sphere product show

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

必需参数

参数 描述
--product -p 产品名称。 值来自: az sphere product list
--catalog -c 要在其中执行此操作的 Azure Sphere 目录。 指定 Azure Sphere 目录名称。 可以使用 配置默认的 Azure Sphere 目录 az config set defaults.sphere.catalog=<name>。 中的值: az sphere catalog list
--resource-group -r Azure 资源组的名称。 可以使用 配置默认组 az config set defaults.group=<name>。 中的值: az group list

例子

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

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