TagManager
TagManager facilitates a common implementation of tagging for Constructs.
Initializers
import ros_cdk_core
ros_cdk_core.TagManager(
tag_type: TagType,
resource_type_name: str,
tag_structure: typing.Any = None,
tag_property_name: str = None
)
Name | Type | Description |
---|---|---|
tag_type |
TagType |
No description. |
resource_type_name |
str |
No description. |
tag_structure |
typing.Any |
No description. |
tag_property_name |
str |
The name of the property in ROS for these tags. |
tag_type
Required
- Type: TagType
resource_type_name
Required
- Type: str
tag_structure
Optional
- Type: typing.Any
tag_property_name
Optional
- Type: str
- Default: "tags"
The name of the property in ROS for these tags.
Normally this is tags
, but Cognito UserPool uses UserPoolTags
Methods
Name | Description |
---|---|
apply_tag_aspect_here |
Determine if the aspect applies here. |
has_tags |
Returns true if there are any tags defined. |
remove_tag |
Removes the specified tag from the array if it exists. |
render_tags |
Renders tags into the proper format based on TagType. |
set_tag |
Adds the specified tag to the array of tags. |
tag_values |
Render the tags in a readable format. |
apply_tag_aspect_here
def apply_tag_aspect_here(
include: typing.List[str] = None,
exclude: typing.List[str] = None
) -> bool
Determine if the aspect applies here.
Looks at the include and exclude resourceTypeName arrays to determine if the aspect applies here
- Type: typing.List[str]
- Type: typing.List[str]
has_tags
def has_tags() -> bool
Returns true if there are any tags defined.
remove_tag
def remove_tag(
key: str,
priority: typing.Union[int, float]
) -> None
Removes the specified tag from the array if it exists.
- Type: str
The tag to remove.
- Type: typing.Union[int, float]
The priority of the remove operation.
render_tags
def render_tags() -> typing.Any
Renders tags into the proper format based on TagType.
set_tag
def set_tag(
key: str,
value: str,
priority: typing.Union[int, float] = None,
apply_to_launched_instances: bool = None
) -> None
Adds the specified tag to the array of tags.
- Type: str
- Type: str
- Type: typing.Union[int, float]
apply_to_launched_instances
Optional
- Type: bool
tag_values
def tag_values() -> typing.Mapping[str]
Render the tags in a readable format.
Static Functions
Name | Description |
---|---|
is_taggable |
Check whether the given construct is Taggable. |
is_taggable
import ros_cdk_core
ros_cdk_core.TagManager.is_taggable(
construct: typing.Any
)
Check whether the given construct is Taggable.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
tag_property_name |
str |
The property name for tag values. |
tag_property_name
Required
tag_property_name: str
- Type: str
The property name for tag values.
Normally this is tags
but some resources choose a different name. Cognito
UserPool uses UserPoolTags