DevTestLabVmResource.AddTagAsync(String, String, CancellationToken) 方法      
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将标记添加到当前资源。
- 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}
- 操作IdVirtualMachines_Get
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DevTestLabs.DevTestLabVmResource>> AddTagAsync (string key, string value, System.Threading.CancellationToken cancellationToken = default);abstract member AddTagAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DevTestLabs.DevTestLabVmResource>>
override this.AddTagAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DevTestLabs.DevTestLabVmResource>>Public Overridable Function AddTagAsync (key As String, value As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DevTestLabVmResource))参数
- key
- String
标记的键。
- value
- String
标记的值。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
例外
key 或 value 为 null。