Tokenization
Less oft-needed functions to manipulate Tokens.
Static Functions
Name | Description |
---|---|
IsResolvable |
Return whether the given object is an IResolvable object. |
Resolve |
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays. |
ReverseList |
Un-encode a Tokenized value from a list. |
ReverseNumber |
Un-encode a Tokenized value from a number. |
ReverseString |
Un-encode a string potentially containing encoded tokens. |
StringifyNumber |
Stringify a number directly or lazily if it's a Token. |
IsResolvable
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.Tokenization_IsResolvable(obj interface{}) *bool
Return whether the given object is an IResolvable object.
This is different from Token.isUnresolved() which will also check for encoded Tokens, whereas this method will only do a type check on the given object.
- Type: interface{}
Resolve
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.Tokenization_Resolve(obj interface{}, options ResolveOptions) interface{}
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays.
Values can only be primitives, arrays or tokens. Other objects (i.e. with methods) will be rejected.
- Type: interface{}
The object to resolve.
- Type: ResolveOptions
Prefix key path components for diagnostics.
ReverseList
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.Tokenization_ReverseList(l *[]*string) IResolvable
Un-encode a Tokenized value from a list.
- Type: []string
ReverseNumber
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.Tokenization_ReverseNumber(n *f64) IResolvable
Un-encode a Tokenized value from a number.
- Type: *f64
ReverseString
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.Tokenization_ReverseString(s *string) TokenizedStringFragments
Un-encode a string potentially containing encoded tokens.
- Type: *string
StringifyNumber
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore"
alicloudroscdkcore.Tokenization_StringifyNumber(x *f64) *string
Stringify a number directly or lazily if it's a Token.
If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is.
- Type: *f64