Skip to content
v2.274.0

TokenComparison Class ​

An enum-like class that represents the result of comparing two Tokens.

The return type of Token.compareStrings.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const tokenComparison = cdk.TokenComparison.BOTH_UNRESOLVED;

Properties ​

BOTH_UNRESOLVEDTokenComparisonboth_unresolvedTokenComparisonBOTH_UNRESOLVEDTokenComparisonBOTH_UNRESOLVEDTokenComparisonBOTH_UNRESOLVEDTokenComparisonrequiredstatic#
This means both components are Tokens.
DIFFERENTTokenComparisondifferentTokenComparisonDIFFERENTTokenComparisonDIFFERENTTokenComparisonDIFFERENTTokenComparisonrequiredstatic#
This means we're certain the two components are NOT Tokens, and different.
ONE_UNRESOLVEDTokenComparisonone_unresolvedTokenComparisonONE_UNRESOLVEDTokenComparisonONE_UNRESOLVEDTokenComparisonONE_UNRESOLVEDTokenComparisonrequiredstatic#
This means exactly one of the components is a Token.
This means we're certain the two components are NOT Tokens, and identical.