Freigeben über


BackupProtectedItemResource.AddTagAsync Methode

Definition

Fügen Sie der aktuellen Ressource ein Tag hinzu.

  • Anforderungspfad/abonnements/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}
  • Vorgangs-IdProtectedItems_Get
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.RecoveryServicesBackup.BackupProtectedItemResource>> 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.RecoveryServicesBackup.BackupProtectedItemResource>>
override this.AddTagAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.RecoveryServicesBackup.BackupProtectedItemResource>>
Public Overridable Function AddTagAsync (key As String, value As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BackupProtectedItemResource))

Parameter

key
String

Der Schlüssel für das Tag.

value
String

Der Wert für das Tag.

cancellationToken
CancellationToken

Das zu verwendende Abbruchtoken.

Gibt zurück

Ausnahmen

key oder value ist NULL.

Gilt für: