Tags - Create Or Update

Creates a tag in the subscription.

The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes.

PUT https://management.azure.com/subscriptions/{subscriptionId}/tagNames/{tagName}?api-version=2017-05-10

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The ID of the target subscription.

tagName
path True
  • string

The name of the tag to create.

api-version
query True
  • string

The API version to use for this operation.

Responses

Name Type Description
200 OK

OK - Returns information about the tag.

201 Created

Created - Returns information about the tag.

Definitions

TagCount

The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0.

TagDetails
TagValue

Tag information.

The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0.

Name Type Description
type
  • string

Type of count.

value
  • integer

Value of count.

Name Type Description
count

The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0.

id
  • string

The tag ID.

tagName
  • string

The tag name.

values

The list of tag values.

Tag information.

Name Type Description
count

The tag value count.

id
  • string

The tag ID.

tagValue
  • string

The tag value.