Share via


SubscriptionResource.CreateOrUpdatePredefinedTagValueAsync Method

Definition

This operation allows adding a value to the list of predefined values for an existing predefined tag name. A tag value can have a maximum of 256 characters.

  • Request Path: /subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}
  • Operation Id: Tags_CreateOrUpdateValue
  • Default Api Version: 2022-09-01
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Resources.Models.PredefinedTagValue>> CreateOrUpdatePredefinedTagValueAsync (string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdatePredefinedTagValueAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Resources.Models.PredefinedTagValue>>
override this.CreateOrUpdatePredefinedTagValueAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Resources.Models.PredefinedTagValue>>
Public Overridable Function CreateOrUpdatePredefinedTagValueAsync (tagName As String, tagValue As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PredefinedTagValue))

Parameters

tagName
String

The name of the tag.

tagValue
String

The value of the tag to create.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

tagName or tagValue is an empty string, and was expected to be non-empty.

tagName or tagValue is null.

Applies to