Sdílet prostřednictvím


TagsOperations interface

Interface representing a TagsOperations.

Methods

createOrUpdate(string, TagsCreateOrUpdateOptionalParams)

This operation allows adding a name to the list of predefined tag names for the given subscription. A tag name can have a maximum of 512 characters and is case-insensitive. Tag names cannot have the following prefixes which are reserved for Azure use: 'microsoft', 'azure', 'windows'.

createOrUpdateAtScope(string, TagsResource, TagsCreateOrUpdateAtScopeOptionalParams)

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.

createOrUpdateValue(string, string, TagsCreateOrUpdateValueOptionalParams)

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.

delete(string, TagsDeleteOptionalParams)

This operation allows deleting a name from the list of predefined tag names for the given subscription. The name being deleted must not be in use as a tag name for any resource. All predefined values for the given name must have already been deleted.

deleteAtScope(string, TagsDeleteAtScopeOptionalParams)

Deletes the entire set of tags on a resource or subscription.

deleteValue(string, string, TagsDeleteValueOptionalParams)

This operation allows deleting a value from the list of predefined values for an existing predefined tag name. The value being deleted must not be in use as a tag value for the given tag name for any resource.

getAtScope(string, TagsGetAtScopeOptionalParams)

Gets the entire set of tags on a resource or subscription.

list(TagsListOptionalParams)

This operation performs a union of predefined tags, resource tags, resource group tags and subscription tags, and returns a summary of usage for each tag name and value under the given subscription. In case of a large number of tags, this operation may return a previously cached result.

updateAtScope(string, TagsPatchResource, TagsUpdateAtScopeOptionalParams)

This operation allows replacing, merging or selectively deleting tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags at the end of the operation. The 'replace' option replaces the entire set of existing tags with a new set. The 'merge' option allows adding tags with new names and updating the values of tags with existing names. The 'delete' option allows selectively deleting tags based on given names or name/value pairs.

Method Details

createOrUpdate(string, TagsCreateOrUpdateOptionalParams)

This operation allows adding a name to the list of predefined tag names for the given subscription. A tag name can have a maximum of 512 characters and is case-insensitive. Tag names cannot have the following prefixes which are reserved for Azure use: 'microsoft', 'azure', 'windows'.

function createOrUpdate(tagName: string, options?: TagsCreateOrUpdateOptionalParams): Promise<TagDetails>

Parameters

tagName

string

The name of the tag to create.

options
TagsCreateOrUpdateOptionalParams

The options parameters.

Returns

Promise<TagDetails>

createOrUpdateAtScope(string, TagsResource, TagsCreateOrUpdateAtScopeOptionalParams)

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.

function createOrUpdateAtScope(scope: string, parameters: TagsResource, options?: TagsCreateOrUpdateAtScopeOptionalParams): Promise<TagsResource>

Parameters

scope

string

The resource scope.

parameters
TagsResource

Wrapper resource for tags API requests and responses.

options
TagsCreateOrUpdateAtScopeOptionalParams

The options parameters.

Returns

Promise<TagsResource>

createOrUpdateValue(string, string, TagsCreateOrUpdateValueOptionalParams)

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.

function createOrUpdateValue(tagName: string, tagValue: string, options?: TagsCreateOrUpdateValueOptionalParams): Promise<TagValue>

Parameters

tagName

string

The name of the tag.

tagValue

string

The value of the tag to create.

options
TagsCreateOrUpdateValueOptionalParams

The options parameters.

Returns

Promise<TagValue>

delete(string, TagsDeleteOptionalParams)

This operation allows deleting a name from the list of predefined tag names for the given subscription. The name being deleted must not be in use as a tag name for any resource. All predefined values for the given name must have already been deleted.

function delete(tagName: string, options?: TagsDeleteOptionalParams): Promise<void>

Parameters

tagName

string

The name of the tag.

options
TagsDeleteOptionalParams

The options parameters.

Returns

Promise<void>

deleteAtScope(string, TagsDeleteAtScopeOptionalParams)

Deletes the entire set of tags on a resource or subscription.

function deleteAtScope(scope: string, options?: TagsDeleteAtScopeOptionalParams): Promise<void>

Parameters

scope

string

The resource scope.

options
TagsDeleteAtScopeOptionalParams

The options parameters.

Returns

Promise<void>

deleteValue(string, string, TagsDeleteValueOptionalParams)

This operation allows deleting a value from the list of predefined values for an existing predefined tag name. The value being deleted must not be in use as a tag value for the given tag name for any resource.

function deleteValue(tagName: string, tagValue: string, options?: TagsDeleteValueOptionalParams): Promise<void>

Parameters

tagName

string

The name of the tag.

tagValue

string

The value of the tag to delete.

options
TagsDeleteValueOptionalParams

The options parameters.

Returns

Promise<void>

getAtScope(string, TagsGetAtScopeOptionalParams)

Gets the entire set of tags on a resource or subscription.

function getAtScope(scope: string, options?: TagsGetAtScopeOptionalParams): Promise<TagsResource>

Parameters

scope

string

The resource scope.

options
TagsGetAtScopeOptionalParams

The options parameters.

Returns

Promise<TagsResource>

list(TagsListOptionalParams)

This operation performs a union of predefined tags, resource tags, resource group tags and subscription tags, and returns a summary of usage for each tag name and value under the given subscription. In case of a large number of tags, this operation may return a previously cached result.

function list(options?: TagsListOptionalParams): PagedAsyncIterableIterator<TagDetails, TagDetails[], PageSettings>

Parameters

options
TagsListOptionalParams

The options parameters.

Returns

updateAtScope(string, TagsPatchResource, TagsUpdateAtScopeOptionalParams)

This operation allows replacing, merging or selectively deleting tags on the specified resource or subscription. The specified entity can have a maximum of 50 tags at the end of the operation. The 'replace' option replaces the entire set of existing tags with a new set. The 'merge' option allows adding tags with new names and updating the values of tags with existing names. The 'delete' option allows selectively deleting tags based on given names or name/value pairs.

function updateAtScope(scope: string, parameters: TagsPatchResource, options?: TagsUpdateAtScopeOptionalParams): Promise<TagsResource>

Parameters

scope

string

The resource scope.

parameters
TagsPatchResource

Wrapper resource for tags patch API request only.

options
TagsUpdateAtScopeOptionalParams

The options parameters.

Returns

Promise<TagsResource>