1. Packages
  2. Azure Native v2
  3. API Docs
  4. resources
  5. TemplateSpec
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.resources.TemplateSpec

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Template Spec object. Azure REST API version: 2022-02-01. Prior API version in Azure Native 1.x: 2022-02-01.

Example Usage

TemplateSpecsCreateUpdate

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

return await Deployment.RunAsync(() => 
{
    var templateSpec = new AzureNative.Resources.TemplateSpec("templateSpec", new()
    {
        Description = "A very simple Template Spec",
        Location = "eastus",
        ResourceGroupName = "templateSpecRG",
        TemplateSpecName = "simpleTemplateSpec",
    });

});
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.NewTemplateSpec(ctx, "templateSpec", &resources.TemplateSpecArgs{
			Description:       pulumi.String("A very simple Template Spec"),
			Location:          pulumi.String("eastus"),
			ResourceGroupName: pulumi.String("templateSpecRG"),
			TemplateSpecName:  pulumi.String("simpleTemplateSpec"),
		})
		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.TemplateSpec;
import com.pulumi.azurenative.resources.TemplateSpecArgs;
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 templateSpec = new TemplateSpec("templateSpec", TemplateSpecArgs.builder()
            .description("A very simple Template Spec")
            .location("eastus")
            .resourceGroupName("templateSpecRG")
            .templateSpecName("simpleTemplateSpec")
            .build());

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

