ResolveOptions Struct
Options to the resolve() operation.
NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way.
| Source | core/lib/token.ts |
|---|
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';
import * as constructs from 'constructs';
declare const construct: constructs.Construct;
declare const tokenResolver: cdk.ITokenResolver;
const resolveOptions: cdk.ResolveOptions = {
resolver: tokenResolver,
scope: construct,
// the properties below are optional
preparing: false,
removeEmpty: false,
};
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
import constructs as constructs
# construct: constructs.Construct
# token_resolver: cdk.ITokenResolver
resolve_options = cdk.ResolveOptions(
resolver=token_resolver,
scope=construct,
# the properties below are optional
preparing=False,
remove_empty=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.constructs.*;
Construct construct;
ITokenResolver tokenResolver;
ResolveOptions resolveOptions = ResolveOptions.builder()
.resolver(tokenResolver)
.scope(construct)
// the properties below are optional
.preparing(false)
.removeEmpty(false)
.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;
using Constructs;
Construct construct;
ITokenResolver tokenResolver;
var resolveOptions = new ResolveOptions {
Resolver = tokenResolver,
Scope = construct,
// the properties below are optional
Preparing = false,
RemoveEmpty = false
};
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 cdk "github.com/aws/aws-cdk-go/awscdk"
import constructs "github.com/aws/constructs-go/constructs"
var construct Construct
var tokenResolver ITokenResolver
resolveOptions := &ResolveOptions{
Resolver: tokenResolver,
Scope: construct,
// the properties below are optional
Preparing: jsii.Boolean(false),
RemoveEmpty: jsii.Boolean(false),
}
Properties
preparingoptionalbooleanpreparingoptionalboolpreparingoptionalBooleanPreparingoptionalboolPreparingoptional*bool = false #Whether the resolution is being executed during the prepare phase or not.
removeEmptyoptionalbooleanremove_emptyoptionalboolremoveEmptyoptionalBooleanRemoveEmptyoptionalboolRemoveEmptyoptional*bool = true #Whether to remove undefined elements from arrays and objects when resolving.
resolverITokenResolverresolverITokenResolverresolverITokenResolverResolverITokenResolverResolverITokenResolver required #The resolver to apply to any resolvable tokens found.
The scope from which resolution is performed.