/// <summary> /// Creates or updates the entire set of tags on a resource or subscription. /// </summary> /// <remarks> /// This operation allows adding or replacing the entire set of tags on the /// specified resource or subscription. The specified entity can have a maximum /// of 50 tags. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scope'> /// The resource scope. /// </param> /// <param name='properties'> /// The set of tags. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TagsResourceInner> CreateOrUpdateAtScopeAsync(this ITagsOperations operations, string scope, TagsInner properties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateAtScopeWithHttpMessagesAsync(scope, properties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes all the tags for the resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scope'> /// The resource scope. /// </param> public static void ResourceDelete(this ITagsOperations operations, string scope) { operations.ResourceDeleteAsync(scope).GetAwaiter().GetResult(); }
/// <summary> /// Deletes all the tags for the resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scope'> /// The resource scope. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ResourceDeleteAsync(this ITagsOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ResourceDeleteWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Create or Replace existing tags with passing in tags. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scope'> /// The resource scope. /// </param> /// <param name='parameters'> /// Parameters for creating multiple tags. /// </param> public static TagsResource ResourceCreate(this ITagsOperations operations, string scope, TagsResource parameters) { return(operations.ResourceCreateAsync(scope, parameters).GetAwaiter().GetResult()); }