Skip to content

TagManager

TagManager facilitates a common implementation of tagging for Constructs.

Initializers

import com.aliyun.ros.cdk.core.TagManager;
TagManager.Builder.create(TagType tagType, java.lang.String resourceTypeName, java.lang.Object tagStructure)
//  .tagPropertyName(java.lang.String)
    .build();
Name Type Description
tagType TagType No description.
resourceTypeName java.lang.String No description.
tagStructure java.lang.Object No description.
tagPropertyName java.lang.String The name of the property in ROS for these tags.

tagTypeRequired


resourceTypeNameRequired

  • Type: java.lang.String

tagStructureOptional

  • Type: java.lang.Object

tagPropertyNameOptional

  • Type: java.lang.String
  • Default: "tags"

The name of the property in ROS for these tags.

Normally this is tags, but Cognito UserPool uses UserPoolTags


Methods

Name Description
applyTagAspectHere Determine if the aspect applies here.
hasTags Returns true if there are any tags defined.
removeTag Removes the specified tag from the array if it exists.
renderTags Renders tags into the proper format based on TagType.
setTag Adds the specified tag to the array of tags.
tagValues Render the tags in a readable format.

applyTagAspectHere

public java.lang.Boolean applyTagAspectHere()
public java.lang.Boolean applyTagAspectHere(java.util.List<java.lang.String> include)
public java.lang.Boolean applyTagAspectHere(java.util.List<java.lang.String> include, java.util.List<java.lang.String> exclude)

Determine if the aspect applies here.

Looks at the include and exclude resourceTypeName arrays to determine if the aspect applies here

includeOptional

  • Type: java.util.List

excludeOptional

  • Type: java.util.List

hasTags

public java.lang.Boolean hasTags()

Returns true if there are any tags defined.

removeTag

public void removeTag(java.lang.String key, java.lang.Number priority)

Removes the specified tag from the array if it exists.

keyRequired

  • Type: java.lang.String

The tag to remove.


priorityRequired

  • Type: java.lang.Number

The priority of the remove operation.


renderTags

public java.lang.Object renderTags()

Renders tags into the proper format based on TagType.

setTag

public void setTag(java.lang.String key, java.lang.String value)
public void setTag(java.lang.String key, java.lang.String value, java.lang.Number priority)
public void setTag(java.lang.String key, java.lang.String value, java.lang.Number priority, java.lang.Boolean applyToLaunchedInstances)

Adds the specified tag to the array of tags.

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.String

priorityOptional

  • Type: java.lang.Number

applyToLaunchedInstancesOptional

  • Type: java.lang.Boolean

tagValues

public java.util.Map<java.lang.String, java.lang.String> tagValues()

Render the tags in a readable format.

Static Functions

Name Description
isTaggable Check whether the given construct is Taggable.

isTaggable

import com.aliyun.ros.cdk.core.TagManager;
TagManager.isTaggable(java.lang.Object construct)

Check whether the given construct is Taggable.

constructRequired

  • Type: java.lang.Object

Properties

Name Type Description
tagPropertyName java.lang.String The property name for tag values.

tagPropertyNameRequired

public java.lang.String getTagPropertyName();
  • Type: java.lang.String

The property name for tag values.

Normally this is tags but some resources choose a different name. Cognito UserPool uses UserPoolTags