1. Packages
  2. Azure Native
  3. API Docs
  4. resources
  5. TemplateSpecVersion
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

azure-native.resources.TemplateSpecVersion

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

Template Spec Version object.

Uses Azure REST API version 2022-02-01. In version 2.x of the Azure Native provider, it used API version 2022-02-01.

Other available API versions: 2021-03-01-preview, 2021-05-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native resources [ApiVersion]. See the version guide for details.

Example Usage

TemplateSpecVersionsCreateUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var templateSpecVersion = new AzureNative.Resources.TemplateSpecVersion("templateSpecVersion", new()
    {
        Description = "This is version v1.0 of our template content",
        Location = "eastus",
        MainTemplate = new Dictionary<string, object?>
        {
            ["$schema"] = "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
            ["contentVersion"] = "1.0.0.0",
            ["parameters"] = new Dictionary<string, object?>
            {
            },
            ["resources"] = new[]
            {
            },
        },
        ResourceGroupName = "templateSpecRG",
        TemplateSpecName = "simpleTemplateSpec",
        TemplateSpecVersion = "v1.0",
    });

});
Copy
package main

import (
	resources "github.com/pulumi/pulumi-azure-native-sdk/resources/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resources.NewTemplateSpecVersion(ctx, "templateSpecVersion", &resources.TemplateSpecVersionArgs{
			Description: pulumi.String("This is version v1.0 of our template content"),
			Location:    pulumi.String("eastus"),
			MainTemplate: pulumi.Any(map[string]interface{}{
				"$schema":        "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
				"contentVersion": "1.0.0.0",
				"parameters":     map[string]interface{}{},
				"resources":      []interface{}{},
			}),
			ResourceGroupName:   pulumi.String("templateSpecRG"),
			TemplateSpecName:    pulumi.String("simpleTemplateSpec"),
			TemplateSpecVersion: pulumi.String("v1.0"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.resources.TemplateSpecVersion;
import com.pulumi.azurenative.resources.TemplateSpecVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var templateSpecVersion = new TemplateSpecVersion("templateSpecVersion", TemplateSpecVersionArgs.builder()
            .description("This is version v1.0 of our template content")
            .location("eastus")
            .mainTemplate(Map.ofEntries(
                Map.entry("$schema", "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"),
                Map.entry("contentVersion", "1.0.0.0"),
                Map.entry("parameters", ),
                Map.entry("resources", )
            ))
            .resourceGroupName("templateSpecRG")
            .templateSpecName("simpleTemplateSpec")
            .templateSpecVersion("v1.0")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const templateSpecVersion = new azure_native.resources.TemplateSpecVersion("templateSpecVersion", {
    description: "This is version v1.0 of our template content",
    location: "eastus",
    mainTemplate: {
        $schema: "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
        contentVersion: "1.0.0.0",
        parameters: {},
        resources: [],
    },
    resourceGroupName: "templateSpecRG",
    templateSpecName: "simpleTemplateSpec",
    templateSpecVersion: "v1.0",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

template_spec_version = azure_native.resources.TemplateSpecVersion("templateSpecVersion",
    description="This is version v1.0 of our template content",
    location="eastus",
    main_template={
        "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {},
        "resources": [],
    },
    resource_group_name="templateSpecRG",
    template_spec_name="simpleTemplateSpec",
    template_spec_version="v1.0")
Copy
resources:
  templateSpecVersion:
    type: azure-native:resources:TemplateSpecVersion
    properties:
      description: This is version v1.0 of our template content
      location: eastus
      mainTemplate:
        $schema: http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#
        contentVersion: 1.0.0.0
        parameters: {}
        resources: []
      resourceGroupName: templateSpecRG
      templateSpecName: simpleTemplateSpec
      templateSpecVersion: v1.0
Copy

Create TemplateSpecVersion Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TemplateSpecVersion(name: string, args: TemplateSpecVersionArgs, opts?: CustomResourceOptions);
@overload
def TemplateSpecVersion(resource_name: str,
                        args: TemplateSpecVersionArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def TemplateSpecVersion(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        resource_group_name: Optional[str] = None,
                        template_spec_name: Optional[str] = None,
                        description: Optional[str] = None,
                        linked_templates: Optional[Sequence[LinkedTemplateArtifactArgs]] = None,
                        location: Optional[str] = None,
                        main_template: Optional[Any] = None,
                        metadata: Optional[Any] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        template_spec_version: Optional[str] = None,
                        ui_form_definition: Optional[Any] = None)
func NewTemplateSpecVersion(ctx *Context, name string, args TemplateSpecVersionArgs, opts ...ResourceOption) (*TemplateSpecVersion, error)
public TemplateSpecVersion(string name, TemplateSpecVersionArgs args, CustomResourceOptions? opts = null)
public TemplateSpecVersion(String name, TemplateSpecVersionArgs args)
public TemplateSpecVersion(String name, TemplateSpecVersionArgs args, CustomResourceOptions options)
type: azure-native:resources:TemplateSpecVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TemplateSpecVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TemplateSpecVersionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TemplateSpecVersionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TemplateSpecVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TemplateSpecVersionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var templateSpecVersionResource = new AzureNative.Resources.TemplateSpecVersion("templateSpecVersionResource", new()
{
    ResourceGroupName = "string",
    TemplateSpecName = "string",
    Description = "string",
    LinkedTemplates = new[]
    {
        new AzureNative.Resources.Inputs.LinkedTemplateArtifactArgs
        {
            Path = "string",
            Template = "any",
        },
    },
    Location = "string",
    MainTemplate = "any",
    Metadata = "any",
    Tags = 
    {
        { "string", "string" },
    },
    TemplateSpecVersion = "string",
    UiFormDefinition = "any",
});
Copy
example, err := resources.NewTemplateSpecVersion(ctx, "templateSpecVersionResource", &resources.TemplateSpecVersionArgs{
	ResourceGroupName: pulumi.String("string"),
	TemplateSpecName:  pulumi.String("string"),
	Description:       pulumi.String("string"),
	LinkedTemplates: resources.LinkedTemplateArtifactArray{
		&resources.LinkedTemplateArtifactArgs{
			Path:     pulumi.String("string"),
			Template: pulumi.Any("any"),
		},
	},
	Location:     pulumi.String("string"),
	MainTemplate: pulumi.Any("any"),
	Metadata:     pulumi.Any("any"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	TemplateSpecVersion: pulumi.String("string"),
	UiFormDefinition:    pulumi.Any("any"),
})
Copy
var templateSpecVersionResource = new TemplateSpecVersion("templateSpecVersionResource", TemplateSpecVersionArgs.builder()
    .resourceGroupName("string")
    .templateSpecName("string")
    .description("string")
    .linkedTemplates(LinkedTemplateArtifactArgs.builder()
        .path("string")
        .template("any")
        .build())
    .location("string")
    .mainTemplate("any")
    .metadata("any")
    .tags(Map.of("string", "string"))
    .templateSpecVersion("string")
    .uiFormDefinition("any")
    .build());
Copy
template_spec_version_resource = azure_native.resources.TemplateSpecVersion("templateSpecVersionResource",
    resource_group_name="string",
    template_spec_name="string",
    description="string",
    linked_templates=[{
        "path": "string",
        "template": "any",
    }],
    location="string",
    main_template="any",
    metadata="any",
    tags={
        "string": "string",
    },
    template_spec_version="string",
    ui_form_definition="any")
Copy
const templateSpecVersionResource = new azure_native.resources.TemplateSpecVersion("templateSpecVersionResource", {
    resourceGroupName: "string",
    templateSpecName: "string",
    description: "string",
    linkedTemplates: [{
        path: "string",
        template: "any",
    }],
    location: "string",
    mainTemplate: "any",
    metadata: "any",
    tags: {
        string: "string",
    },
    templateSpecVersion: "string",
    uiFormDefinition: "any",
});
Copy
type: azure-native:resources:TemplateSpecVersion
properties:
    description: string
    linkedTemplates:
        - path: string
          template: any
    location: string
    mainTemplate: any
    metadata: any
    resourceGroupName: string
    tags:
        string: string
    templateSpecName: string
    templateSpecVersion: string
    uiFormDefinition: any
Copy

TemplateSpecVersion Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The TemplateSpecVersion resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
TemplateSpecName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Template Spec.
Description string
Template Spec version description.
LinkedTemplates List<Pulumi.AzureNative.Resources.Inputs.LinkedTemplateArtifact>
An array of linked template artifacts.
Location Changes to this property will trigger replacement. string
The location of the Template Spec Version. It must match the location of the parent Template Spec.
MainTemplate object
The main Azure Resource Manager template content.
Metadata object
The version metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
Tags Dictionary<string, string>
Resource tags.
TemplateSpecVersion Changes to this property will trigger replacement. string
The version of the Template Spec.
UiFormDefinition object
The Azure Resource Manager template UI definition content.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
TemplateSpecName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Template Spec.
Description string
Template Spec version description.
LinkedTemplates []LinkedTemplateArtifactArgs
An array of linked template artifacts.
Location Changes to this property will trigger replacement. string
The location of the Template Spec Version. It must match the location of the parent Template Spec.
MainTemplate interface{}
The main Azure Resource Manager template content.
Metadata interface{}
The version metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
Tags map[string]string
Resource tags.
TemplateSpecVersion Changes to this property will trigger replacement. string
The version of the Template Spec.
UiFormDefinition interface{}
The Azure Resource Manager template UI definition content.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
templateSpecName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Template Spec.
description String
Template Spec version description.
linkedTemplates List<LinkedTemplateArtifact>
An array of linked template artifacts.
location Changes to this property will trigger replacement. String
The location of the Template Spec Version. It must match the location of the parent Template Spec.
mainTemplate Object
The main Azure Resource Manager template content.
metadata Object
The version metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags Map<String,String>
Resource tags.
templateSpecVersion Changes to this property will trigger replacement. String
The version of the Template Spec.
uiFormDefinition Object
The Azure Resource Manager template UI definition content.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
templateSpecName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Template Spec.
description string
Template Spec version description.
linkedTemplates LinkedTemplateArtifact[]
An array of linked template artifacts.
location Changes to this property will trigger replacement. string
The location of the Template Spec Version. It must match the location of the parent Template Spec.
mainTemplate any
The main Azure Resource Manager template content.
metadata any
The version metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags {[key: string]: string}
Resource tags.
templateSpecVersion Changes to this property will trigger replacement. string
The version of the Template Spec.
uiFormDefinition any
The Azure Resource Manager template UI definition content.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
template_spec_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the Template Spec.
description str
Template Spec version description.
linked_templates Sequence[LinkedTemplateArtifactArgs]
An array of linked template artifacts.
location Changes to this property will trigger replacement. str
The location of the Template Spec Version. It must match the location of the parent Template Spec.
main_template Any
The main Azure Resource Manager template content.
metadata Any
The version metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags Mapping[str, str]
Resource tags.
template_spec_version Changes to this property will trigger replacement. str
The version of the Template Spec.
ui_form_definition Any
The Azure Resource Manager template UI definition content.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
templateSpecName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Template Spec.
description String
Template Spec version description.
linkedTemplates List<Property Map>
An array of linked template artifacts.
location Changes to this property will trigger replacement. String
The location of the Template Spec Version. It must match the location of the parent Template Spec.
mainTemplate Any
The main Azure Resource Manager template content.
metadata Any
The version metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags Map<String>
Resource tags.
templateSpecVersion Changes to this property will trigger replacement. String
The version of the Template Spec.
uiFormDefinition Any
The Azure Resource Manager template UI definition content.

Outputs

All input properties are implicitly available as output properties. Additionally, the TemplateSpecVersion resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of this resource.
SystemData Pulumi.AzureNative.Resources.Outputs.SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
Type of this resource.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of this resource.
SystemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
Type of this resource.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of this resource.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
Type of this resource.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
Name of this resource.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type string
Type of this resource.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
Name of this resource.
system_data SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type str
Type of this resource.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of this resource.
systemData Property Map
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
Type of this resource.

Supporting Types

LinkedTemplateArtifact
, LinkedTemplateArtifactArgs

Path This property is required. string
A filesystem safe relative path of the artifact.
Template This property is required. object
The Azure Resource Manager template.
Path This property is required. string
A filesystem safe relative path of the artifact.
Template This property is required. interface{}
The Azure Resource Manager template.
path This property is required. String
A filesystem safe relative path of the artifact.
template This property is required. Object
The Azure Resource Manager template.
path This property is required. string
A filesystem safe relative path of the artifact.
template This property is required. any
The Azure Resource Manager template.
path This property is required. str
A filesystem safe relative path of the artifact.
template This property is required. Any
The Azure Resource Manager template.
path This property is required. String
A filesystem safe relative path of the artifact.
template This property is required. Any
The Azure Resource Manager template.

LinkedTemplateArtifactResponse
, LinkedTemplateArtifactResponseArgs

Path This property is required. string
A filesystem safe relative path of the artifact.
Template This property is required. object
The Azure Resource Manager template.
Path This property is required. string
A filesystem safe relative path of the artifact.
Template This property is required. interface{}
The Azure Resource Manager template.
path This property is required. String
A filesystem safe relative path of the artifact.
template This property is required. Object
The Azure Resource Manager template.
path This property is required. string
A filesystem safe relative path of the artifact.
template This property is required. any
The Azure Resource Manager template.
path This property is required. str
A filesystem safe relative path of the artifact.
template This property is required. Any
The Azure Resource Manager template.
path This property is required. String
A filesystem safe relative path of the artifact.
template This property is required. Any
The Azure Resource Manager template.

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:resources:TemplateSpecVersion v1.0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi