Template Specs - Create Or Update
Creates or updates a Template Spec.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}?api-version=2021-05-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string |
Subscription Id which forms part of the URI for every service call. |
|
template
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
Name of the Template Spec. |
|
api-version
|
query | True |
string |
Client Api version. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| location | True |
string |
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations. |
| properties.description |
string maxLength: 4096 |
Template Spec description. |
|
| properties.displayName |
string maxLength: 64 |
Template Spec display name. |
|
| properties.metadata |
object |
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs. |
|
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK - The Template Spec update request has succeeded. |
|
| 201 Created |
Template Spec created. |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
TemplateSpecsCreateUpdate
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/templateSpecRG/providers/Microsoft.Resources/templateSpecs/simpleTemplateSpec?api-version=2021-05-01
{
"location": "eastus",
"properties": {
"description": "A very simple Template Spec"
}
}
Sample response
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/templateSpecRG/providers/Microsoft.Resources/templateSpecs/simpleTemplateSpec",
"type": "Microsoft.Resources/templateSpecs",
"name": "simpleTemplateSpec",
"location": "eastus",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-01T01:01:01.1075056Z"
},
"properties": {
"description": "A very simple Template Spec"
}
}
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/templateSpecRG/providers/Microsoft.Resources/templateSpecs/simpleTemplateSpec",
"type": "Microsoft.Resources/templateSpecs",
"name": "simpleTemplateSpec",
"location": "eastus",
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-02T02:03:01.1974346Z"
},
"properties": {
"description": "A very simple Template Spec"
}
}
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
Error Response |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Template |
Template Spec object. |
|
Template |
Template Specs error response. |
|
Template |
High-level information about a Template Spec version. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorResponse
Error Response
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
TemplateSpec
Template Spec object.
| Name | Type | Description |
|---|---|---|
| id |
string |
String Id used to locate any resource on Azure. |
| location |
string |
The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations. |
| name |
string |
Name of this resource. |
| properties.description |
string maxLength: 4096 |
Template Spec description. |
| properties.displayName |
string maxLength: 64 |
Template Spec display name. |
| properties.metadata |
object |
The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs. |
| properties.versions |
<string,
Template |
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'. |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
Type of this resource. |
TemplateSpecsError
Template Specs error response.
| Name | Type | Description |
|---|---|---|
| error |
Error Response |
TemplateSpecVersionInfo
High-level information about a Template Spec version.
| Name | Type | Description |
|---|---|---|
| description |
string |
Template Spec version description. |
| timeCreated |
string (date-time) |
The timestamp of when the version was created. |
| timeModified |
string (date-time) |
The timestamp of when the version was last modified. |