Skip to content

TagManager

TagManager facilitates a common implementation of tagging for Constructs.

Initializers

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.NewTagManager(tagType TagType, resourceTypeName *string, tagStructure interface{}, options TagManagerOptions) TagManager
Name Type Description
tagType TagType No description.
resourceTypeName *string No description.
tagStructure interface{} No description.
options TagManagerOptions No description.

tagTypeRequired


resourceTypeNameRequired

  • Type: *string

tagStructureOptional

  • Type: interface{}

optionsOptional


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

func ApplyTagAspectHere(include *[]*string, exclude *[]*string) *bool

Determine if the aspect applies here.

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

includeOptional

  • Type: []string

excludeOptional

  • Type: []string

HasTags

func HasTags() *bool

Returns true if there are any tags defined.

RemoveTag

func RemoveTag(key *string, priority *f64)

Removes the specified tag from the array if it exists.

keyRequired

  • Type: *string

The tag to remove.


priorityRequired

  • Type: *f64

The priority of the remove operation.


RenderTags

func RenderTags() interface{}

Renders tags into the proper format based on TagType.

SetTag

func SetTag(key *string, value *string, priority *f64, applyToLaunchedInstances *bool)

Adds the specified tag to the array of tags.

keyRequired

  • Type: *string

valueRequired

  • Type: *string

priorityOptional

  • Type: *f64

applyToLaunchedInstancesOptional

  • Type: *bool

TagValues

func TagValues() *map[string]*string

Render the tags in a readable format.

Static Functions

Name Description
IsTaggable Check whether the given construct is Taggable.

IsTaggable

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.TagManager_IsTaggable(construct interface{}) *bool

Check whether the given construct is Taggable.

constructRequired

  • Type: interface{}

Properties

Name Type Description
TagPropertyName *string The property name for tag values.

TagPropertyNameRequired

func TagPropertyName() *string
  • Type: *string

The property name for tag values.

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