@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-02-03T16:18:08.808Z") @Stability(value=Experimental) public class Token extends software.amazon.jsii.JsiiObject
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.
Modifier and Type | Field and Description |
---|---|
static String |
ANY_MAP_TOKEN_VALUE
(experimental) Any map token representation.
|
static Number |
NUMBER_MAP_TOKEN_VALUE
(experimental) Number Map token value representation.
|
static String |
STRING_MAP_TOKEN_VALUE
(experimental) String Map token value representation.
|
Modifier | Constructor and Description |
---|---|
|
Token() |
protected |
Token(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Token(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static IResolvable |
asAny(Object value)
(experimental) Return a resolvable representation of the given value.
|
static Map<String,Object> |
asAnyMap(Object value)
(experimental) Return a reversible map representation of this token.
|
static Map<String,Object> |
asAnyMap(Object value,
EncodingOptions options)
(experimental) Return a reversible map representation of this token.
|
static Map<String,Boolean> |
asBooleanMap(Object value)
(experimental) Return a reversible map representation of this token.
|
static Map<String,Boolean> |
asBooleanMap(Object value,
EncodingOptions options)
(experimental) Return a reversible map representation of this token.
|
static List<String> |
asList(Object value)
(experimental) Return a reversible list representation of this token.
|
static List<String> |
asList(Object value,
EncodingOptions options)
(experimental) Return a reversible list representation of this token.
|
static Map<String,Object> |
asMap(Object value,
Object mapValue)
(experimental) Return a reversible map representation of this token.
|
static Map<String,Object> |
asMap(Object value,
Object mapValue,
EncodingOptions options)
(experimental) Return a reversible map representation of this token.
|
static Number |
asNumber(Object value)
(experimental) Return a reversible number representation of this token.
|
static List<Number> |
asNumberList(Object value)
(experimental) Return a reversible list representation of this token.
|
static Map<String,Number> |
asNumberMap(Object value)
(experimental) Return a reversible map representation of this token.
|
static Map<String,Number> |
asNumberMap(Object value,
EncodingOptions options)
(experimental) Return a reversible map representation of this token.
|
static String |
asString(Object value)
(experimental) Return a reversible string representation of this token.
|
static String |
asString(Object value,
EncodingOptions options)
(experimental) Return a reversible string representation of this token.
|
static Map<String,String> |
asStringMap(Object value)
(experimental) Return a reversible map representation of this token.
|
static Map<String,String> |
asStringMap(Object value,
EncodingOptions options)
(experimental) Return a reversible map representation of this token.
|
static Boolean |
isUnresolved(Object obj)
(experimental) Returns true if obj represents an unresolved value.
|
static IResolvable |
nullValue()
(experimental) Return a Token containing a `null` value.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
@Stability(value=Experimental) public static final String ANY_MAP_TOKEN_VALUE
@Stability(value=Experimental) public static final Number NUMBER_MAP_TOKEN_VALUE
@Stability(value=Experimental) public static final String STRING_MAP_TOKEN_VALUE
protected Token(software.amazon.jsii.JsiiObjectRef objRef)
protected Token(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) public Token()
@Stability(value=Experimental) @NotNull public static IResolvable asAny(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Map<String,Object> asAnyMap(@NotNull Object value, @Nullable EncodingOptions options)
value
- This parameter is required.options
- @Stability(value=Experimental) @NotNull public static Map<String,Object> asAnyMap(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Map<String,Boolean> asBooleanMap(@NotNull Object value, @Nullable EncodingOptions options)
value
- This parameter is required.options
- @Stability(value=Experimental) @NotNull public static Map<String,Boolean> asBooleanMap(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> asList(@NotNull Object value, @Nullable EncodingOptions options)
value
- This parameter is required.options
- @Stability(value=Experimental) @NotNull public static List<String> asList(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Map<String,Object> asMap(@NotNull Object value, @NotNull Object mapValue, @Nullable EncodingOptions options)
value
- This parameter is required.mapValue
- This parameter is required.options
- @Stability(value=Experimental) @NotNull public static Map<String,Object> asMap(@NotNull Object value, @NotNull Object mapValue)
value
- This parameter is required.mapValue
- This parameter is required.@Stability(value=Experimental) @NotNull public static Number asNumber(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static List<Number> asNumberList(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Map<String,Number> asNumberMap(@NotNull Object value, @Nullable EncodingOptions options)
value
- This parameter is required.options
- @Stability(value=Experimental) @NotNull public static Map<String,Number> asNumberMap(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static String asString(@NotNull Object value, @Nullable EncodingOptions options)
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.
value
- This parameter is required.options
- @Stability(value=Experimental) @NotNull public static String asString(@NotNull Object value)
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.
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Map<String,String> asStringMap(@NotNull Object value, @Nullable EncodingOptions options)
value
- This parameter is required.options
- @Stability(value=Experimental) @NotNull public static Map<String,String> asStringMap(@NotNull Object value)
value
- This parameter is required.@Stability(value=Experimental) @NotNull public static Boolean isUnresolved(@NotNull Object obj)
One of these must be true:
obj
is an IResolvableobj
is a string containing at least one encoded IResolvable
obj
is either an encoded number or listThis does NOT recurse into lists or objects to see if they containing resolvables.
obj
- The object to test. This parameter is required.@Stability(value=Experimental) @NotNull public static IResolvable nullValue()
Note: This is different than undefined
, nil
, None
or 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)
Copyright © 2023. All rights reserved.