const templateSpec = new azure_native.resources.TemplateSpec("templateSpec", {
    description: "A very simple Template Spec",
    location: "eastus",
    resourceGroupName: "templateSpecRG",
    templateSpecName: "simpleTemplateSpec",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

template_spec = azure_native.resources.TemplateSpec("templateSpec",
    description="A very simple Template Spec",
    location="eastus",
    resource_group_name="templateSpecRG",
    template_spec_name="simpleTemplateSpec")
Copy
resources:
  templateSpec:
    type: azure-native:resources:TemplateSpec
    properties:
      description: A very simple Template Spec
      location: eastus
      resourceGroupName: templateSpecRG
      templateSpecName: simpleTemplateSpec
Copy

Create TemplateSpec Resource

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

Constructor syntax

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

@overload
def TemplateSpec(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 resource_group_name: Optional[str] = None,
                 description: Optional[str] = None,
                 display_name: Optional[str] = None,
                 location: Optional[str] = None,
                 metadata: Optional[Any] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 template_spec_name: Optional[str] = None)
func NewTemplateSpec(ctx *Context, name string, args TemplateSpecArgs, opts ...ResourceOption) (*TemplateSpec, error)
public TemplateSpec(string name, TemplateSpecArgs args, CustomResourceOptions? opts = null)
public TemplateSpec(String name, TemplateSpecArgs args)
public TemplateSpec(String name, TemplateSpecArgs args, CustomResourceOptions options)
type: azure-native:resources:TemplateSpec
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. TemplateSpecArgs
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. TemplateSpecArgs
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. TemplateSpecArgs
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. TemplateSpecArgs
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. TemplateSpecArgs
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 templateSpecResource = new AzureNative.Resources.TemplateSpec("templateSpecResource", new()
{
    ResourceGroupName = "string",
    Description = "string",
    DisplayName = "string",
    Location = "string",
    Metadata = "any",
    Tags = 
    {
        { "string", "string" },
    },
    TemplateSpecName = "string",
});
Copy
example, err := resources.NewTemplateSpec(ctx, "templateSpecResource", &resources.TemplateSpecArgs{
	ResourceGroupName: "string",
	Description:       "string",
	DisplayName:       "string",
	Location:          "string",
	Metadata:          "any",
	Tags: map[string]interface{}{
		"string": "string",
	},
	TemplateSpecName: "string",
})
Copy
var templateSpecResource = new TemplateSpec("templateSpecResource", TemplateSpecArgs.builder()
    .resourceGroupName("string")
    .description("string")
    .displayName("string")
    .location("string")
    .metadata("any")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .templateSpecName("string")
    .build());
Copy
template_spec_resource = azure_native.resources.TemplateSpec("templateSpecResource",
    resource_group_name=string,
    description=string,
    display_name=string,
    location=string,
    metadata=any,
    tags={
        string: string,
    },
    template_spec_name=string)
Copy
const templateSpecResource = new azure_native.resources.TemplateSpec("templateSpecResource", {
    resourceGroupName: "string",
    description: "string",
    displayName: "string",
    location: "string",
    metadata: "any",
    tags: {
        string: "string",
    },
    templateSpecName: "string",
});
Copy
type: azure-native:resources:TemplateSpec
properties:
    description: string
    displayName: string
    location: string
    metadata: any
    resourceGroupName: string
    tags:
        string: string
    templateSpecName: string
Copy

TemplateSpec 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 TemplateSpec 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.
Description string
Template Spec description.
DisplayName string
Template Spec display name.
Location Changes to this property will trigger replacement. string
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations.
Metadata object
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
Tags Dictionary<string, string>
Resource tags.
TemplateSpecName Changes to this property will trigger replacement. string
Name of the Template Spec.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
Description string
Template Spec description.
DisplayName string
Template Spec display name.
Location Changes to this property will trigger replacement. string
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations.
Metadata interface{}
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
Tags map[string]string
Resource tags.
TemplateSpecName Changes to this property will trigger replacement. string
Name of the Template Spec.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
description String
Template Spec description.
displayName String
Template Spec display name.
location Changes to this property will trigger replacement. String
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations.
metadata Object
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags Map<String,String>
Resource tags.
templateSpecName Changes to this property will trigger replacement. String
Name of the Template Spec.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
description string
Template Spec description.
displayName string
Template Spec display name.
location Changes to this property will trigger replacement. string
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations.
metadata any
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags {[key: string]: string}
Resource tags.
templateSpecName Changes to this property will trigger replacement. string
Name of the Template Spec.
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.
description str
Template Spec description.
display_name str
Template Spec display name.
location Changes to this property will trigger replacement. str
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations.
metadata Any
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags Mapping[str, str]
Resource tags.
template_spec_name Changes to this property will trigger replacement. str
Name of the Template Spec.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
description String
Template Spec description.
displayName String
Template Spec display name.
location Changes to this property will trigger replacement. String
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations.
metadata Any
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs.
tags Map<String>
Resource tags.
templateSpecName Changes to this property will trigger replacement. String
Name of the Template Spec.

Outputs

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

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.
Versions Dictionary<string, Pulumi.AzureNative.Resources.Outputs.TemplateSpecVersionInfoResponse>
High-level information about the versions within this Template Spec. The keys are the version names. Only populated if the $expand query parameter is set to 'versions'.
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.
Versions map[string]TemplateSpecVersionInfoResponse
High-level information about the versions within this Template Spec. The keys are the version names. Only populated if the $expand query parameter is set to 'versions'.
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.
versions Map<String,TemplateSpecVersionInfoResponse>
High-level information about the versions within this Template Spec. The keys are the version names. Only populated if the $expand query parameter is set to 'versions'.
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.
versions {[key: string]: TemplateSpecVersionInfoResponse}
High-level information about the versions within this Template Spec. The keys are the version names. Only populated if the $expand query parameter is set to 'versions'.
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.
versions Mapping[str, TemplateSpecVersionInfoResponse]
High-level information about the versions within this Template Spec. The keys are the version names. Only populated if the $expand query parameter is set to 'versions'.
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.
versions Map<Property Map>
High-level information about the versions within this Template Spec. The keys are the version names. Only populated if the $expand query parameter is set to 'versions'.

Supporting Types

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.

TemplateSpecVersionInfoResponse
, TemplateSpecVersionInfoResponseArgs

Description This property is required. string
Template Spec version description.
TimeCreated This property is required. string
The timestamp of when the version was created.
TimeModified This property is required. string
The timestamp of when the version was last modified.
Description This property is required. string
Template Spec version description.
TimeCreated This property is required. string
The timestamp of when the version was created.
TimeModified This property is required. string
The timestamp of when the version was last modified.
description This property is required. String
Template Spec version description.
timeCreated This property is required. String
The timestamp of when the version was created.
timeModified This property is required. String
The timestamp of when the version was last modified.
description This property is required. string
Template Spec version description.
timeCreated This property is required. string
The timestamp of when the version was created.
timeModified This property is required. string
The timestamp of when the version was last modified.
description This property is required. str
Template Spec version description.
time_created This property is required. str
The timestamp of when the version was created.
time_modified This property is required. str
The timestamp of when the version was last modified.
description This property is required. String
Template Spec version description.
timeCreated This property is required. String
The timestamp of when the version was created.
timeModified This property is required. String
The timestamp of when the version was last modified.

Import

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

$ pulumi import azure-native:resources:TemplateSpec simpleTemplateSpec /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi