Share via


az ts

Manage template specs at subscription or resource group scope.

Commands

Name Description Type Status
az ts create

Create a template spec and or template spec version.

Core GA
az ts delete

Delete a specified template spec or template spec version by name or resource ID..

Core GA
az ts export

Export the specified template spec version and artifacts (if any) to the specified output folder.

Core GA
az ts list

List template specs or template spec versions.

Core GA
az ts show

Get the specified template spec or template spec version.

Core GA
az ts update

Update a template spec version.

Core GA

az ts create

Create a template spec and or template spec version.

az ts create --name
             --resource-group
             [--description]
             [--display-name]
             [--location]
             [--tags]
             [--template-file]
             [--ui-form-definition]
             [--version]
             [--version-description]
             [--yes]

Examples

Create a template spec.

az ts create -g testRG --name TemplateSpecName -l WestUS --display-name "MyDisplayName" --description "Simple template spec" --tags key1=value1

Create a template spec version.

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

Create a template spec and a version of the template spec.

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

Required Parameters

--name -n

The name of the template spec.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--description

The description of the parent template spec.

--display-name -d

The display name of the template spec.

--location -l

The location to store the template-spec and template-spec version(s). Cannot be changed after creation.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--template-file -f

A path to a template file or Bicep file in the file system.

--ui-form-definition

The uiFormDefinition file path in the file system for the template spec version.

--version -v

The template spec version.

--version-description

The description of the template spec version.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ts delete

Delete a specified template spec or template spec version by name or resource ID..

az ts delete [--name]
             [--resource-group]
             [--template-spec]
             [--version]
             [--yes]

Examples

Delete the specified template spec and all versions.

az ts delete -g MyResourceGroup --name TemplateSpecName

Delete the specified version from the template spec.

az ts delete -g MyResourceGroup --name TemplateSpecName --version VersionName

Delete the template spec or version based on resource ID.

az ts delete --template-spec resourceID

Optional Parameters

--name -n

The name of the template spec.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--template-spec -s

The template spec resource id.

--version -v

The template spec version.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ts export

Export the specified template spec version and artifacts (if any) to the specified output folder.

az ts export --output-folder
             [--name]
             [--resource-group]
             [--template-spec]
             [--version]

Examples

Export the specified template spec version based on resource ID.

az ts export -s resourceID --output-folder C:/path/

Export the specified template spec version.

az ts export -g testrg --name TemplateSpecName --version VersionName --output-folder C:/path/

Required Parameters

--output-folder

Existing folder to output export(s).

Optional Parameters

--name -n

The name of the template spec.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--template-spec -s

The template spec resource id.

--version -v

The template spec version.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ts list

List template specs or template spec versions.

az ts list [--name]
           [--resource-group]

Examples

List all template specs in current default subscription.

az ts list

List all template specs in specified subscription.

az ts list --subscription Subscription

List all template specs in resource group.

az ts list -g MyResourceGroup

List all versions of parent template spec.

az ts list -g MyResourceGroup -n TemplateSpecName

Optional Parameters

--name -n

The name of the template spec.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ts show

Get the specified template spec or template spec version.

az ts show [--name]
           [--resource-group]
           [--template-spec]
           [--version]

Examples

Show the specified template spec.

az ts show -g testrg --name TemplateSpecName

Show the specified template spec version.

az ts show -g testrg --name TemplateSpecName --version VersionName

Show the specified template spec or template spec version based on the resource ID.

az ts show --template-spec resourceID

Optional Parameters

--name -n

The name of the template spec.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--template-spec -s

The template spec resource id.

--version -v

The template spec version.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ts update

Update a template spec version.

az ts update [--description]
             [--display-name]
             [--name]
             [--resource-group]
             [--tags]
             [--template-file]
             [--template-spec]
             [--ui-form-definition]
             [--version]
             [--version-description]
             [--yes]

Examples

Update the template content of a template spec or template spec version based on the resource ID.

az ts update --template-spec resourceID -f updatedFile.json

Update the display name and tag(s) of a template spec based on the resource ID.

az ts update --template-spec resourceID --display-name "NewParentDisplayName" --tags key1=value1

Update the description of a template spec version with no prompt.

az ts update -g ExistingRG --name ExistingName -v 3.0 --version-description "New description" --yes

Update all the properties of a template spec version.

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

Remove tag(s) from template spec version with no prompt.

az ts update -g ExistingRG --name ExistingName -v 3.0 -f updatedTemplate.json --tags --yes

Optional Parameters

--description

The description of the parent template spec.

--display-name -d

The display name of the template spec.

--name -n

The name of the template spec.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--template-file -f

A path to a template file or Bicep file in the file system.

--template-spec -s

The template spec resource id.

--ui-form-definition

The uiFormDefinition file path in the file system for the template spec version.

--version -v

The template spec version.

--version-description

The description of the template spec version.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.