Skip to main content
Represents a special or lazily-evaluated value. 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.

Initializers

import io.cdktn.cdktn.Token;

new Token();
NameTypeDescription

Static Functions

NameDescription
asAnyReturn a resolvable representation of the given value.
asAnyMapReturn a reversible map representation of this token.
asBooleanMapReturn a reversible map representation of this token.
asListReturn a reversible list representation of this token.
asMapReturn a reversible map representation of this token.
asNumberReturn a reversible number representation of this token.
asNumberListReturn a reversible list representation of this token.
asNumberMapReturn a reversible map representation of this token.
asStringReturn a reversible string representation of this token.
asStringMapReturn a reversible map representation of this token.
isUnresolvedReturns true if obj represents an unresolved value.
nullValueReturn a Token containing a null value.

asAny

import io.cdktn.cdktn.Token;

Token.asAny(java.lang.Object value)
Return a resolvable representation of the given value.

valueRequired

  • Type: java.lang.Object

asAnyMap

import io.cdktn.cdktn.Token;

Token.asAnyMap(java.lang.Object value),Token.asAnyMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.

valueRequired

  • Type: java.lang.Object

optionsOptional


asBooleanMap

import io.cdktn.cdktn.Token;

Token.asBooleanMap(java.lang.Object value),Token.asBooleanMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.

valueRequired

  • Type: java.lang.Object

optionsOptional


asList

import io.cdktn.cdktn.Token;

Token.asList(java.lang.Object value),Token.asList(java.lang.Object value, EncodingOptions options)
Return a reversible list representation of this token.

valueRequired

  • Type: java.lang.Object

optionsOptional


asMap

import io.cdktn.cdktn.Token;

Token.asMap(java.lang.Object value, java.lang.Object mapValue),Token.asMap(java.lang.Object value, java.lang.Object mapValue, EncodingOptions options)
Return a reversible map representation of this token.

valueRequired

  • Type: java.lang.Object

mapValueRequired

  • Type: java.lang.Object

optionsOptional


asNumber

import io.cdktn.cdktn.Token;

Token.asNumber(java.lang.Object value)
Return a reversible number representation of this token.

valueRequired

  • Type: java.lang.Object

asNumberList

import io.cdktn.cdktn.Token;

Token.asNumberList(java.lang.Object value)
Return a reversible list representation of this token.

valueRequired

  • Type: java.lang.Object

asNumberMap

import io.cdktn.cdktn.Token;

Token.asNumberMap(java.lang.Object value),Token.asNumberMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.

valueRequired

  • Type: java.lang.Object

optionsOptional


asString

import io.cdktn.cdktn.Token;

Token.asString(java.lang.Object value),Token.asString(java.lang.Object value, EncodingOptions options)
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.

valueRequired

  • Type: java.lang.Object

optionsOptional


asStringMap

import io.cdktn.cdktn.Token;

Token.asStringMap(java.lang.Object value),Token.asStringMap(java.lang.Object value, EncodingOptions options)
Return a reversible map representation of this token.

valueRequired

  • Type: java.lang.Object

optionsOptional


isUnresolved

import io.cdktn.cdktn.Token;

Token.isUnresolved(java.lang.Object obj)
Returns true if obj represents an unresolved value. One of these must be true:
  • obj is an IResolvable
  • obj is a string containing at least one encoded IResolvable
  • obj is either an encoded number or list
This does NOT recurse into lists or objects to see if they containing resolvables.

objRequired

  • Type: java.lang.Object
The object to test.

nullValue

import io.cdktn.cdktn.Token;

Token.nullValue()
Return a Token containing a null value. 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)

Constants

NameTypeDescription
ANY_MAP_TOKEN_VALUEjava.lang.StringAny map token representation.
NUMBER_MAP_TOKEN_VALUEjava.lang.NumberNumber Map token value representation.
STRING_MAP_TOKEN_VALUEjava.lang.StringString Map token value representation.

ANY_MAP_TOKEN_VALUERequired

public java.lang.String getAnyMapTokenValue();
  • Type: java.lang.String
Any map token representation.

NUMBER_MAP_TOKEN_VALUERequired

public java.lang.Number getNumberMapTokenValue();
  • Type: java.lang.Number
Number Map token value representation.

STRING_MAP_TOKEN_VALUERequired

public java.lang.String getStringMapTokenValue();
  • Type: java.lang.String
String Map token value representation.