Class Token
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Can be used to delay evaluation of a certain value in case, for example, that it requires some context or late-bound data. Can also be used to mark values that need special processing at document rendering time.
Tokens can be embedded into strings while retaining their original semantics.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IResolvable(experimental) Return a resolvable representation of the given value.(experimental) Return a reversible map representation of this token.asAnyMap(Object value, EncodingOptions options) (experimental) Return a reversible map representation of this token.asBooleanMap(Object value) (experimental) Return a reversible map representation of this token.asBooleanMap(Object value, EncodingOptions options) (experimental) Return a reversible map representation of this token.(experimental) Return a reversible list representation of this token.asList(Object value, EncodingOptions options) (experimental) Return a reversible list representation of this token.(experimental) Return a reversible map representation of this token.asMap(Object value, Object mapValue, EncodingOptions options) (experimental) Return a reversible map representation of this token.static Number(experimental) Return a reversible number representation of this token.asNumberList(Object value) (experimental) Return a reversible list representation of this token.asNumberMap(Object value) (experimental) Return a reversible map representation of this token.asNumberMap(Object value, EncodingOptions options) (experimental) Return a reversible map representation of this token.static String(experimental) Return a reversible string representation of this token.static StringasString(Object value, EncodingOptions options) (experimental) Return a reversible string representation of this token.asStringMap(Object value) (experimental) Return a reversible map representation of this token.asStringMap(Object value, EncodingOptions options) (experimental) Return a reversible map representation of this token.static BooleanisUnresolved(Object obj) (experimental) Returns true if obj represents an unresolved value.static IResolvable(experimental) Return a Token containing anullvalue.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
ANY_MAP_TOKEN_VALUE
(experimental) Any map token representation. -
NUMBER_MAP_TOKEN_VALUE
(experimental) Number Map token value representation. -
STRING_MAP_TOKEN_VALUE
(experimental) String Map token value representation.
-
-
Constructor Details
-
Token
protected Token(software.amazon.jsii.JsiiObjectRef objRef) -
Token
protected Token(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Token
@Stability(Experimental) public Token()
-
-
Method Details
-
asAny
(experimental) Return a resolvable representation of the given value.- Parameters:
value- This parameter is required.
-
asAnyMap
@Stability(Experimental) @NotNull public static Map<String,Object> asAnyMap(@NotNull Object value, @Nullable EncodingOptions options) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.options-
-
asAnyMap
(experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.
-
asBooleanMap
@Stability(Experimental) @NotNull public static Map<String,Boolean> asBooleanMap(@NotNull Object value, @Nullable EncodingOptions options) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.options-
-
asBooleanMap
@Stability(Experimental) @NotNull public static Map<String,Boolean> asBooleanMap(@NotNull Object value) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.
-
asList
@Stability(Experimental) @NotNull public static List<String> asList(@NotNull Object value, @Nullable EncodingOptions options) (experimental) Return a reversible list representation of this token.- Parameters:
value- This parameter is required.options-
-
asList
(experimental) Return a reversible list representation of this token.- Parameters:
value- This parameter is required.
-
asMap
@Stability(Experimental) @NotNull public static Map<String,Object> asMap(@NotNull Object value, @NotNull Object mapValue, @Nullable EncodingOptions options) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.mapValue- This parameter is required.options-
-
asMap
@Stability(Experimental) @NotNull public static Map<String,Object> asMap(@NotNull Object value, @NotNull Object mapValue) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.mapValue- This parameter is required.
-
asNumber
(experimental) Return a reversible number representation of this token.- Parameters:
value- This parameter is required.
-
asNumberList
(experimental) Return a reversible list representation of this token.- Parameters:
value- This parameter is required.
-
asNumberMap
@Stability(Experimental) @NotNull public static Map<String,Number> asNumberMap(@NotNull Object value, @Nullable EncodingOptions options) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.options-
-
asNumberMap
@Stability(Experimental) @NotNull public static Map<String,Number> asNumberMap(@NotNull Object value) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.
-
asString
@Stability(Experimental) @NotNull public static String asString(@NotNull Object value, @Nullable EncodingOptions options) (experimental) Return a reversible string representation of this token.If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.
Strings with quoted Tokens in them can be restored back into complex values with the Tokens restored by calling
resolve()on the string.- Parameters:
value- This parameter is required.options-
-
asString
(experimental) Return a reversible string representation of this token.If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.
Strings with quoted Tokens in them can be restored back into complex values with the Tokens restored by calling
resolve()on the string.- Parameters:
value- This parameter is required.
-
asStringMap
@Stability(Experimental) @NotNull public static Map<String,String> asStringMap(@NotNull Object value, @Nullable EncodingOptions options) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.options-
-
asStringMap
@Stability(Experimental) @NotNull public static Map<String,String> asStringMap(@NotNull Object value) (experimental) Return a reversible map representation of this token.- Parameters:
value- This parameter is required.
-
isUnresolved
(experimental) Returns true if obj represents an unresolved value.One of these must be true:
objis an IResolvableobjis a string containing at least one encodedIResolvableobjis either an encoded number or list
This does NOT recurse into lists or objects to see if they containing resolvables.
- Parameters:
obj- The object to test. This parameter is required.
-
nullValue
(experimental) Return a Token containing anullvalue.Note: This is different than
undefined,nil,Noneor similar as it will end up in the Terraform config and can be used to explicitly not set an attribute (which is sometimes required by Terraform providers)- Returns:
- a Token resolving to
nullas understood by Terraform
-