TagsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:tags> attribute.
- Inheritance
-
builtins.objectTagsOperations
Constructor
TagsOperations(*args, **kwargs)
Methods
begin_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. |
begin_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. |
begin_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'. |
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_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. |
begin_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.
begin_create_or_update_at_scope(scope: str, parameters: _models.TagsResource, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.TagsResource]
Parameters
Name | Description |
---|---|
scope
Required
|
The resource scope. Required. |
parameters
Required
|
Is either a TagsResource type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either TagsResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_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.
begin_delete_at_scope(scope: str, **kwargs: Any) -> LROPoller[None]
Parameters
Name | Description |
---|---|
scope
Required
|
The resource scope. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_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.
begin_update_at_scope(scope: str, parameters: _models.TagsPatchResource, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.TagsResource]
Parameters
Name | Description |
---|---|
scope
Required
|
The resource scope. Required. |
parameters
Required
|
Is either a TagsPatchResource type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either TagsResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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(tag_name: str, **kwargs: Any) -> TagDetails
Parameters
Name | Description |
---|---|
tag_name
Required
|
The name of the tag to create. Required. |
Returns
Type | Description |
---|---|
TagDetails or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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.
create_or_update_value(tag_name: str, tag_value: str, **kwargs: Any) -> TagValue
Parameters
Name | Description |
---|---|
tag_name
Required
|
The name of the tag. Required. |
tag_value
Required
|
The value of the tag to create. Required. |
Returns
Type | Description |
---|---|
TagValue or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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(tag_name: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
tag_name
Required
|
The name of the tag. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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.
delete_value(tag_name: str, tag_value: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
tag_name
Required
|
The name of the tag. Required. |
tag_value
Required
|
The value of the tag to delete. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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.
get_at_scope(scope: str, **kwargs: Any) -> TagsResource
Parameters
Name | Description |
---|---|
scope
Required
|
The resource scope. Required. |
Returns
Type | Description |
---|---|
TagsResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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) -> Iterable[TagDetails]
Returns
Type | Description |
---|---|
An iterator like instance of either TagDetails or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.resource.resources.v2022_09_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\resource\\resources\\v2022_09_01\\models\\__init__.py'>
Azure SDK for Python