CfnDynamicReference Class
References a dynamically retrieved value.
This is a Construct so that subclasses will (eventually) be able to attach metadata to themselves without having to change call signatures.
Example
ts
new CfnDynamicReference(
CfnDynamicReferenceService.SECRETS_MANAGER,
'secret-id:secret-string:json-key:version-stage:version-id',
);
python
CfnDynamicReference(CfnDynamicReferenceService.SECRETS_MANAGER, "secret-id:secret-string:json-key:version-stage:version-id")
java
new CfnDynamicReference(CfnDynamicReferenceService.SECRETS_MANAGER, "secret-id:secret-string:json-key:version-stage:version-id");
csharp
// Install: dotnet add package Amazon.CDK.Lib
new CfnDynamicReference(CfnDynamicReferenceService.SECRETS_MANAGER, "secret-id:secret-string:json-key:version-stage:version-id");
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
awscdk.NewCfnDynamicReference(awscdk.CfnDynamicReferenceService_SECRETS_MANAGER, jsii.String("secret-id:secret-string:json-key:version-stage:version-id"))
Initializer
ts
new CfnDynamicReference(service: CfnDynamicReferenceService, key: string)
python
CfnDynamicReference(service: CfnDynamicReferenceService, key: str)
java
new CfnDynamicReference(CfnDynamicReferenceService service, String key)
csharp
new CfnDynamicReference(CfnDynamicReferenceService service, string key)
go
NewCfnDynamicReference(Service CfnDynamicReferenceService, Key *string)
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.
typeHintResolutionTypeHinttype_hintResolutionTypeHinttypeHintResolutionTypeHintTypeHintResolutionTypeHintTypeHintResolutionTypeHint#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.