Skip to content

TagManager

TagManager facilitates a common implementation of tagging for Constructs.

Initializers

using AlibabaCloud.SDK.ROS.CDK.Core;
new TagManager(TagType TagType, string ResourceTypeName, object TagStructure = null, TagManagerOptions Options = null);
Name Type Description
TagType TagType No description.
ResourceTypeName string No description.
TagStructure object No description.
Options TagManagerOptions No description.

TagTypeRequired


ResourceTypeNameRequired

  • Type: string

TagStructureOptional

  • Type: object

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

private bool ApplyTagAspectHere(string[] Include = null, string[] Exclude = null)

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

private bool HasTags()

Returns true if there are any tags defined.

RemoveTag

private void RemoveTag(string Key, double Priority)

Removes the specified tag from the array if it exists.

KeyRequired

  • Type: string

The tag to remove.


PriorityRequired

  • Type: double

The priority of the remove operation.


RenderTags

private object RenderTags()

Renders tags into the proper format based on TagType.

SetTag

private void SetTag(string Key, string Value, double Priority = null, bool ApplyToLaunchedInstances = null)

Adds the specified tag to the array of tags.

KeyRequired

  • Type: string

ValueRequired

  • Type: string

PriorityOptional

  • Type: double

ApplyToLaunchedInstancesOptional

  • Type: bool

TagValues

private System.Collections.Generic.IDictionary<string, string> TagValues()

Render the tags in a readable format.

Static Functions

Name Description
IsTaggable Check whether the given construct is Taggable.

IsTaggable

using AlibabaCloud.SDK.ROS.CDK.Core;
TagManager.IsTaggable(object Construct);

Check whether the given construct is Taggable.

ConstructRequired

  • Type: object

Properties

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

TagPropertyNameRequired

public string TagPropertyName { get; }
  • Type: string

The property name for tag values.

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