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.objectTagsOperations
Constructor
TagsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| create_or_update |
Creates a predefined tag name. 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'. |
| create_or_update_at_scope |
Creates or updates the entire set of tags on a resource or subscription. 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. |
| create_or_update_value |
Creates a predefined value for a predefined tag name. 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 |
Deletes a predefined tag name. 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. |
| delete_at_scope |
Deletes the entire set of tags on a resource or subscription. Deletes the entire set of tags on a resource or subscription. |
| delete_value |
Deletes a predefined tag value for a predefined tag name. 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. |
| get_at_scope |
Gets the entire set of tags on a resource or subscription. Gets the entire set of tags on a resource or subscription. |
| list |
Gets a summary of tag usage under the subscription. 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. |
| update_at_scope |
Selectively updates the set of tags on a resource or subscription. 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. |
create_or_update
Creates a predefined tag name.
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'.
async create_or_update(tag_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2021_01_01.models._models_py3.TagDetails
Parameters
- 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_at_scope
Creates or updates the entire set of tags on a resource or subscription.
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.
async create_or_update_at_scope(scope: str, parameters: azure.mgmt.resource.resources.v2021_01_01.models._models_py3.TagsResource, **kwargs: Any) -> azure.mgmt.resource.resources.v2021_01_01.models._models_py3.TagsResource
Parameters
- parameters
- TagsResource
- cls
- callable
A custom type or function that will be passed the direct response
Returns
TagsResource, or the result of cls(response)
Return type
Exceptions
create_or_update_value
Creates a predefined value for a predefined tag name.
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.
async create_or_update_value(tag_name: str, tag_value: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2021_01_01.models._models_py3.TagValue
Parameters
- 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 predefined tag name.
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.
async delete(tag_name: str, **kwargs: Any) -> None
Parameters
- 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_at_scope
Deletes the entire set of tags on a resource or subscription.
Deletes the entire set of tags on a resource or subscription.
async delete_at_scope(scope: str, **kwargs: Any) -> None
Parameters
- 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 predefined tag value for a predefined tag name.
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.
async delete_value(tag_name: str, tag_value: str, **kwargs: Any) -> None
Parameters
- 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
get_at_scope
Gets the entire set of tags on a resource or subscription.
Gets the entire set of tags on a resource or subscription.
async get_at_scope(scope: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2021_01_01.models._models_py3.TagsResource
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
TagsResource, or the result of cls(response)
Return type
Exceptions
list
Gets a summary of tag usage under the subscription.
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.
list(**kwargs: Any) -> AsyncIterable[azure.mgmt.resource.resources.v2021_01_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
update_at_scope
Selectively updates the set of tags on a resource or subscription.
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.
async update_at_scope(scope: str, parameters: azure.mgmt.resource.resources.v2021_01_01.models._models_py3.TagsPatchResource, **kwargs: Any) -> azure.mgmt.resource.resources.v2021_01_01.models._models_py3.TagsResource
Parameters
- parameters
- TagsPatchResource
- cls
- callable
A custom type or function that will be passed the direct response
Returns
TagsResource, or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.resource.resources.v2021_01_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\resource\\resources\\v2021_01_01\\models\\__init__.py'>
Feedback
Submit and view feedback for