az ts
在订阅或资源组范围内管理模板规格。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az ts create |
创建模板规格和或模板规格版本。 |
Core | GA |
| az ts delete |
按名称或资源 ID 删除指定的模板规格或模板规格版本。 |
Core | GA |
| az ts export |
将指定的模板规格版本和项目(如果有)导出到指定的输出文件夹。 |
Core | GA |
| az ts list |
列出模板规格或模板规格版本。 |
Core | GA |
| az ts show |
获取指定的模板规格或模板规格版本。 |
Core | GA |
| az ts update |
更新模板规格版本。 |
Core | GA |
az ts create
创建模板规格和或模板规格版本。
az ts create --name
--resource-group
[--description]
[--display-name]
[--location]
[--tags]
[--template-file]
[--ui-form-definition]
[--version]
[--version-description]
[--yes]
示例
创建模板规格。
az ts create -g testRG --name TemplateSpecName -l WestUS --display-name "MyDisplayName" --description "Simple template spec" --tags key1=value1
创建模板规格版本。
az ts create -g testRG --name TemplateSpecName -v 2.0 -l WestUS --template-file templateSpec.json --version-description "Less simple template spec" --tags key1=value1 key3=value3
创建模板规格和模板规格的版本。
az ts create -g testRG --name TemplateSpecName -v 1.0 -l WestUS --template-file templateSpec.json --display-name "MyDisplayName" --description "Simple template spec" --version-description "Version of simple template spec" --tags key1=value1 key2=value2
必需参数
模板规格的名称。
资源组的名称。 可以使用 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.
父模板规格的说明。
模板规格的显示名称。
用于存储模板规格和模板规格版本的位置。 创建后无法更改。
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
文件系统中模板文件或 Bicep 文件的路径。
模板规格版本的文件系统中的 uiFormDefinition 文件路径。
模板规格版本。
模板规格版本的说明。
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ts delete
按名称或资源 ID 删除指定的模板规格或模板规格版本。
az ts delete [--name]
[--resource-group]
[--template-spec]
[--version]
[--yes]
示例
删除指定的模板规格和所有版本。
az ts delete -g MyResourceGroup --name TemplateSpecName
从模板规格中删除指定版本。
az ts delete -g MyResourceGroup --name TemplateSpecName --version VersionName
根据资源 ID 删除模板规格或版本。
az ts delete --template-spec resourceID
可选参数
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>配置默认组。
模板规格资源 ID。
模板规格版本。
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ts export
将指定的模板规格版本和项目(如果有)导出到指定的输出文件夹。
az ts export --output-folder
[--name]
[--resource-group]
[--template-spec]
[--version]
示例
基于资源 ID 导出指定的模板规格版本。
az ts export -s resourceID --output-folder C:/path/
导出指定的模板规格版本。
az ts export -g testrg --name TemplateSpecName --version VersionName --output-folder C:/path/
必需参数
要输出导出的现有文件夹。。
可选参数
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>配置默认组。
模板规格资源 ID。
模板规格版本。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ts list
列出模板规格或模板规格版本。
az ts list [--name]
[--resource-group]
示例
列出当前默认订阅中的所有模板规格。
az ts list
列出指定订阅中的所有模板规格。
az ts list --subscription Subscription
列出资源组中的所有模板规格。
az ts list -g MyResourceGroup
列出父模板规格的所有版本。
az ts list -g MyResourceGroup -n TemplateSpecName
可选参数
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 |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ts show
获取指定的模板规格或模板规格版本。
az ts show [--name]
[--resource-group]
[--template-spec]
[--version]
示例
显示指定的模板规格。
az ts show -g testrg --name TemplateSpecName
显示指定的模板规格版本。
az ts show -g testrg --name TemplateSpecName --version VersionName
根据资源 ID 显示指定的模板规格或模板规格版本。
az ts show --template-spec resourceID
可选参数
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>配置默认组。
模板规格资源 ID。
模板规格版本。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az ts update
更新模板规格版本。
az ts update [--description]
[--display-name]
[--name]
[--resource-group]
[--tags]
[--template-file]
[--template-spec]
[--ui-form-definition]
[--version]
[--version-description]
[--yes]
示例
根据资源 ID 更新模板规格或模板规格版本的模板内容。
az ts update --template-spec resourceID -f updatedFile.json
根据资源 ID 更新模板规格的显示名称和标记。
az ts update --template-spec resourceID --display-name "NewParentDisplayName" --tags key1=value1
不提示更新模板规格版本的说明。
az ts update -g ExistingRG --name ExistingName -v 3.0 --version-description "New description" --yes
更新模板规格版本的所有属性。
az ts update -g ExistingRG --name ExistingName -v 3.0 -f updatedTemplate.json --display-name "New parent display name" --description "New parent description" --version-description "New child description" --ui-form-definition formDefinition.json
从模板规格版本中删除标记(s),无需提示。
az ts update -g ExistingRG --name ExistingName -v 3.0 -f updatedTemplate.json --tags --yes
可选参数
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>配置默认组。
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
文件系统中模板文件或 Bicep 文件的路径。
模板规格资源 ID。
模板规格版本的文件系统中的 uiFormDefinition 文件路径。
模板规格版本。
模板规格版本的说明。
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |