/// <summary> /// Get tag attributes by tag /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Name of the image (including the namespace) /// </param> /// <param name='reference'> /// Tag name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TagAttributes> GetAttributesAsync(this ITagOperations operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAttributesWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List tags of a repository /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Name of the image (including the namespace) /// </param> /// <param name='last'> /// Query parameter for the last item in previous query. Result set will /// include values lexically after last. /// </param> /// <param name='n'> /// query parameter for max number of items /// </param> /// <param name='orderby'> /// orderby query parameter /// </param> /// <param name='digest'> /// filter by digest /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TagList> GetListAsync(this ITagOperations operations, string name, string last = default(string), int?n = default(int?), string orderby = default(string), string digest = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetListWithHttpMessagesAsync(name, last, n, orderby, digest, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create a subscription resource tag value. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.ITagOperations. /// </param> /// <param name='tagName'> /// Required. The name of the tag. /// </param> /// <param name='tagValue'> /// Required. The value of the tag. /// </param> /// <returns> /// Tag information. /// </returns> public static TagCreateValueResult CreateOrUpdateValue(this ITagOperations operations, string tagName, string tagValue) { return(Task.Factory.StartNew((object s) => { return ((ITagOperations)s).CreateOrUpdateValueAsync(tagName, tagValue); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get a list of tags under a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.ITagOperations. /// </param> /// <param name='nextLink'> /// Required. NextLink from the previous successful call to List /// operation. /// </param> /// <returns> /// List of subscription tags. /// </returns> public static TagsListResult ListNext(this ITagOperations operations, string nextLink) { return(Task.Factory.StartNew((object s) => { return ((ITagOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Delete a subscription resource tag. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.ITagOperations. /// </param> /// <param name='tagName'> /// Required. The name of the tag. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Delete(this ITagOperations operations, string tagName) { return(Task.Factory.StartNew((object s) => { return ((ITagOperations)s).DeleteAsync(tagName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public static async Task <Page <RepositoryTags> > GetAsync (this ITagOperations operations, string repositoryName, int?count = null, CancellationToken cancellationToken = default) { using HttpOperationResponse <Page <RepositoryTags> > response = await operations.GetWithHttpMessagesAsync(repositoryName, count, cancellationToken).ConfigureAwait(false); return(response.Body); }
public static async Task <Page <RepositoryTags> > GetNextAsync (this ITagOperations operations, string nextPageLink, CancellationToken cancellationToken = default) { using HttpOperationResponse <Page <RepositoryTags> > response = await operations.GetNextWithHttpMessagesAsync(nextPageLink, cancellationToken).ConfigureAwait(false); return(response.Body); }
/// <summary> /// Initializes a new instance of the ResourceManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public ResourceManagementClient(HttpClient httpClient) : base(httpClient) { this._deploymentOperations = new DeploymentOperationOperations(this); this._deployments = new DeploymentOperations(this); this._providers = new ProviderOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._resources = new ResourceOperations(this); this._tags = new TagOperations(this); this._apiVersion = "2014-04-01-preview"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the ResourceManagementClient class. /// </summary> public ResourceManagementClient() : base() { this._deploymentOperations = new DeploymentOperationOperations(this); this._deployments = new DeploymentOperations(this); this._providers = new ProviderOperations(this); this._providerOperationsMetadata = new ProviderOperationsMetadataOperations(this); this._resourceGroups = new ResourceGroupOperations(this); this._resources = new ResourceOperations(this); this._resourceProviderOperationDetails = new ResourceProviderOperationDetailsOperations(this); this._tags = new TagOperations(this); this._apiVersion = "2016-02-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Create a subscription resource tag. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.ITagOperations. /// </param> /// <param name='tagName'> /// Required. The name of the tag. /// </param> /// <returns> /// Tag information. /// </returns> public static Task <TagCreateResult> CreateOrUpdateAsync(this ITagOperations operations, string tagName) { return(operations.CreateOrUpdateAsync(tagName, CancellationToken.None)); }
/// <summary> /// Get a list of tags under a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.ITagOperations. /// </param> /// <param name='nextLink'> /// Required. NextLink from the previous successful call to List /// operation. /// </param> /// <returns> /// List of subscription tags. /// </returns> public static Task <TagsListResult> ListNextAsync(this ITagOperations operations, string nextLink) { return(operations.ListNextAsync(nextLink, CancellationToken.None)); }
/// <summary> /// Get a list of subscription resource tags. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.ITagOperations. /// </param> /// <returns> /// List of subscription tags. /// </returns> public static Task <TagsListResult> ListAsync(this ITagOperations operations) { return(operations.ListAsync(CancellationToken.None)); }
/// <summary> /// Delete a subscription resource tag value. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Internal.Resources.ITagOperations. /// </param> /// <param name='tagName'> /// Required. The name of the tag. /// </param> /// <param name='tagValue'> /// Required. The value of the tag. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteValueAsync(this ITagOperations operations, string tagName, string tagValue) { return(operations.DeleteValueAsync(tagName, tagValue, CancellationToken.None)); }
/// <summary> /// Update tag attributes /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Name of the image (including the namespace) /// </param> /// <param name='reference'> /// Tag name /// </param> /// <param name='value'> /// Repository attribute value /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateAttributesAsync(this ITagOperations operations, string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateAttributesWithHttpMessagesAsync(name, reference, value, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete tag /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Name of the image (including the namespace) /// </param> /// <param name='reference'> /// Tag name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ITagOperations operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false)).Dispose(); }