TagManager

class aws_cdk.core.TagManager(tag_type, resource_type_name, tag_structure=None)

Bases: object

TagManager facilitates a common implementation of tagging for Constructs.

__init__(tag_type, resource_type_name, tag_structure=None)
Parameters
  • tag_type (TagType) –

  • resource_type_name (str) –

  • tag_structure (Optional[Any]) –

Return type

None

Methods

apply_tag_aspect_here(include=None, exclude=None)
Parameters
  • include (Optional[List[str]]) –

  • exclude (Optional[List[str]]) –

Return type

bool

has_tags()

Returns true if there are any tags defined.

Return type

bool

remove_tag(key, priority)

Removes the specified tag from the array if it exists.

Parameters
  • key (str) – The tag to remove.

  • priority (Union[int, float]) – The priority of the remove operation.

Return type

None

render_tags()

Renders tags into the proper format based on TagType.

Return type

Any

set_tag(key, value, priority=None, apply_to_launched_instances=None)

Adds the specified tag to the array of tags.

Parameters
  • key (str) –

  • value (str) –

  • priority (Union[int, float, None]) –

  • apply_to_launched_instances (Optional[bool]) –

Return type

None

Static Methods

classmethod is_taggable(construct)

Check whether the given construct is Taggable.

Parameters

construct (Any) –

Return type

bool