Class Tokenization

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Tokenization
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:55.890Z") @Stability(Stable) public class Tokenization extends software.amazon.jsii.JsiiObject
Less oft-needed functions to manipulate Tokens.
  • Constructor Details

    • Tokenization

      protected Tokenization(software.amazon.jsii.JsiiObjectRef objRef)
    • Tokenization

      protected Tokenization(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • isResolvable

      @Stability(Stable) @NotNull public static Boolean isResolvable(@NotNull Object obj)
      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.

      Parameters:
      obj - This parameter is required.
    • resolve

      @Stability(Stable) @NotNull public static Object resolve(@NotNull Object obj, @NotNull ResolveOptions options)
      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.

      Parameters:
      obj - The object to resolve. This parameter is required.
      options - Prefix key path components for diagnostics. This parameter is required.
    • reverse

      @Stability(Stable) @Nullable public static IResolvable reverse(@NotNull Object x, @Nullable ReverseOptions options)
      Reverse any value into a Resolvable, if possible.

      In case of a string, the string must not be a concatenation.

      Parameters:
      x - This parameter is required.
      options -
    • reverse

      @Stability(Stable) @Nullable public static IResolvable reverse(@NotNull Object x)
      Reverse any value into a Resolvable, if possible.

      In case of a string, the string must not be a concatenation.

      Parameters:
      x - This parameter is required.
    • reverseCompleteString

      @Stability(Stable) @Nullable public static IResolvable reverseCompleteString(@NotNull String s)
      Un-encode a string which is either a complete encoded token, or doesn't contain tokens at all.

      It's illegal for the string to be a concatenation of an encoded token and something else.

      Parameters:
      s - This parameter is required.
    • reverseList

      @Stability(Stable) @Nullable public static IResolvable reverseList(@NotNull List<String> l)
      Un-encode a Tokenized value from a list.

      Parameters:
      l - This parameter is required.
    • reverseNumber

      @Stability(Stable) @Nullable public static IResolvable reverseNumber(@NotNull Number n)
      Un-encode a Tokenized value from a number.

      Parameters:
      n - This parameter is required.
    • reverseString

      @Stability(Stable) @NotNull public static TokenizedStringFragments reverseString(@NotNull String s)
      Un-encode a string potentially containing encoded tokens.

      Parameters:
      s - This parameter is required.
    • stringifyNumber

      @Stability(Stable) @NotNull public static String stringifyNumber(@NotNull Number x)
      Stringify a number directly or lazily if it's a Token.

      If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is.

      Parameters:
      x - This parameter is required.