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. |
TagType
Required
- Type: TagType
ResourceTypeName
Required
- Type: string
TagStructure
Optional
- Type: object
Options
Optional
- Type: TagManagerOptions
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
- Type: string[]
- 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.
- Type: string
The tag to remove.
- 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.
- Type: string
- Type: string
- Type: double
ApplyToLaunchedInstances
Optional
- 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.
- Type: object
Properties
Name | Type | Description |
---|---|---|
TagPropertyName |
string |
The property name for tag values. |
TagPropertyName
Required
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