TagsOperations Class

TagsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
TagsOperations

Constructor

TagsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

create_or_update

Creates a tag in the subscription.

The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes.

create_or_update_value

Creates a tag value. The name of the tag must already exist.

delete

Deletes a tag from the subscription.

You must remove all values from a resource tag before you can delete it.

delete_value

Deletes a tag value.

list

Gets the names and values of all resource tags that are defined in a subscription.

create_or_update

Creates a tag in the subscription.

The tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes.

async create_or_update(tag_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.TagDetails

Parameters

tag_name
str
Required

The name of the tag to create.

cls
callable

A custom type or function that will be passed the direct response

Returns

TagDetails, or the result of cls(response)

Return type

Exceptions

create_or_update_value

Creates a tag value. The name of the tag must already exist.

async create_or_update_value(tag_name: str, tag_value: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_05_01.models._models_py3.TagValue

Parameters

tag_name
str
Required

The name of the tag.

tag_value
str
Required

The value of the tag to create.

cls
callable

A custom type or function that will be passed the direct response

Returns

TagValue, or the result of cls(response)

Return type

Exceptions

delete

Deletes a tag from the subscription.

You must remove all values from a resource tag before you can delete it.

async delete(tag_name: str, **kwargs: Any) -> None

Parameters

tag_name
str
Required

The name of the tag.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

delete_value

Deletes a tag value.

async delete_value(tag_name: str, tag_value: str, **kwargs: Any) -> None

Parameters

tag_name
str
Required

The name of the tag.

tag_value
str
Required

The value of the tag to delete.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

list

Gets the names and values of all resource tags that are defined in a subscription.

list(**kwargs: Any) -> AsyncIterable[azure.mgmt.resource.resources.v2018_05_01.models._models_py3.TagsListResult]

Parameters

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either TagsListResult or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.resource.resources.v2018_05_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\resource\\resources\\v2018_05_01\\models\\__init__.py'>