Skip to content
v2.274.0

Intrinsic Class ​

Token subclass that represents values intrinsic to the target document language.

WARNING: this class should not be externally exposed, but is currently visible because of a limitation of jsii (https://github.com/aws/jsii/issues/524).

This class will disappear in a future release and should not be used.

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';

declare const value: any;
const intrinsic = new cdk.Intrinsic(value, /* all optional props */ {
  stackTrace: false,
  typeHint: cdk.ResolutionTypeHint.STRING,
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

# value: Any

intrinsic = cdk.Intrinsic(value,
    stack_trace=False,
    type_hint=cdk.ResolutionTypeHint.STRING
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

Object value;

Intrinsic intrinsic = Intrinsic.Builder.create(value)
        .stackTrace(false)
        .typeHint(ResolutionTypeHint.STRING)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;

var value;

var intrinsic = new Intrinsic(value, new IntrinsicProps {
    StackTrace = false,
    TypeHint = ResolutionTypeHint.STRING
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var value interface{}

intrinsic := cdk.NewIntrinsic(value, &IntrinsicProps{
	StackTrace: jsii.Boolean(false),
	TypeHint: cdk.ResolutionTypeHint_STRING,
})

Initializer ​

ts
new Intrinsic(value: any, options?: IntrinsicProps)
python
Intrinsic(value: Any, options: typing.Optional[IntrinsicProps] = None)
java
new Intrinsic(Object value, IntrinsicProps options)
csharp
new Intrinsic(object value, IntrinsicProps? options = null)
go
NewIntrinsic(Value interface{}, Options IntrinsicProps)

Properties ​

creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#
The captured stack trace which represents the location in which this token was created.
Type that the Intrinsic is expected to evaluate to.

Methods ​

resolve(_context: IResolveContext): anydef resolve(self, _context: IResolveContext) -> Anypublic Object resolve(IResolveContext _context)public object Resolve(IResolveContext _context)func Resolve(_context IResolveContext) interface{}#
Produce the Token's value at resolution time.
toJSON(): anydef to_json(self, ) -> Anypublic Object toJSON()public object ToJSON()func ToJSON() interface{}#
Turn this Token into JSON.

Called automatically when JSON.stringify() is called on a Token.

toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Convert an instance of this Token to a string.

This method will be called implicitly by language runtimes if the object is embedded into a string. We treat it the same as an explicit stringification.

toStringList(): string[]def to_string_list(self, ) -> typing.List[str]public List<String> toStringList()public string[] ToStringList()func ToStringList() *[]*string#
Convert an instance of this Token to a string list.

This method will be called implicitly by language runtimes if the object is embedded into a list. We treat it the same as an explicit stringification.