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

using Io.Cdktn;

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

using Io.Cdktn;

Token.AsAny(object Value);
Return a resolvable representation of the given value.

ValueRequired

  • Type: object

AsAnyMap

using Io.Cdktn;

Token.AsAnyMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.

ValueRequired

  • Type: object

OptionsOptional


AsBooleanMap

using Io.Cdktn;

Token.AsBooleanMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.

ValueRequired

  • Type: object

OptionsOptional


AsList

using Io.Cdktn;

Token.AsList(object Value, EncodingOptions Options = null);
Return a reversible list representation of this token.

ValueRequired

  • Type: object

OptionsOptional


AsMap

using Io.Cdktn;

Token.AsMap(object Value, object MapValue, EncodingOptions Options = null);
Return a reversible map representation of this token.

ValueRequired

  • Type: object

MapValueRequired

  • Type: object

OptionsOptional


AsNumber

using Io.Cdktn;

Token.AsNumber(object Value);
Return a reversible number representation of this token.

ValueRequired

  • Type: object

AsNumberList

using Io.Cdktn;

Token.AsNumberList(object Value);
Return a reversible list representation of this token.

ValueRequired

  • Type: object

AsNumberMap

using Io.Cdktn;

Token.AsNumberMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.

ValueRequired

  • Type: object

OptionsOptional


AsString

using Io.Cdktn;

Token.AsString(object Value, EncodingOptions Options = null);
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: object

OptionsOptional


AsStringMap

using Io.Cdktn;

Token.AsStringMap(object Value, EncodingOptions Options = null);
Return a reversible map representation of this token.

ValueRequired

  • Type: object

OptionsOptional


IsUnresolved

using Io.Cdktn;

Token.IsUnresolved(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: object
The object to test.

NullValue

using Io.Cdktn;

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
AnyMapTokenValuestringAny map token representation.
NumberMapTokenValuedoubleNumber Map token value representation.
StringMapTokenValuestringString Map token value representation.

AnyMapTokenValueRequired

public string AnyMapTokenValue { get; }
  • Type: string
Any map token representation.

NumberMapTokenValueRequired

public double NumberMapTokenValue { get; }
  • Type: double
Number Map token value representation.

StringMapTokenValueRequired

public string StringMapTokenValue { get; }
  • Type: string
String Map token value representation.