diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json
index c2d380e16a47b..52575038b862b 100644
--- a/packages/@aws-cdk/assets/package.json
+++ b/packages/@aws-cdk/assets/package.json
@@ -70,7 +70,7 @@
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
- "@types/sinon": "^9.0.8",
+ "@types/sinon": "^9.0.9",
"aws-cdk": "0.0.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
diff --git a/packages/@aws-cdk/aws-amplify/lib/app.ts b/packages/@aws-cdk/aws-amplify/lib/app.ts
index e2b4d4085eae5..8e7217a59cc58 100644
--- a/packages/@aws-cdk/aws-amplify/lib/app.ts
+++ b/packages/@aws-cdk/aws-amplify/lib/app.ts
@@ -219,7 +219,7 @@ export class App extends Resource implements IApp, iam.IGrantable {
buildSpec: props.autoBranchCreation.buildSpec && props.autoBranchCreation.buildSpec.toBuildSpec(),
enableAutoBranchCreation: true,
enableAutoBuild: props.autoBranchCreation.autoBuild === undefined ? true : props.autoBranchCreation.autoBuild,
- environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.autoBranchEnvironmentVariables ) }, { omitEmptyArray: true }), // eslint-disable-line max-len
+ environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.autoBranchEnvironmentVariables ) }, { omitEmptyArray: true }), // eslint-disable-line max-len
enablePullRequestPreview: props.autoBranchCreation.pullRequestPreview === undefined ? true : props.autoBranchCreation.pullRequestPreview,
pullRequestEnvironmentName: props.autoBranchCreation.pullRequestEnvironmentName,
stage: props.autoBranchCreation.stage,
@@ -227,9 +227,9 @@ export class App extends Resource implements IApp, iam.IGrantable {
enableBranchAutoDeletion: props.autoBranchDeletion,
basicAuthConfig: props.basicAuth && props.basicAuth.bind(this, 'AppBasicAuth'),
buildSpec: props.buildSpec && props.buildSpec.toBuildSpec(),
- customRules: Lazy.anyValue({ produce: () => this.customRules }, { omitEmptyArray: true }),
+ customRules: Lazy.any({ produce: () => this.customRules }, { omitEmptyArray: true }),
description: props.description,
- environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }),
+ environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }),
iamServiceRole: role.roleArn,
name: props.appName || this.node.id,
oauthToken: sourceCodeProviderOptions?.oauthToken?.toString(),
diff --git a/packages/@aws-cdk/aws-amplify/lib/branch.ts b/packages/@aws-cdk/aws-amplify/lib/branch.ts
index 31434b929e391..e26fe6c4d46a2 100644
--- a/packages/@aws-cdk/aws-amplify/lib/branch.ts
+++ b/packages/@aws-cdk/aws-amplify/lib/branch.ts
@@ -141,7 +141,7 @@ export class Branch extends Resource implements IBranch {
description: props.description,
enableAutoBuild: props.autoBuild === undefined ? true : props.autoBuild,
enablePullRequestPreview: props.pullRequestPreview === undefined ? true : props.pullRequestPreview,
- environmentVariables: Lazy.anyValue({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }),
+ environmentVariables: Lazy.any({ produce: () => renderEnvironmentVariables(this.environmentVariables) }, { omitEmptyArray: true }),
pullRequestEnvironmentName: props.pullRequestEnvironmentName,
stage: props.stage,
});
diff --git a/packages/@aws-cdk/aws-amplify/lib/domain.ts b/packages/@aws-cdk/aws-amplify/lib/domain.ts
index c8bb702f9b414..b657ebdefb247 100644
--- a/packages/@aws-cdk/aws-amplify/lib/domain.ts
+++ b/packages/@aws-cdk/aws-amplify/lib/domain.ts
@@ -105,7 +105,7 @@ export class Domain extends Resource {
const domain = new CfnDomain(this, 'Resource', {
appId: props.app.appId,
domainName,
- subDomainSettings: Lazy.anyValue({ produce: () => this.renderSubDomainSettings() }, { omitEmptyArray: true }),
+ subDomainSettings: Lazy.any({ produce: () => this.renderSubDomainSettings() }, { omitEmptyArray: true }),
});
this.arn = domain.attrArn;
diff --git a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts
index 82f7696fe2fa2..a354c8a4b3196 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts
@@ -118,7 +118,7 @@ abstract class LambdaAuthorizer extends Authorizer implements IAuthorizer {
* Throws an error, during token resolution, if no RestApi is attached to this authorizer.
*/
protected lazyRestApiId() {
- return Lazy.stringValue({
+ return Lazy.string({
produce: () => {
if (!this.restApiId) {
throw new Error(`Authorizer (${this.node.path}) must be attached to a RestApi`);
diff --git a/packages/@aws-cdk/aws-apigateway/lib/deployment.ts b/packages/@aws-cdk/aws-apigateway/lib/deployment.ts
index 877af8df471b3..a286e978fdafb 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/deployment.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/deployment.ts
@@ -78,7 +78,7 @@ export class Deployment extends Resource {
}
this.api = props.api;
- this.deploymentId = Lazy.stringValue({ produce: () => this.resource.ref });
+ this.deploymentId = Lazy.string({ produce: () => this.resource.ref });
if (props.api instanceof RestApiBase) {
props.api._attachDeployment(this);
@@ -141,7 +141,7 @@ class LatestDeploymentResource extends CfnDeployment {
this.api = props.restApi;
this.originalLogicalId = this.stack.getLogicalId(this);
- this.overrideLogicalId(Lazy.stringValue({ produce: () => this.calculateLogicalId() }));
+ this.overrideLogicalId(Lazy.uncachedString({ produce: () => this.calculateLogicalId() }));
}
/**
diff --git a/packages/@aws-cdk/aws-apigateway/lib/integration.ts b/packages/@aws-cdk/aws-apigateway/lib/integration.ts
index 9d08a02b57bc2..475358d672540 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/integration.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/integration.ts
@@ -204,7 +204,7 @@ export class Integration {
const options = this.props.options;
if (options?.connectionType === ConnectionType.VPC_LINK && uri === undefined) {
- uri = Lazy.stringValue({
+ uri = Lazy.string({
// needs to be a lazy since the targets can be added to the VpcLink construct after initialization.
produce: () => {
const vpcLink = options.vpcLink;
diff --git a/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts b/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts
index 2960d9c9431d8..6374bb404902a 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts
@@ -78,7 +78,7 @@ export class AwsIntegration extends Integration {
super({
type,
integrationHttpMethod: props.integrationHttpMethod || 'POST',
- uri: cdk.Lazy.stringValue({
+ uri: cdk.Lazy.string({
produce: () => {
if (!this.scope) { throw new Error('AwsIntegration must be used in API'); }
return cdk.Stack.of(this.scope).formatArn({
diff --git a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts
index 895b36323f1d7..399484510f343 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/integrations/lambda.ts
@@ -63,7 +63,7 @@ export class LambdaIntegration extends AwsIntegration {
this.handler.addPermission(`ApiPermission.${desc}`, {
principal,
scope: method,
- sourceArn: Lazy.stringValue({ produce: () => method.methodArn }),
+ sourceArn: Lazy.string({ produce: () => method.methodArn }),
});
// add permission to invoke from the console
diff --git a/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts b/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts
index e39efd410fe80..ad807d4a7d2d0 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/usage-plan.ts
@@ -156,7 +156,7 @@ export class UsagePlan extends Resource {
let resource: CfnUsagePlan;
resource = new CfnUsagePlan(this, 'Resource', {
- apiStages: Lazy.anyValue({ produce: () => this.renderApiStages(this.apiStages) }),
+ apiStages: Lazy.any({ produce: () => this.renderApiStages(this.apiStages) }),
description: props.description,
quota: this.renderQuota(props),
throttle: this.renderThrottle(props.throttle),
diff --git a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts
index dc7576b22961c..f7d137f2c9e1a 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts
@@ -66,13 +66,13 @@ export class VpcLink extends Resource implements IVpcLink {
constructor(scope: Construct, id: string, props: VpcLinkProps = {}) {
super(scope, id, {
physicalName: props.vpcLinkName ||
- Lazy.stringValue({ produce: () => Names.nodeUniqueId(this.node) }),
+ Lazy.string({ produce: () => Names.nodeUniqueId(this.node) }),
});
const cfnResource = new CfnVpcLink(this, 'Resource', {
name: this.physicalName,
description: props.description,
- targetArns: Lazy.listValue({ produce: () => this.renderTargets() }),
+ targetArns: Lazy.list({ produce: () => this.renderTargets() }),
});
this.vpcLinkId = cfnResource.ref;
diff --git a/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts
index 77f8b887eae57..55e5ab8859734 100644
--- a/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts
+++ b/packages/@aws-cdk/aws-apigateway/test/deployment.test.ts
@@ -147,7 +147,7 @@ describe('deployment', () => {
// tokens supported, and are resolved upon synthesis
const value = 'hello hello';
- deployment.addToLogicalId({ foo: Lazy.stringValue({ produce: () => value }) });
+ deployment.addToLogicalId({ foo: Lazy.string({ produce: () => value }) });
const template2 = synthesize();
expect(template2.Resources.deployment333819758d91bed959c6bd6268ba84f6d33e888e).toBeDefined();
diff --git a/packages/@aws-cdk/aws-apigateway/test/stage.test.ts b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts
index 1584850913deb..a2575edbaa07b 100644
--- a/packages/@aws-cdk/aws-apigateway/test/stage.test.ts
+++ b/packages/@aws-cdk/aws-apigateway/test/stage.test.ts
@@ -319,7 +319,7 @@ describe('stage', () => {
// WHEN
const testLogGroup = new logs.LogGroup(stack, 'LogGroup');
- const testFormat = apigateway.AccessLogFormat.custom(cdk.Lazy.stringValue({ produce: () => 'test' }));
+ const testFormat = apigateway.AccessLogFormat.custom(cdk.Lazy.string({ produce: () => 'test' }));
// THEN
expect(() => new apigateway.Stage(stack, 'my-stage', {
diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts
index 9549ff5c6598c..60ab5b3bbaede 100644
--- a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts
+++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts
@@ -125,7 +125,7 @@ export class ScalableTarget extends Resource implements IScalableTarget {
resourceId: props.resourceId,
roleArn: this.role.roleArn,
scalableDimension: props.scalableDimension,
- scheduledActions: Lazy.anyValue({ produce: () => this.actions }, { omitEmptyArray: true }),
+ scheduledActions: Lazy.any({ produce: () => this.actions }, { omitEmptyArray: true }),
serviceNamespace: props.serviceNamespace,
});
diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts
index 95242ed9e8cdf..4cb7aa2328ebc 100644
--- a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts
+++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts
@@ -90,7 +90,7 @@ export class StepScalingAction extends cdk.Construct {
cooldown: props.cooldown && props.cooldown.toSeconds(),
minAdjustmentMagnitude: props.minAdjustmentMagnitude,
metricAggregationType: props.metricAggregationType,
- stepAdjustments: cdk.Lazy.anyValue({ produce: () => this.adjustments }),
+ stepAdjustments: cdk.Lazy.any({ produce: () => this.adjustments }),
} as CfnScalingPolicy.StepScalingPolicyConfigurationProperty,
});
diff --git a/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts
index c042f305994d1..68622c2f60181 100644
--- a/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts
+++ b/packages/@aws-cdk/aws-applicationautoscaling/test/test.scalable-target.ts
@@ -40,8 +40,8 @@ export = {
serviceNamespace: appscaling.ServiceNamespace.DYNAMODB,
scalableDimension: 'test:TestCount',
resourceId: 'test:this/test',
- minCapacity: cdk.Lazy.numberValue({ produce: () => 10 }),
- maxCapacity: cdk.Lazy.numberValue({ produce: () => 1 }),
+ minCapacity: cdk.Lazy.number({ produce: () => 10 }),
+ maxCapacity: cdk.Lazy.number({ produce: () => 1 }),
});
// THEN: no exception
diff --git a/packages/@aws-cdk/aws-appmesh/README.md b/packages/@aws-cdk/aws-appmesh/README.md
index 4bed6a9598541..7de09d776eff5 100644
--- a/packages/@aws-cdk/aws-appmesh/README.md
+++ b/packages/@aws-cdk/aws-appmesh/README.md
@@ -263,7 +263,7 @@ Create a virtual gateway with the constructor:
```typescript
const gateway = new appmesh.VirtualGateway(stack, 'gateway', {
mesh: mesh,
- listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({
+ listeners: [appmesh.VirtualGatewayListener.http({
port: 443,
healthCheck: {
interval: cdk.Duration.seconds(10),
@@ -280,7 +280,7 @@ Add a virtual gateway directly to the mesh:
const gateway = mesh.addVirtualGateway('gateway', {
accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
virtualGatewayName: 'virtualGateway',
- listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({
+ listeners: [appmesh.VirtualGatewayListener.http({
port: 443,
healthCheck: {
interval: cdk.Duration.seconds(10),
@@ -302,7 +302,7 @@ By default, an HTTP based route will match on `/`. All matches must start with a
```typescript
gateway.addGatewayRoute('gateway-route-http', {
- routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
match: {
prefixMatch: '/',
@@ -316,7 +316,7 @@ You cannot omit the field, and must specify a match for these routes.
```typescript
gateway.addGatewayRoute('gateway-route-grpc', {
- routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.grpc({
routeTarget: virtualService,
match: {
serviceName: 'my-service.default.svc.cluster.local',
diff --git a/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts
index b75890ece1453..525bc4d2ba7e0 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/gateway-route-spec.ts
@@ -29,7 +29,7 @@ export interface GrpcGatewayRouteMatch {
/**
* Properties specific for HTTP Based GatewayRoutes
*/
-export interface HttpRouteSpecProps {
+export interface HttpGatewayRouteSpecOptions {
/**
* The criterion for determining a request match for this GatewayRoute
*
@@ -46,7 +46,7 @@ export interface HttpRouteSpecProps {
/**
* Properties specific for a GRPC GatewayRoute
*/
-export interface GrpcRouteSpecProps {
+export interface GrpcGatewayRouteSpecOptions {
/**
* The criterion for determining a request match for this GatewayRoute
*/
@@ -91,28 +91,28 @@ export abstract class GatewayRouteSpec {
/**
* Creates an HTTP Based GatewayRoute
*
- * @param props - no http gateway route
+ * @param options - no http gateway route
*/
- public static httpRouteSpec(props: HttpRouteSpecProps): GatewayRouteSpec {
- return new HttpGatewayRouteSpec(props, Protocol.HTTP);
+ public static http(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec {
+ return new HttpGatewayRouteSpec(options, Protocol.HTTP);
}
/**
* Creates an HTTP2 Based GatewayRoute
*
- * @param props - no http2 gateway route
+ * @param options - no http2 gateway route
*/
- public static http2RouteSpec(props: HttpRouteSpecProps): GatewayRouteSpec {
- return new HttpGatewayRouteSpec(props, Protocol.HTTP2);
+ public static http2(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec {
+ return new HttpGatewayRouteSpec(options, Protocol.HTTP2);
}
/**
* Creates an GRPC Based GatewayRoute
*
- * @param props - no grpc gateway route
+ * @param options - no grpc gateway route
*/
- public static grpcRouteSpec(props: GrpcRouteSpecProps): GatewayRouteSpec {
- return new GrpcGatewayRouteSpec(props);
+ public static grpc(options: GrpcGatewayRouteSpecOptions): GatewayRouteSpec {
+ return new GrpcGatewayRouteSpec(options);
}
/**
@@ -140,11 +140,11 @@ class HttpGatewayRouteSpec extends GatewayRouteSpec {
*/
readonly routeType: Protocol;
- constructor(props: HttpRouteSpecProps, protocol: Protocol.HTTP | Protocol.HTTP2) {
+ constructor(options: HttpGatewayRouteSpecOptions, protocol: Protocol.HTTP | Protocol.HTTP2) {
super();
- this.routeTarget = props.routeTarget;
+ this.routeTarget = options.routeTarget;
this.routeType = protocol;
- this.match = props.match;
+ this.match = options.match;
}
public bind(_scope: cdk.Construct): GatewayRouteSpecConfig {
@@ -184,10 +184,10 @@ class GrpcGatewayRouteSpec extends GatewayRouteSpec {
*/
readonly routeTarget: IVirtualService;
- constructor(props: GrpcRouteSpecProps) {
+ constructor(options: GrpcGatewayRouteSpecOptions) {
super();
- this.match = props.match;
- this.routeTarget = props.routeTarget;
+ this.match = options.match;
+ this.routeTarget = options.routeTarget;
}
public bind(_scope: cdk.Construct): GatewayRouteSpecConfig {
diff --git a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts
index 869d2198fdd0c..cc0596695aae2 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/mesh.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/mesh.ts
@@ -186,7 +186,7 @@ export class Mesh extends MeshBase {
constructor(scope: Construct, id: string, props: MeshProps = {}) {
super(scope, id, {
- physicalName: props.meshName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }),
+ physicalName: props.meshName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }),
});
const mesh = new CfnMesh(this, 'Resource', {
diff --git a/packages/@aws-cdk/aws-appmesh/lib/route.ts b/packages/@aws-cdk/aws-appmesh/lib/route.ts
index f2fb9ab58232a..7b9bd2aeb94d2 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/route.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/route.ts
@@ -110,7 +110,7 @@ export class Route extends cdk.Resource implements IRoute {
constructor(scope: Construct, id: string, props: RouteProps) {
super(scope, id, {
- physicalName: props.routeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }),
+ physicalName: props.routeName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }),
});
this.virtualRouter = props.virtualRouter;
diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts
index a690c022f8c32..7b111dbc0a67d 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway-listener.ts
@@ -6,7 +6,7 @@ import { HealthCheck, Protocol } from './shared-interfaces';
/**
* Represents the properties needed to define HTTP Listeners for a VirtualGateway
*/
-export interface HttpGatewayListenerProps {
+export interface HttpGatewayListenerOptions {
/**
* Port to listen for connections on
*
@@ -25,7 +25,7 @@ export interface HttpGatewayListenerProps {
/**
* Represents the properties needed to define GRPC Listeners for a VirtualGateway
*/
-export interface GrpcGatewayListenerProps {
+export interface GrpcGatewayListenerOptions {
/**
* Port to listen for connections on
*
@@ -58,70 +58,29 @@ export abstract class VirtualGatewayListener {
/**
* Returns an HTTP Listener for a VirtualGateway
*/
- public static httpGatewayListener(props: HttpGatewayListenerProps = {}): VirtualGatewayListener {
- return new HttpGatewayListener(props);
+ public static http(options: HttpGatewayListenerOptions = {}): VirtualGatewayListener {
+ return new HttpGatewayListener(options);
}
/**
* Returns an HTTP2 Listener for a VirtualGateway
*/
- public static http2GatewayListener(props: HttpGatewayListenerProps = {}): VirtualGatewayListener {
- return new Http2GatewayListener(props);
+ public static http2(options: HttpGatewayListenerOptions = {}): VirtualGatewayListener {
+ return new Http2GatewayListener(options);
}
/**
* Returns a GRPC Listener for a VirtualGateway
*/
- public static grpcGatewayListener(props: GrpcGatewayListenerProps = {}): VirtualGatewayListener {
- return new GrpcGatewayListener(props);
+ public static grpc(options: GrpcGatewayListenerOptions = {}): VirtualGatewayListener {
+ return new GrpcGatewayListener(options);
}
- /**
- * Protocol the listener implements
- */
- protected abstract protocol: Protocol;
-
- /**
- * Port to listen for connections on
- */
- protected abstract port: number;
-
- /**
- * Health checking strategy upstream nodes should use when communicating with the listener
- */
- protected abstract healthCheck?: HealthCheck;
-
/**
* Called when the GatewayListener type is initialized. Can be used to enforce
* mutual exclusivity
*/
public abstract bind(scope: cdk.Construct): VirtualGatewayListenerConfig;
-
- protected renderHealthCheck(hc: HealthCheck): CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty | undefined {
- if (hc.protocol === Protocol.TCP) {
- throw new Error('TCP health checks are not permitted for gateway listeners');
- }
-
- if (hc.protocol === Protocol.GRPC && hc.path) {
- throw new Error('The path property cannot be set with Protocol.GRPC');
- }
-
- const protocol = hc.protocol? hc.protocol : this.protocol;
-
- const healthCheck: CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty = {
- healthyThreshold: hc.healthyThreshold || 2,
- intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min
- path: hc.path || ((protocol === Protocol.HTTP || protocol === Protocol.HTTP2) ? '/' : undefined),
- port: hc.port || this.port,
- protocol: hc.protocol || this.protocol,
- timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(),
- unhealthyThreshold: hc.unhealthyThreshold || 2,
- };
-
- validateHealthChecks(healthCheck);
-
- return healthCheck;
- }
}
/**
@@ -147,10 +106,10 @@ class HttpGatewayListener extends VirtualGatewayListener {
*/
protected protocol: Protocol = Protocol.HTTP;
- constructor(props: HttpGatewayListenerProps = {}) {
+ constructor(options: HttpGatewayListenerOptions = {}) {
super();
- this.port = props.port ? props.port : 8080;
- this.healthCheck = props.healthCheck;
+ this.port = options.port ? options.port : 8080;
+ this.healthCheck = options.healthCheck;
}
/**
@@ -164,7 +123,7 @@ class HttpGatewayListener extends VirtualGatewayListener {
port: this.port,
protocol: this.protocol,
},
- healthCheck: this.healthCheck ? this.renderHealthCheck(this.healthCheck): undefined,
+ healthCheck: this.healthCheck ? renderHealthCheck(this.healthCheck, this.protocol, this.port): undefined,
},
};
}
@@ -174,8 +133,8 @@ class HttpGatewayListener extends VirtualGatewayListener {
* Represents the properties needed to define an HTTP2 Listener for a VirtualGateway
*/
class Http2GatewayListener extends HttpGatewayListener {
- constructor(props: HttpGatewayListenerProps = {}) {
- super(props);
+ constructor(options: HttpGatewayListenerOptions = {}) {
+ super(options);
this.protocol = Protocol.HTTP2;
}
}
@@ -203,10 +162,10 @@ class GrpcGatewayListener extends VirtualGatewayListener {
*/
protected protocol: Protocol = Protocol.GRPC;
- constructor(props: HttpGatewayListenerProps = {}) {
+ constructor(options: HttpGatewayListenerOptions = {}) {
super();
- this.port = props.port ? props.port : 8080;
- this.healthCheck = props.healthCheck;
+ this.port = options.port ? options.port : 8080;
+ this.healthCheck = options.healthCheck;
}
/**
@@ -220,8 +179,36 @@ class GrpcGatewayListener extends VirtualGatewayListener {
port: this.port,
protocol: Protocol.GRPC,
},
- healthCheck: this.healthCheck? this.renderHealthCheck(this.healthCheck): undefined,
+ healthCheck: this.healthCheck ? renderHealthCheck(this.healthCheck, this.protocol, this.port): undefined,
},
};
}
-}
\ No newline at end of file
+}
+
+function renderHealthCheck(
+ hc: HealthCheck, listenerProtocol: Protocol, listenerPort: number): CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty {
+
+ if (hc.protocol === Protocol.TCP) {
+ throw new Error('TCP health checks are not permitted for gateway listeners');
+ }
+
+ if (hc.protocol === Protocol.GRPC && hc.path) {
+ throw new Error('The path property cannot be set with Protocol.GRPC');
+ }
+
+ const protocol = hc.protocol? hc.protocol : listenerProtocol;
+
+ const healthCheck: CfnVirtualGateway.VirtualGatewayHealthCheckPolicyProperty = {
+ healthyThreshold: hc.healthyThreshold || 2,
+ intervalMillis: (hc.interval || cdk.Duration.seconds(5)).toMilliseconds(), // min
+ path: hc.path || ((protocol === Protocol.HTTP || protocol === Protocol.HTTP2) ? '/' : undefined),
+ port: hc.port || listenerPort,
+ protocol: hc.protocol || listenerProtocol,
+ timeoutMillis: (hc.timeout || cdk.Duration.seconds(2)).toMilliseconds(),
+ unhealthyThreshold: hc.unhealthyThreshold || 2,
+ };
+
+ validateHealthChecks(healthCheck);
+
+ return healthCheck;
+}
diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts
index 337807c9153da..4a0c5fef1af75 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-gateway.ts
@@ -161,7 +161,7 @@ export class VirtualGateway extends VirtualGatewayBase {
if (!props.listeners) {
// Use listener default of http listener port 8080 if no listener is defined
- this.listeners.push(VirtualGatewayListener.httpGatewayListener().bind(this));
+ this.listeners.push(VirtualGatewayListener.http().bind(this));
} else {
props.listeners.forEach(listener => this.listeners.push(listener.bind(this)));
}
diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts
index fd8b2cadc87db..e868ce69936c7 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-node.ts
@@ -180,7 +180,7 @@ export class VirtualNode extends VirtualNodeBase {
constructor(scope: Construct, id: string, props: VirtualNodeProps) {
super(scope, id, {
- physicalName: props.virtualNodeName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }),
+ physicalName: props.virtualNodeName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }),
});
this.mesh = props.mesh;
@@ -193,8 +193,8 @@ export class VirtualNode extends VirtualNodeBase {
virtualNodeName: this.physicalName,
meshName: this.mesh.meshName,
spec: {
- backends: cdk.Lazy.anyValue({ produce: () => this.backends }, { omitEmptyArray: true }),
- listeners: cdk.Lazy.anyValue({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }),
+ backends: cdk.Lazy.any({ produce: () => this.backends }, { omitEmptyArray: true }),
+ listeners: cdk.Lazy.any({ produce: () => this.listeners.map(listener => listener.listener) }, { omitEmptyArray: true }),
serviceDiscovery: {
dns: props.dnsHostName !== undefined ? { hostname: props.dnsHostName } : undefined,
awsCloudMap: props.cloudMapService !== undefined ? {
diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts
index 65c3921a844fd..b202c4c1ca3ae 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-router.ts
@@ -141,7 +141,7 @@ export class VirtualRouter extends VirtualRouterBase {
constructor(scope: Construct, id: string, props: VirtualRouterProps) {
super(scope, id, {
- physicalName: props.virtualRouterName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }),
+ physicalName: props.virtualRouterName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }),
});
this.mesh = props.mesh;
diff --git a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts
index 374d342040784..677eb96b3e4a8 100644
--- a/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts
+++ b/packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts
@@ -123,7 +123,7 @@ export class VirtualService extends cdk.Resource implements IVirtualService {
constructor(scope: Construct, id: string, props: VirtualServiceProps) {
super(scope, id, {
- physicalName: props.virtualServiceName || cdk.Lazy.stringValue({ produce: () => cdk.Names.uniqueId(this) }),
+ physicalName: props.virtualServiceName || cdk.Lazy.string({ produce: () => cdk.Names.uniqueId(this) }),
});
if (props.virtualNode && props.virtualRouter) {
diff --git a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts
index 782ca6cee1f83..1a064b5ce7031 100644
--- a/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts
+++ b/packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts
@@ -131,7 +131,7 @@ const gateway = mesh.addVirtualGateway('gateway1', {
new appmesh.VirtualGateway(stack, 'gateway2', {
mesh: mesh,
- listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({
+ listeners: [appmesh.VirtualGatewayListener.http({
port: 443,
healthCheck: {
interval: cdk.Duration.seconds(10),
@@ -140,19 +140,19 @@ new appmesh.VirtualGateway(stack, 'gateway2', {
});
gateway.addGatewayRoute('gateway1-route-http', {
- routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
}),
});
gateway.addGatewayRoute('gateway1-route-http2', {
- routeSpec: appmesh.GatewayRouteSpec.http2RouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http2({
routeTarget: virtualService,
}),
});
gateway.addGatewayRoute('gateway1-route-grpc', {
- routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.grpc({
routeTarget: virtualService,
match: {
serviceName: virtualService.virtualServiceName,
diff --git a/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts
index 2f08e58bb873a..a741ec0b0d1d8 100644
--- a/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts
+++ b/packages/@aws-cdk/aws-appmesh/test/test.gateway-route.ts
@@ -16,7 +16,7 @@ export = {
});
const virtualGateway = new appmesh.VirtualGateway(stack, 'gateway-1', {
- listeners: [appmesh.VirtualGatewayListener.httpGatewayListener()],
+ listeners: [appmesh.VirtualGatewayListener.http()],
mesh: mesh,
});
@@ -27,21 +27,21 @@ export = {
// Add an HTTP Route
virtualGateway.addGatewayRoute('gateway-http-route', {
- routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
}),
gatewayRouteName: 'gateway-http-route',
});
virtualGateway.addGatewayRoute('gateway-http2-route', {
- routeSpec: appmesh.GatewayRouteSpec.http2RouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http2({
routeTarget: virtualService,
}),
gatewayRouteName: 'gateway-http2-route',
});
virtualGateway.addGatewayRoute('gateway-grpc-route', {
- routeSpec: appmesh.GatewayRouteSpec.grpcRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.grpc({
routeTarget: virtualService,
match: {
serviceName: virtualService.virtualServiceName,
@@ -122,7 +122,7 @@ export = {
});
const virtualService = mesh.addVirtualService('testVirtualService');
- test.throws(() => appmesh.GatewayRouteSpec.httpRouteSpec({
+ test.throws(() => appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
match: {
prefixPath: 'wrong',
diff --git a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts
index f5c020426c9b9..8e76b0f5c85f5 100644
--- a/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts
+++ b/packages/@aws-cdk/aws-appmesh/test/test.virtual-gateway.ts
@@ -21,7 +21,7 @@ export = {
new appmesh.VirtualGateway(stack, 'httpGateway', {
mesh: mesh,
- listeners: [appmesh.VirtualGatewayListener.httpGatewayListener({
+ listeners: [appmesh.VirtualGatewayListener.http({
port: 443,
healthCheck: {
interval: cdk.Duration.seconds(10),
@@ -31,7 +31,7 @@ export = {
new appmesh.VirtualGateway(stack, 'http2Gateway', {
mesh: mesh,
- listeners: [appmesh.VirtualGatewayListener.http2GatewayListener({
+ listeners: [appmesh.VirtualGatewayListener.http2({
port: 443,
healthCheck: {
interval: cdk.Duration.seconds(10),
@@ -113,7 +113,7 @@ export = {
new appmesh.VirtualGateway(stack, 'testGateway', {
virtualGatewayName: 'test-gateway',
- listeners: [appmesh.VirtualGatewayListener.grpcGatewayListener({
+ listeners: [appmesh.VirtualGatewayListener.grpc({
port: 80,
healthCheck: {
},
@@ -174,7 +174,7 @@ export = {
virtualGateway.addGatewayRoute('testGatewayRoute', {
gatewayRouteName: 'test-gateway-route',
- routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
}),
});
@@ -218,13 +218,13 @@ export = {
const virtualGateway = mesh.addVirtualGateway('gateway');
virtualGateway.addGatewayRoute('testGatewayRoute', {
gatewayRouteName: 'test-gateway-route',
- routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
}),
});
virtualGateway.addGatewayRoute('testGatewayRoute2', {
gatewayRouteName: 'test-gateway-route-2',
- routeSpec: appmesh.GatewayRouteSpec.httpRouteSpec({
+ routeSpec: appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
}),
});
diff --git a/packages/@aws-cdk/aws-appsync/lib/schema.ts b/packages/@aws-cdk/aws-appsync/lib/schema.ts
index ec5bbfa14241d..3ab8a800d16fb 100644
--- a/packages/@aws-cdk/aws-appsync/lib/schema.ts
+++ b/packages/@aws-cdk/aws-appsync/lib/schema.ts
@@ -80,7 +80,7 @@ export class Schema {
this.schema = new CfnGraphQLSchema(api, 'Schema', {
apiId: api.apiId,
definition: this.mode === SchemaMode.CODE ?
- Lazy.stringValue({
+ Lazy.string({
produce: () => this.types.reduce((acc, type) => { return `${acc}${type._bindToGraphqlApi(api).toString()}\n`; },
`${this.declareSchema()}${this.definition}`),
})
diff --git a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts
index cf5f6acbcbf71..0d5dd3f147235 100644
--- a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts
+++ b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts
@@ -936,8 +936,8 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements
// use delayed evaluation
const imageConfig = props.machineImage.getImage(this);
this.userData = props.userData ?? imageConfig.userData;
- const userDataToken = Lazy.stringValue({ produce: () => Fn.base64(this.userData.render()) });
- const securityGroupsToken = Lazy.listValue({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) });
+ const userDataToken = Lazy.string({ produce: () => Fn.base64(this.userData.render()) });
+ const securityGroupsToken = Lazy.list({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) });
const launchConfig = new CfnLaunchConfiguration(this, 'LaunchConfig', {
imageId: imageConfig.imageId,
@@ -1014,10 +1014,10 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements
maxSize: Tokenization.stringifyNumber(maxCapacity),
desiredCapacity: desiredCapacity !== undefined ? Tokenization.stringifyNumber(desiredCapacity) : undefined,
launchConfigurationName: launchConfig.ref,
- loadBalancerNames: Lazy.listValue({ produce: () => this.loadBalancerNames }, { omitEmpty: true }),
- targetGroupArns: Lazy.listValue({ produce: () => this.targetGroupArns }, { omitEmpty: true }),
+ loadBalancerNames: Lazy.list({ produce: () => this.loadBalancerNames }, { omitEmpty: true }),
+ targetGroupArns: Lazy.list({ produce: () => this.targetGroupArns }, { omitEmpty: true }),
notificationConfigurations: this.renderNotificationConfiguration(),
- metricsCollection: Lazy.anyValue({ produce: () => this.renderMetricsCollection() }),
+ metricsCollection: Lazy.any({ produce: () => this.renderMetricsCollection() }),
vpcZoneIdentifier: subnetIds,
healthCheckType: props.healthCheck && props.healthCheck.type,
healthCheckGracePeriod: props.healthCheck && props.healthCheck.gracePeriod && props.healthCheck.gracePeriod.toSeconds(),
diff --git a/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts b/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts
index 76ba4685c0a38..9b9939d740d16 100644
--- a/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts
+++ b/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts
@@ -79,7 +79,7 @@ export class StepScalingAction extends CoreConstruct {
adjustmentType: props.adjustmentType,
minAdjustmentMagnitude: props.minAdjustmentMagnitude,
metricAggregationType: props.metricAggregationType,
- stepAdjustments: Lazy.anyValue({ produce: () => this.adjustments }),
+ stepAdjustments: Lazy.any({ produce: () => this.adjustments }),
});
this.scalingPolicyArn = resource.ref;
diff --git a/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts b/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts
index 4e4e800828780..737566c369b76 100644
--- a/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts
+++ b/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts
@@ -170,9 +170,9 @@ nodeunitShim({
instanceType: ec2.InstanceType.of(ec2.InstanceClass.M4, ec2.InstanceSize.MICRO),
machineImage: new ec2.AmazonLinuxImage(),
vpc,
- minCapacity: cdk.Lazy.numberValue({ produce: () => 5 }),
- maxCapacity: cdk.Lazy.numberValue({ produce: () => 1 }),
- desiredCapacity: cdk.Lazy.numberValue({ produce: () => 20 }),
+ minCapacity: cdk.Lazy.number({ produce: () => 5 }),
+ maxCapacity: cdk.Lazy.number({ produce: () => 1 }),
+ desiredCapacity: cdk.Lazy.number({ produce: () => 20 }),
});
// THEN: no exception
diff --git a/packages/@aws-cdk/aws-backup/lib/plan.ts b/packages/@aws-cdk/aws-backup/lib/plan.ts
index 3476b56817dc1..70240e778969b 100644
--- a/packages/@aws-cdk/aws-backup/lib/plan.ts
+++ b/packages/@aws-cdk/aws-backup/lib/plan.ts
@@ -125,7 +125,7 @@ export class BackupPlan extends Resource implements IBackupPlan {
const plan = new CfnBackupPlan(this, 'Resource', {
backupPlan: {
backupPlanName: props.backupPlanName || id,
- backupPlanRule: Lazy.anyValue({ produce: () => this.rules }, { omitEmptyArray: true }),
+ backupPlanRule: Lazy.any({ produce: () => this.rules }, { omitEmptyArray: true }),
},
});
diff --git a/packages/@aws-cdk/aws-backup/lib/selection.ts b/packages/@aws-cdk/aws-backup/lib/selection.ts
index fb3278ec42404..401af8314b6e1 100644
--- a/packages/@aws-cdk/aws-backup/lib/selection.ts
+++ b/packages/@aws-cdk/aws-backup/lib/selection.ts
@@ -96,10 +96,10 @@ export class BackupSelection extends Resource implements iam.IGrantable {
backupSelection: {
iamRoleArn: role.roleArn,
selectionName: props.backupSelectionName || this.node.id,
- listOfTags: Lazy.anyValue({
+ listOfTags: Lazy.any({
produce: () => this.listOfTags,
}, { omitEmptyArray: true }),
- resources: Lazy.listValue({
+ resources: Lazy.list({
produce: () => [...this.resources, ...this.backupableResourcesCollector.resources],
}, { omitEmpty: true }),
},
@@ -130,7 +130,7 @@ export class BackupSelection extends Resource implements iam.IGrantable {
Aspects.of(resource.construct).add(this.backupableResourcesCollector);
// Cannot push `this.backupableResourcesCollector.resources` to
// `this.resources` here because it has not been evaluated yet.
- // Will be concatenated to `this.resources` in a `Lazy.listValue`
+ // Will be concatenated to `this.resources` in a `Lazy.list`
// in the constructor instead.
}
}
diff --git a/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts b/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts
index 655361ba5b4b7..f1a5cd442e9d1 100644
--- a/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts
+++ b/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts
@@ -98,7 +98,7 @@ export class DnsValidatedCertificate extends cdk.Resource implements ICertificat
serviceToken: requestorFunction.functionArn,
properties: {
DomainName: props.domainName,
- SubjectAlternativeNames: cdk.Lazy.listValue({ produce: () => props.subjectAlternativeNames }, { omitEmpty: true }),
+ SubjectAlternativeNames: cdk.Lazy.list({ produce: () => props.subjectAlternativeNames }, { omitEmpty: true }),
HostedZoneId: this.hostedZoneId,
Region: props.region,
Route53Endpoint: props.route53Endpoint,
diff --git a/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts b/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts
index 5bbeadf007f1e..ab43a486ae7d1 100644
--- a/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts
+++ b/packages/@aws-cdk/aws-certificatemanager/test/certificate.test.ts
@@ -66,7 +66,7 @@ test('needs validation domain supplied if domain contains a token', () => {
const stack = new Stack();
expect(() => {
- const domainName = Lazy.stringValue({ produce: () => 'example.com' });
+ const domainName = Lazy.string({ produce: () => 'example.com' });
new Certificate(stack, 'Certificate', {
domainName,
});
@@ -76,7 +76,7 @@ test('needs validation domain supplied if domain contains a token', () => {
test('validationdomains can be given for a Token', () => {
const stack = new Stack();
- const domainName = Lazy.stringValue({ produce: () => 'my.example.com' });
+ const domainName = Lazy.string({ produce: () => 'my.example.com' });
new Certificate(stack, 'Certificate', {
domainName,
validationDomains: {
diff --git a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts
index 6db44400cfa89..93ac7d4b9913a 100644
--- a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts
+++ b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts
@@ -157,7 +157,7 @@ export class CustomResource extends core.CustomResource {
properties: props.properties,
removalPolicy: props.removalPolicy,
resourceType: props.resourceType,
- serviceToken: core.Lazy.stringValue({ produce: () => props.provider.bind(this).serviceToken }),
+ serviceToken: core.Lazy.string({ produce: () => props.provider.bind(this).serviceToken }),
});
}
}
diff --git a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts
index b3c9db91d700c..0eacc04f44cc7 100644
--- a/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts
+++ b/packages/@aws-cdk/aws-cloudfront/lib/distribution.ts
@@ -277,11 +277,11 @@ export class Distribution extends Resource implements IDistribution {
const distribution = new CfnDistribution(this, 'Resource', {
distributionConfig: {
enabled: props.enabled ?? true,
- origins: Lazy.anyValue({ produce: () => this.renderOrigins() }),
- originGroups: Lazy.anyValue({ produce: () => this.renderOriginGroups() }),
+ origins: Lazy.any({ produce: () => this.renderOrigins() }),
+ originGroups: Lazy.any({ produce: () => this.renderOriginGroups() }),
defaultCacheBehavior: this.defaultBehavior._renderBehavior(),
aliases: props.domainNames,
- cacheBehaviors: Lazy.anyValue({ produce: () => this.renderCacheBehaviors() }),
+ cacheBehaviors: Lazy.any({ produce: () => this.renderCacheBehaviors() }),
comment: props.comment,
customErrorResponses: this.renderErrorResponses(),
defaultRootObject: props.defaultRootObject,
diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts
index ae8fd29424786..5c1daacb54dd3 100644
--- a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts
+++ b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts
@@ -179,9 +179,9 @@ export class Alarm extends AlarmBase {
// Actions
actionsEnabled: props.actionsEnabled,
- alarmActions: Lazy.listValue({ produce: () => this.alarmActionArns }),
- insufficientDataActions: Lazy.listValue({ produce: (() => this.insufficientDataActionArns) }),
- okActions: Lazy.listValue({ produce: () => this.okActionArns }),
+ alarmActions: Lazy.list({ produce: () => this.alarmActionArns }),
+ insufficientDataActions: Lazy.list({ produce: (() => this.insufficientDataActionArns) }),
+ okActions: Lazy.list({ produce: () => this.okActionArns }),
// Metric
...metricProps,
diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts
index 8d625ee16f7f6..8b9d61c99ea82 100644
--- a/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts
+++ b/packages/@aws-cdk/aws-cloudwatch/lib/composite-alarm.ts
@@ -91,7 +91,7 @@ export class CompositeAlarm extends AlarmBase {
constructor(scope: Construct, id: string, props: CompositeAlarmProps) {
super(scope, id, {
- physicalName: props.compositeAlarmName ?? Lazy.stringValue({ produce: () => this.generateUniqueId() }),
+ physicalName: props.compositeAlarmName ?? Lazy.string({ produce: () => this.generateUniqueId() }),
});
if (props.alarmRule.renderAlarmRule().length > 10240) {
@@ -105,9 +105,9 @@ export class CompositeAlarm extends AlarmBase {
alarmRule: this.alarmRule,
alarmDescription: props.alarmDescription,
actionsEnabled: props.actionsEnabled,
- alarmActions: Lazy.listValue({ produce: () => this.alarmActionArns }),
- insufficientDataActions: Lazy.listValue({ produce: (() => this.insufficientDataActionArns) }),
- okActions: Lazy.listValue({ produce: () => this.okActionArns }),
+ alarmActions: Lazy.list({ produce: () => this.alarmActionArns }),
+ insufficientDataActions: Lazy.list({ produce: (() => this.insufficientDataActionArns) }),
+ okActions: Lazy.list({ produce: () => this.okActionArns }),
});
this.alarmName = this.getResourceNameAttribute(alarm.ref);
diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts b/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts
index f4a17d634f32f..91813d592463c 100644
--- a/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts
+++ b/packages/@aws-cdk/aws-cloudwatch/lib/dashboard.ts
@@ -94,7 +94,7 @@ export class Dashboard extends Resource {
new CfnDashboard(this, 'Resource', {
dashboardName: this.physicalName,
- dashboardBody: Lazy.stringValue({
+ dashboardBody: Lazy.string({
produce: () => {
const column = new Column(...this.rows);
column.position(0, 0);
diff --git a/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts b/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts
index 7f9236319d7bb..5f33babced96a 100644
--- a/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts
+++ b/packages/@aws-cdk/aws-codebuild/lib/build-spec.ts
@@ -63,7 +63,7 @@ class ObjectBuildSpec extends BuildSpec {
public toBuildSpec(): string {
// We have to pretty-print the buildspec, otherwise
// CodeBuild will not recognize it as an inline buildspec.
- return Lazy.stringValue({
+ return Lazy.uncachedString({
produce: (ctx: IResolveContext) =>
Stack.of(ctx.scope).toJsonString(this.spec, 2),
});
diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts
index 8973dc8f5ea04..7810c82287f4c 100644
--- a/packages/@aws-cdk/aws-codebuild/lib/project.ts
+++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts
@@ -764,18 +764,18 @@ export class Project extends ProjectBase {
artifacts: artifactsConfig.artifactsProperty,
serviceRole: this.role.roleArn,
environment: this.renderEnvironment(props.environment, environmentVariables),
- fileSystemLocations: Lazy.anyValue({ produce: () => this.renderFileSystemLocations() }),
+ fileSystemLocations: Lazy.any({ produce: () => this.renderFileSystemLocations() }),
// lazy, because we have a setter for it in setEncryptionKey
// The 'alias/aws/s3' default is necessary because leaving the `encryptionKey` field
// empty will not remove existing encryptionKeys during an update (ref. t/D17810523)
- encryptionKey: Lazy.stringValue({ produce: () => this._encryptionKey ? this._encryptionKey.keyArn : 'alias/aws/s3' }),
+ encryptionKey: Lazy.string({ produce: () => this._encryptionKey ? this._encryptionKey.keyArn : 'alias/aws/s3' }),
badgeEnabled: props.badge,
cache: cache._toCloudFormation(),
name: this.physicalName,
timeoutInMinutes: props.timeout && props.timeout.toMinutes(),
- secondarySources: Lazy.anyValue({ produce: () => this.renderSecondarySources() }),
- secondarySourceVersions: Lazy.anyValue({ produce: () => this.renderSecondarySourceVersions() }),
- secondaryArtifacts: Lazy.anyValue({ produce: () => this.renderSecondaryArtifacts() }),
+ secondarySources: Lazy.any({ produce: () => this.renderSecondarySources() }),
+ secondarySourceVersions: Lazy.any({ produce: () => this.renderSecondarySourceVersions() }),
+ secondaryArtifacts: Lazy.any({ produce: () => this.renderSecondaryArtifacts() }),
triggers: sourceConfig.buildTriggers,
sourceVersion: sourceConfig.sourceVersion,
vpcConfig: this.configureVpc(props),
diff --git a/packages/@aws-cdk/aws-codecommit/lib/repository.ts b/packages/@aws-cdk/aws-codecommit/lib/repository.ts
index 7345d669ed763..dbb4d3064c9e9 100644
--- a/packages/@aws-cdk/aws-codecommit/lib/repository.ts
+++ b/packages/@aws-cdk/aws-codecommit/lib/repository.ts
@@ -335,7 +335,7 @@ export class Repository extends RepositoryBase {
this.repository = new CfnRepository(this, 'Resource', {
repositoryName: props.repositoryName,
repositoryDescription: props.description,
- triggers: Lazy.anyValue({ produce: () => this.triggers }, { omitEmptyArray: true }),
+ triggers: Lazy.any({ produce: () => this.triggers }, { omitEmptyArray: true }),
});
this.repositoryName = this.getResourceNameAttribute(this.repository.attrName);
diff --git a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts
index c8b8152356091..0d6c6a347886a 100644
--- a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts
+++ b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts
@@ -170,8 +170,8 @@ export class LambdaDeploymentGroup extends cdk.Resource implements ILambdaDeploy
deploymentType: 'BLUE_GREEN',
deploymentOption: 'WITH_TRAFFIC_CONTROL',
},
- alarmConfiguration: cdk.Lazy.anyValue({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }),
- autoRollbackConfiguration: cdk.Lazy.anyValue({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }),
+ alarmConfiguration: cdk.Lazy.any({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }),
+ autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }),
});
this.deploymentGroupName = this.getResourceNameAttribute(resource.ref);
@@ -193,8 +193,8 @@ export class LambdaDeploymentGroup extends cdk.Resource implements ILambdaDeploy
codeDeployLambdaAliasUpdate: {
applicationName: this.application.applicationName,
deploymentGroupName: resource.ref,
- beforeAllowTrafficHook: cdk.Lazy.stringValue({ produce: () => this.preHook && this.preHook.functionName }),
- afterAllowTrafficHook: cdk.Lazy.stringValue({ produce: () => this.postHook && this.postHook.functionName }),
+ beforeAllowTrafficHook: cdk.Lazy.string({ produce: () => this.preHook && this.preHook.functionName }),
+ afterAllowTrafficHook: cdk.Lazy.string({ produce: () => this.postHook && this.postHook.functionName }),
},
};
diff --git a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts
index 9a3d912bb1e0d..eb4bbafade216 100644
--- a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts
+++ b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts
@@ -291,7 +291,7 @@ export class ServerDeploymentGroup extends ServerDeploymentGroupBase {
serviceRoleArn: this.role.roleArn,
deploymentConfigName: props.deploymentConfig &&
props.deploymentConfig.deploymentConfigName,
- autoScalingGroups: cdk.Lazy.listValue({ produce: () => this._autoScalingGroups.map(asg => asg.autoScalingGroupName) }, { omitEmpty: true }),
+ autoScalingGroups: cdk.Lazy.list({ produce: () => this._autoScalingGroups.map(asg => asg.autoScalingGroupName) }, { omitEmpty: true }),
loadBalancerInfo: this.loadBalancerInfo(props.loadBalancer),
deploymentStyle: props.loadBalancer === undefined
? undefined
@@ -300,8 +300,8 @@ export class ServerDeploymentGroup extends ServerDeploymentGroupBase {
},
ec2TagSet: this.ec2TagSet(props.ec2InstanceTags),
onPremisesTagSet: this.onPremiseTagSet(props.onPremiseInstanceTags),
- alarmConfiguration: cdk.Lazy.anyValue({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }),
- autoRollbackConfiguration: cdk.Lazy.anyValue({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }),
+ alarmConfiguration: cdk.Lazy.any({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }),
+ autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }),
});
this.deploymentGroupName = this.getResourceNameAttribute(resource.ref);
diff --git a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts
index d47c994c283e4..0537b469c17d5 100644
--- a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts
+++ b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts
@@ -177,7 +177,7 @@ export class ProfilingGroup extends ProfilingGroupBase {
constructor(scope: Construct, id: string, props: ProfilingGroupProps = {}) {
super(scope, id, {
- physicalName: props.profilingGroupName ?? Lazy.stringValue({ produce: () => this.generateUniqueId() }),
+ physicalName: props.profilingGroupName ?? Lazy.string({ produce: () => this.generateUniqueId() }),
});
const profilingGroup = new CfnProfilingGroup(this, 'ProfilingGroup', {
diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts
index e14f3184011a0..b3ce90e2aa793 100644
--- a/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts
+++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/action.ts
@@ -24,7 +24,7 @@ export abstract class Action implements codepipeline.IAction {
protected constructor(actionProperties: codepipeline.ActionProperties) {
this.customerProvidedNamespace = actionProperties.variablesNamespace;
- this.namespaceOrToken = Lazy.stringValue({
+ this.namespaceOrToken = Lazy.string({
produce: () => {
// make sure the action was bound (= added to a pipeline)
if (this.actualNamespace !== undefined) {
diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts
index 53d789b665262..cedc1db5ca90b 100644
--- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts
+++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codebuild/build-action.ts
@@ -174,7 +174,7 @@ export class CodeBuildAction extends Action {
};
if ((this.actionProperties.inputs || []).length > 1) {
// lazy, because the Artifact name might be generated lazily
- configuration.PrimarySource = cdk.Lazy.stringValue({ produce: () => this.props.input.artifactName });
+ configuration.PrimarySource = cdk.Lazy.string({ produce: () => this.props.input.artifactName });
}
return {
configuration,
diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts
index 771a1b8e3e448..33bc07c148b1e 100644
--- a/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts
+++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/codedeploy/ecs-deploy-action.ts
@@ -184,12 +184,12 @@ export class CodeDeployEcsDeployAction extends Action {
ApplicationName: this.actionProps.deploymentGroup.application.applicationName,
DeploymentGroupName: this.actionProps.deploymentGroup.deploymentGroupName,
- TaskDefinitionTemplateArtifact: Lazy.stringValue({ produce: () => taskDefinitionTemplateArtifact.artifactName }),
+ TaskDefinitionTemplateArtifact: Lazy.string({ produce: () => taskDefinitionTemplateArtifact.artifactName }),
TaskDefinitionTemplatePath: this.actionProps.taskDefinitionTemplateFile
? this.actionProps.taskDefinitionTemplateFile.fileName
: 'taskdef.json',
- AppSpecTemplateArtifact: Lazy.stringValue({ produce: () => appSpecTemplateArtifact.artifactName }),
+ AppSpecTemplateArtifact: Lazy.string({ produce: () => appSpecTemplateArtifact.artifactName }),
AppSpecTemplatePath: this.actionProps.appSpecTemplateFile
? this.actionProps.appSpecTemplateFile.fileName
: 'appspec.yaml',
@@ -199,7 +199,7 @@ export class CodeDeployEcsDeployAction extends Action {
if (this.actionProps.containerImageInputs) {
for (let i = 1; i <= this.actionProps.containerImageInputs.length; i++) {
const imageInput = this.actionProps.containerImageInputs[i - 1];
- actionConfig.configuration[`Image${i}ArtifactName`] = Lazy.stringValue({ produce: () => imageInput.input.artifactName });
+ actionConfig.configuration[`Image${i}ArtifactName`] = Lazy.string({ produce: () => imageInput.input.artifactName });
actionConfig.configuration[`Image${i}ContainerName`] = imageInput.taskDefinitionPlaceholder
? imageInput.taskDefinitionPlaceholder
: 'IMAGE';
diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts
index 520af74ba8af2..9aa0ac65a72c9 100644
--- a/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts
+++ b/packages/@aws-cdk/aws-codepipeline-actions/test/codecommit/test.codecommit-source-action.ts
@@ -240,7 +240,7 @@ export = {
repository: new codecommit.Repository(stack, 'R', {
repositoryName: 'repository',
}),
- branch: Lazy.stringValue({ produce: () => 'my-branch' }),
+ branch: Lazy.string({ produce: () => 'my-branch' }),
output: sourceOutput,
}),
],
@@ -291,7 +291,7 @@ export = {
repository: new codecommit.Repository(stack, 'R', {
repositoryName: 'repository',
}),
- branch: Lazy.stringValue({ produce: () => 'my-branch' }),
+ branch: Lazy.string({ produce: () => 'my-branch' }),
output: sourceOutput,
eventRole: triggerEventTestRole,
});
diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts
index 84af1c50a7583..035d8ddb63a38 100644
--- a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts
+++ b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts
@@ -39,7 +39,7 @@ export = {
'properly resolves any Tokens passed in userParameters'(test: Test) {
const stack = stackIncludingLambdaInvokeCodePipeline({
userParams: {
- key: Lazy.stringValue({ produce: () => Aws.REGION }),
+ key: Lazy.string({ produce: () => Aws.REGION }),
},
});
diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts
index 6b9dc716961e5..fc069cffae6d3 100644
--- a/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts
+++ b/packages/@aws-cdk/aws-codepipeline-actions/test/s3/test.s3-source-action.ts
@@ -182,13 +182,13 @@ export = {
const bucket = new s3.Bucket(stack, 'MyBucket');
const sourceStage = minimalPipeline(stack, {
bucket,
- bucketKey: Lazy.stringValue({ produce: () => 'my-bucket-key1' }),
+ bucketKey: Lazy.string({ produce: () => 'my-bucket-key1' }),
trigger: cpactions.S3Trigger.EVENTS,
});
sourceStage.addAction(new cpactions.S3SourceAction({
actionName: 'Source2',
bucket,
- bucketKey: Lazy.stringValue({ produce: () => 'my-bucket-key2' }),
+ bucketKey: Lazy.string({ produce: () => 'my-bucket-key2' }),
trigger: cpactions.S3Trigger.EVENTS,
output: new codepipeline.Artifact(),
}));
diff --git a/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts b/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts
index 487cc7c422189..5317676a5f0fe 100644
--- a/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts
+++ b/packages/@aws-cdk/aws-codepipeline/lib/artifact.ts
@@ -132,17 +132,17 @@ export class ArtifactPath {
public get location() {
const artifactName = this.artifact.artifactName
? this.artifact.artifactName
- : Lazy.stringValue({ produce: () => this.artifact.artifactName });
+ : Lazy.string({ produce: () => this.artifact.artifactName });
return `${artifactName}::${this.fileName}`;
}
}
function artifactAttribute(artifact: Artifact, attributeName: string) {
- const lazyArtifactName = Lazy.stringValue({ produce: () => artifact.artifactName });
+ const lazyArtifactName = Lazy.string({ produce: () => artifact.artifactName });
return Token.asString({ 'Fn::GetArtifactAtt': [lazyArtifactName, attributeName] });
}
function artifactGetParam(artifact: Artifact, jsonFile: string, keyName: string) {
- const lazyArtifactName = Lazy.stringValue({ produce: () => artifact.artifactName });
+ const lazyArtifactName = Lazy.string({ produce: () => artifact.artifactName });
return Token.asString({ 'Fn::GetParam': [lazyArtifactName, jsonFile, keyName] });
}
diff --git a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts
index e59de17b454b3..ba7fd8d87233d 100644
--- a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts
+++ b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts
@@ -283,9 +283,9 @@ export class Pipeline extends PipelineBase {
});
const codePipeline = new CfnPipeline(this, 'Resource', {
- artifactStore: Lazy.anyValue({ produce: () => this.renderArtifactStoreProperty() }),
- artifactStores: Lazy.anyValue({ produce: () => this.renderArtifactStoresProperty() }),
- stages: Lazy.anyValue({ produce: () => this.renderStages() }),
+ artifactStore: Lazy.any({ produce: () => this.renderArtifactStoreProperty() }),
+ artifactStores: Lazy.any({ produce: () => this.renderArtifactStoresProperty() }),
+ stages: Lazy.any({ produce: () => this.renderStages() }),
roleArn: this.role.roleArn,
restartExecutionOnUpdate: props && props.restartExecutionOnUpdate,
name: this.physicalName,
diff --git a/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts b/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts
index a0f16972e1575..e9ed5a6995f02 100644
--- a/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts
+++ b/packages/@aws-cdk/aws-codepipeline/lib/private/stage.ts
@@ -142,8 +142,8 @@ export class Stage implements IStage {
}
private renderAction(action: FullActionDescriptor): CfnPipeline.ActionDeclarationProperty {
- const outputArtifacts = cdk.Lazy.anyValue({ produce: () => this.renderArtifacts(action.outputs) }, { omitEmptyArray: true });
- const inputArtifacts = cdk.Lazy.anyValue({ produce: () => this.renderArtifacts(action.inputs) }, { omitEmptyArray: true });
+ const outputArtifacts = cdk.Lazy.any({ produce: () => this.renderArtifacts(action.outputs) }, { omitEmptyArray: true });
+ const inputArtifacts = cdk.Lazy.any({ produce: () => this.renderArtifacts(action.inputs) }, { omitEmptyArray: true });
return {
name: action.actionName,
inputArtifacts,
diff --git a/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts b/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts
index ab2f56471f1dd..8e8c2652caa9c 100644
--- a/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts
+++ b/packages/@aws-cdk/aws-codepipeline/test/fake-source-action.ts
@@ -31,7 +31,7 @@ export class FakeSourceAction implements codepipeline.IAction {
outputs: [props.output, ...props.extraOutputs || []],
};
this.variables = {
- firstVariable: Lazy.stringValue({ produce: () => `#{${this.actionProperties.variablesNamespace}.FirstVariable}` }),
+ firstVariable: Lazy.string({ produce: () => `#{${this.actionProperties.variablesNamespace}.FirstVariable}` }),
};
}
diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts
index 0e652fb2c0b76..3730c7c97a301 100644
--- a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts
+++ b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts
@@ -736,7 +736,7 @@ export class UserPool extends UserPoolBase {
usernameAttributes: signIn.usernameAttrs,
aliasAttributes: signIn.aliasAttrs,
autoVerifiedAttributes: signIn.autoVerifyAttrs,
- lambdaConfig: Lazy.anyValue({ produce: () => undefinedIfNoKeys(this.triggers) }),
+ lambdaConfig: Lazy.any({ produce: () => undefinedIfNoKeys(this.triggers) }),
smsConfiguration: this.smsConfiguration(props),
adminCreateUserConfig,
emailVerificationMessage,
diff --git a/packages/@aws-cdk/aws-config/lib/managed-rules.ts b/packages/@aws-cdk/aws-config/lib/managed-rules.ts
index cfbe2645367c6..4bc7b7fa8c015 100644
--- a/packages/@aws-cdk/aws-config/lib/managed-rules.ts
+++ b/packages/@aws-cdk/aws-config/lib/managed-rules.ts
@@ -78,7 +78,7 @@ export class CloudFormationStackDriftDetectionCheck extends ManagedRule {
...props,
identifier: ManagedRuleIdentifiers.CLOUDFORMATION_STACK_DRIFT_DETECTION_CHECK,
inputParameters: {
- cloudformationRoleArn: Lazy.stringValue({ produce: () => this.role.roleArn }),
+ cloudformationRoleArn: Lazy.string({ produce: () => this.role.roleArn }),
},
});
diff --git a/packages/@aws-cdk/aws-config/lib/rule.ts b/packages/@aws-cdk/aws-config/lib/rule.ts
index ac4044ac4ae99..2b6ad35d08859 100644
--- a/packages/@aws-cdk/aws-config/lib/rule.ts
+++ b/packages/@aws-cdk/aws-config/lib/rule.ts
@@ -265,7 +265,7 @@ export class ManagedRule extends RuleNew {
description: props.description,
inputParameters: props.inputParameters,
maximumExecutionFrequency: props.maximumExecutionFrequency,
- scope: Lazy.anyValue({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck)
+ scope: Lazy.any({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck)
source: {
owner: 'AWS',
sourceIdentifier: props.identifier,
@@ -371,7 +371,7 @@ export class CustomRule extends RuleNew {
description: props.description,
inputParameters: props.inputParameters,
maximumExecutionFrequency: props.maximumExecutionFrequency,
- scope: Lazy.anyValue({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck)
+ scope: Lazy.any({ produce: () => renderScope(this.ruleScope) }), // scope can use values such as stack id (see CloudFormationStackDriftDetectionCheck)
source: {
owner: 'CUSTOM_LAMBDA',
sourceDetails,
diff --git a/packages/@aws-cdk/aws-databrew/.eslintrc.js b/packages/@aws-cdk/aws-databrew/.eslintrc.js
new file mode 100644
index 0000000000000..61dd8dd001f63
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/.eslintrc.js
@@ -0,0 +1,3 @@
+const baseConfig = require('cdk-build-tools/config/eslintrc');
+baseConfig.parserOptions.project = __dirname + '/tsconfig.json';
+module.exports = baseConfig;
diff --git a/packages/@aws-cdk/aws-databrew/.gitignore b/packages/@aws-cdk/aws-databrew/.gitignore
new file mode 100644
index 0000000000000..62ebc95d75ce6
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/.gitignore
@@ -0,0 +1,19 @@
+*.js
+*.js.map
+*.d.ts
+tsconfig.json
+node_modules
+*.generated.ts
+dist
+.jsii
+
+.LAST_BUILD
+.nyc_output
+coverage
+.nycrc
+.LAST_PACKAGE
+*.snk
+nyc.config.js
+!.eslintrc.js
+!jest.config.js
+junit.xml
diff --git a/packages/@aws-cdk/aws-databrew/.npmignore b/packages/@aws-cdk/aws-databrew/.npmignore
new file mode 100644
index 0000000000000..e4486030fcb17
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/.npmignore
@@ -0,0 +1,28 @@
+# Don't include original .ts files when doing `npm pack`
+*.ts
+!*.d.ts
+coverage
+.nyc_output
+*.tgz
+
+dist
+.LAST_PACKAGE
+.LAST_BUILD
+!*.js
+
+# Include .jsii
+!.jsii
+
+*.snk
+
+*.tsbuildinfo
+
+tsconfig.json
+
+.eslintrc.js
+jest.config.js
+
+# exclude cdk artifacts
+**/cdk.out
+junit.xml
+test/
diff --git a/packages/@aws-cdk/aws-databrew/LICENSE b/packages/@aws-cdk/aws-databrew/LICENSE
new file mode 100644
index 0000000000000..b71ec1688783a
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/packages/@aws-cdk/aws-databrew/NOTICE b/packages/@aws-cdk/aws-databrew/NOTICE
new file mode 100644
index 0000000000000..bfccac9a7f69c
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/NOTICE
@@ -0,0 +1,2 @@
+AWS Cloud Development Kit (AWS CDK)
+Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
diff --git a/packages/@aws-cdk/aws-databrew/README.md b/packages/@aws-cdk/aws-databrew/README.md
new file mode 100644
index 0000000000000..d3ad1b0618ed8
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/README.md
@@ -0,0 +1,16 @@
+## AWS::DataBrew Construct Library
+
+---
+
+![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
+
+> All classes with the `Cfn` prefix in this module ([CFN Resources](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) are always stable and safe to use.
+
+---
+
+
+This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
+
+```ts
+import databrew = require('@aws-cdk/aws-databrew');
+```
diff --git a/packages/@aws-cdk/aws-databrew/jest.config.js b/packages/@aws-cdk/aws-databrew/jest.config.js
new file mode 100644
index 0000000000000..54e28beb9798b
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/jest.config.js
@@ -0,0 +1,2 @@
+const baseConfig = require('cdk-build-tools/config/jest.config');
+module.exports = baseConfig;
diff --git a/packages/@aws-cdk/aws-databrew/lib/index.ts b/packages/@aws-cdk/aws-databrew/lib/index.ts
new file mode 100644
index 0000000000000..1e8de6dfda21a
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/lib/index.ts
@@ -0,0 +1,2 @@
+// AWS::DataBrew CloudFormation Resources:
+export * from './databrew.generated';
diff --git a/packages/@aws-cdk/aws-databrew/package.json b/packages/@aws-cdk/aws-databrew/package.json
new file mode 100644
index 0000000000000..4fe82b685a9fc
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/package.json
@@ -0,0 +1,96 @@
+{
+ "name": "@aws-cdk/aws-databrew",
+ "version": "0.0.0",
+ "description": "The CDK Construct Library for AWS::DataBrew",
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts",
+ "jsii": {
+ "outdir": "dist",
+ "projectReferences": true,
+ "targets": {
+ "dotnet": {
+ "namespace": "Amazon.CDK.AWS.DataBrew",
+ "packageId": "Amazon.CDK.AWS.DataBrew",
+ "signAssembly": true,
+ "assemblyOriginatorKeyFile": "../../key.snk",
+ "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png"
+ },
+ "java": {
+ "package": "software.amazon.awscdk.services.databrew",
+ "maven": {
+ "groupId": "software.amazon.awscdk",
+ "artifactId": "databrew"
+ }
+ },
+ "python": {
+ "classifiers": [
+ "Framework :: AWS CDK",
+ "Framework :: AWS CDK :: 1"
+ ],
+ "distName": "aws-cdk.aws-databrew",
+ "module": "aws_cdk.aws_databrew"
+ }
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/aws/aws-cdk.git",
+ "directory": "packages/@aws-cdk/aws-databrew"
+ },
+ "homepage": "https://github.com/aws/aws-cdk",
+ "scripts": {
+ "build": "cdk-build",
+ "watch": "cdk-watch",
+ "lint": "cdk-lint",
+ "test": "cdk-test",
+ "integ": "cdk-integ",
+ "pkglint": "pkglint -f",
+ "package": "cdk-package",
+ "awslint": "cdk-awslint",
+ "cfn2ts": "cfn2ts",
+ "build+test+package": "npm run build+test && npm run package",
+ "build+test": "npm run build && npm test",
+ "compat": "cdk-compat",
+ "gen": "cfn2ts"
+ },
+ "cdk-build": {
+ "cloudformation": "AWS::DataBrew",
+ "jest": true,
+ "env": {
+ "AWSLINT_BASE_CONSTRUCT": "true"
+ }
+ },
+ "keywords": [
+ "aws",
+ "cdk",
+ "constructs",
+ "AWS::DataBrew",
+ "aws-databrew"
+ ],
+ "author": {
+ "name": "Amazon Web Services",
+ "url": "https://aws.amazon.com",
+ "organization": true
+ },
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "@aws-cdk/assert": "0.0.0",
+ "cdk-build-tools": "0.0.0",
+ "cfn2ts": "0.0.0",
+ "pkglint": "0.0.0"
+ },
+ "dependencies": {
+ "@aws-cdk/core": "0.0.0"
+ },
+ "peerDependencies": {
+ "@aws-cdk/core": "0.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0 <13 || >=13.7.0"
+ },
+ "stability": "experimental",
+ "maturity": "cfn-only",
+ "awscdkio": {
+ "announce": false
+ }
+}
diff --git a/packages/@aws-cdk/aws-databrew/test/databrew.test.ts b/packages/@aws-cdk/aws-databrew/test/databrew.test.ts
new file mode 100644
index 0000000000000..e394ef336bfb4
--- /dev/null
+++ b/packages/@aws-cdk/aws-databrew/test/databrew.test.ts
@@ -0,0 +1,6 @@
+import '@aws-cdk/assert/jest';
+import {} from '../lib';
+
+test('No tests are specified for this package', () => {
+ expect(true).toBe(true);
+});
diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts
index f67175c62c5b9..780d240abbc55 100644
--- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts
+++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts
@@ -558,9 +558,9 @@ abstract class TableBase extends Resource implements ITable {
actions,
resourceArns: [
this.tableArn,
- Lazy.stringValue({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }),
+ Lazy.string({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }),
...this.regionalArns,
- ...this.regionalArns.map(arn => Lazy.stringValue({
+ ...this.regionalArns.map(arn => Lazy.string({
produce: () => this.hasIndex ? `${arn}/index/*` : Aws.NO_VALUE,
})),
],
@@ -873,9 +873,9 @@ abstract class TableBase extends Resource implements ITable {
): iam.Grant {
if (opts.tableActions) {
const resources = [this.tableArn,
- Lazy.stringValue({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }),
+ Lazy.string({ produce: () => this.hasIndex ? `${this.tableArn}/index/*` : Aws.NO_VALUE }),
...this.regionalArns,
- ...this.regionalArns.map(arn => Lazy.stringValue({
+ ...this.regionalArns.map(arn => Lazy.string({
produce: () => this.hasIndex ? `${arn}/index/*` : Aws.NO_VALUE,
}))];
const ret = iam.Grant.addToPrincipal({
@@ -1059,8 +1059,8 @@ export class Table extends TableBase {
tableName: this.physicalName,
keySchema: this.keySchema,
attributeDefinitions: this.attributeDefinitions,
- globalSecondaryIndexes: Lazy.anyValue({ produce: () => this.globalSecondaryIndexes }, { omitEmptyArray: true }),
- localSecondaryIndexes: Lazy.anyValue({ produce: () => this.localSecondaryIndexes }, { omitEmptyArray: true }),
+ globalSecondaryIndexes: Lazy.any({ produce: () => this.globalSecondaryIndexes }, { omitEmptyArray: true }),
+ localSecondaryIndexes: Lazy.any({ produce: () => this.localSecondaryIndexes }, { omitEmptyArray: true }),
pointInTimeRecoverySpecification: props.pointInTimeRecovery ? { pointInTimeRecoveryEnabled: props.pointInTimeRecovery } : undefined,
billingMode: this.billingMode === BillingMode.PAY_PER_REQUEST ? this.billingMode : undefined,
provisionedThroughput: this.billingMode === BillingMode.PAY_PER_REQUEST ? undefined : {
diff --git a/packages/@aws-cdk/aws-ec2/lib/instance.ts b/packages/@aws-cdk/aws-ec2/lib/instance.ts
index 07ada4670aa9a..a7e56280fa4dd 100644
--- a/packages/@aws-cdk/aws-ec2/lib/instance.ts
+++ b/packages/@aws-cdk/aws-ec2/lib/instance.ts
@@ -324,8 +324,8 @@ export class Instance extends Resource implements IInstance {
// use delayed evaluation
const imageConfig = props.machineImage.getImage(this);
this.userData = props.userData ?? imageConfig.userData;
- const userDataToken = Lazy.stringValue({ produce: () => Fn.base64(this.userData.render()) });
- const securityGroupsToken = Lazy.listValue({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) });
+ const userDataToken = Lazy.string({ produce: () => Fn.base64(this.userData.render()) });
+ const securityGroupsToken = Lazy.list({ produce: () => this.securityGroups.map(sg => sg.securityGroupId) });
const { subnets } = props.vpc.selectSubnets(props.vpcSubnets);
let subnet;
@@ -385,7 +385,7 @@ export class Instance extends Resource implements IInstance {
// Trigger replacement (via new logical ID) on user data change, if specified or cfn-init is being used.
const originalLogicalId = Stack.of(this).getLogicalId(this.instance);
- this.instance.overrideLogicalId(Lazy.stringValue({
+ this.instance.overrideLogicalId(Lazy.uncachedString({
produce: () => {
let logicalId = originalLogicalId;
if (props.userDataCausesReplacement ?? props.initOptions) {
diff --git a/packages/@aws-cdk/aws-ec2/lib/security-group.ts b/packages/@aws-cdk/aws-ec2/lib/security-group.ts
index db733fcb816d4..62a0ceb19e0ca 100644
--- a/packages/@aws-cdk/aws-ec2/lib/security-group.ts
+++ b/packages/@aws-cdk/aws-ec2/lib/security-group.ts
@@ -395,8 +395,8 @@ export class SecurityGroup extends SecurityGroupBase {
this.securityGroup = new CfnSecurityGroup(this, 'Resource', {
groupName: this.physicalName,
groupDescription,
- securityGroupIngress: Lazy.anyValue({ produce: () => this.directIngressRules }, { omitEmptyArray: true } ),
- securityGroupEgress: Lazy.anyValue({ produce: () => this.directEgressRules }, { omitEmptyArray: true } ),
+ securityGroupIngress: Lazy.any({ produce: () => this.directIngressRules }, { omitEmptyArray: true } ),
+ securityGroupEgress: Lazy.any({ produce: () => this.directEgressRules }, { omitEmptyArray: true } ),
vpcId: props.vpc.vpcId,
});
diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts
index f66045e9ffd3c..e17632ac2acb0 100644
--- a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts
+++ b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts
@@ -192,7 +192,7 @@ export class GatewayVpcEndpoint extends VpcEndpoint implements IGatewayVpcEndpoi
}
const endpoint = new CfnVPCEndpoint(this, 'Resource', {
- policyDocument: Lazy.anyValue({ produce: () => this.policyDocument }),
+ policyDocument: Lazy.any({ produce: () => this.policyDocument }),
routeTableIds,
serviceName: props.service.name,
vpcEndpointType: VpcEndpointType.GATEWAY,
@@ -318,7 +318,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ
public readonly privateDnsDefault?: boolean = true;
constructor(name: string, prefix?: string, port?: number) {
- const region = Lazy.stringValue({
+ const region = Lazy.uncachedString({
produce: (context) => Stack.of(context.scope).region,
});
this.name = `${prefix || 'com.amazonaws'}.${region}.${name}`;
@@ -482,7 +482,7 @@ export class InterfaceVpcEndpoint extends VpcEndpoint implements IInterfaceVpcEn
const endpoint = new CfnVPCEndpoint(this, 'Resource', {
privateDnsEnabled: props.privateDnsEnabled ?? props.service.privateDnsDefault ?? true,
- policyDocument: Lazy.anyValue({ produce: () => this.policyDocument }),
+ policyDocument: Lazy.any({ produce: () => this.policyDocument }),
securityGroupIds: securityGroups.map(s => s.securityGroupId),
serviceName: props.service.name,
vpcEndpointType: VpcEndpointType.INTERFACE,
diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts
index 7cbf02c76a452..f6ce634b18a75 100644
--- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts
+++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts
@@ -1536,7 +1536,7 @@ export class Subnet extends Resource implements ISubnet {
// subnet.attrNetworkAclAssociationId is the default ACL after the subnet
// was just created. However, the ACL can be replaced at a later time.
this._networkAcl = NetworkAcl.fromNetworkAclId(this, 'Acl', subnet.attrNetworkAclAssociationId);
- this.subnetNetworkAclAssociationId = Lazy.stringValue({ produce: () => this._networkAcl.networkAclId });
+ this.subnetNetworkAclAssociationId = Lazy.string({ produce: () => this._networkAcl.networkAclId });
this.node.defaultChild = subnet;
const table = new CfnRouteTable(this, 'RouteTable', {
diff --git a/packages/@aws-cdk/aws-ec2/test/security-group.test.ts b/packages/@aws-cdk/aws-ec2/test/security-group.test.ts
index 1a72a6a715d2c..9851d87235c41 100644
--- a/packages/@aws-cdk/aws-ec2/test/security-group.test.ts
+++ b/packages/@aws-cdk/aws-ec2/test/security-group.test.ts
@@ -163,11 +163,11 @@ nodeunitShim({
const ports = [
Port.tcp(1234),
- Port.tcp(Lazy.numberValue({ produce: () => 5000 })),
+ Port.tcp(Lazy.number({ produce: () => 5000 })),
Port.allTcp(),
Port.tcpRange(80, 90),
Port.udp(2345),
- Port.udp(Lazy.numberValue({ produce: () => 7777 })),
+ Port.udp(Lazy.number({ produce: () => 7777 })),
Port.allUdp(),
Port.udpRange(85, 95),
Port.icmpTypeAndCode(5, 1),
@@ -192,8 +192,8 @@ nodeunitShim({
'if tokens are used in ports, `canInlineRule` should be false to avoid cycles'(test: Test) {
// GIVEN
- const p1 = Lazy.numberValue({ produce: () => 80 });
- const p2 = Lazy.numberValue({ produce: () => 5000 });
+ const p1 = Lazy.number({ produce: () => 80 });
+ const p2 = Lazy.number({ produce: () => 5000 });
// WHEN
const ports = [
diff --git a/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts
index 766a16dea0b1d..5555dc3fa9ed7 100644
--- a/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts
+++ b/packages/@aws-cdk/aws-ec2/test/vpc.from-lookup.test.ts
@@ -13,7 +13,7 @@ nodeunitShim({
test.throws(() => {
Vpc.fromLookup(stack, 'Vpc', {
- vpcId: Lazy.stringValue({ produce: () => 'some-id' }),
+ vpcId: Lazy.string({ produce: () => 'some-id' }),
});
}, 'All arguments to Vpc.fromLookup() must be concrete');
diff --git a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts
index 9163a210738f8..9ea01086411dd 100644
--- a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts
+++ b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts
@@ -818,7 +818,7 @@ nodeunitShim({
const stack = new Stack();
test.throws(() => {
new Vpc(stack, 'Vpc', {
- cidr: Lazy.stringValue({ produce: () => 'abc' }),
+ cidr: Lazy.string({ produce: () => 'abc' }),
});
}, /property must be a concrete CIDR string/);
diff --git a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts
index 7da0621f2aa42..efa1498b41d90 100644
--- a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts
+++ b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts
@@ -238,7 +238,7 @@ nodeunitShim({
'fails if using tokens in build args keys or values'(test: Test) {
// GIVEN
- const token = Lazy.stringValue({ produce: () => 'foo' });
+ const token = Lazy.string({ produce: () => 'foo' });
const expected = /Cannot use tokens in keys or values of "buildArgs" since they are needed before deployment/;
// THEN
@@ -257,7 +257,7 @@ nodeunitShim({
'fails if using token as repositoryName'(test: Test) {
// GIVEN
- const token = Lazy.stringValue({ produce: () => 'foo' });
+ const token = Lazy.string({ produce: () => 'foo' });
// THEN
test.throws(() => new DockerImageAsset(stack, 'MyAsset1', {
diff --git a/packages/@aws-cdk/aws-ecr/lib/repository.ts b/packages/@aws-cdk/aws-ecr/lib/repository.ts
index 53990d1e07934..36e14cf861adc 100644
--- a/packages/@aws-cdk/aws-ecr/lib/repository.ts
+++ b/packages/@aws-cdk/aws-ecr/lib/repository.ts
@@ -417,8 +417,8 @@ export class Repository extends RepositoryBase {
const resource = new CfnRepository(this, 'Resource', {
repositoryName: this.physicalName,
// It says "Text", but they actually mean "Object".
- repositoryPolicyText: Lazy.anyValue({ produce: () => this.policyDocument }),
- lifecyclePolicy: Lazy.anyValue({ produce: () => this.renderLifecyclePolicy() }),
+ repositoryPolicyText: Lazy.any({ produce: () => this.policyDocument }),
+ lifecyclePolicy: Lazy.any({ produce: () => this.renderLifecyclePolicy() }),
imageScanningConfiguration: !props.imageScanOnPush ? undefined : {
scanOnPush: true,
},
diff --git a/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts b/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
index ac4f4cf6f035a..535fb240217ec 100644
--- a/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
+++ b/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
@@ -340,7 +340,7 @@ export abstract class BaseService extends Resource
this.resource = new CfnService(this, 'Service', {
desiredCount: props.desiredCount,
serviceName: this.physicalName,
- loadBalancers: Lazy.anyValue({ produce: () => this.loadBalancers }, { omitEmptyArray: true }),
+ loadBalancers: Lazy.any({ produce: () => this.loadBalancers }, { omitEmptyArray: true }),
deploymentConfiguration: {
maximumPercent: props.maxHealthyPercent || 200,
minimumHealthyPercent: props.minHealthyPercent === undefined ? 50 : props.minHealthyPercent,
@@ -351,8 +351,8 @@ export abstract class BaseService extends Resource
launchType: props.deploymentController?.type === DeploymentControllerType.EXTERNAL ? undefined : props.launchType,
healthCheckGracePeriodSeconds: this.evaluateHealthGracePeriod(props.healthCheckGracePeriod),
/* role: never specified, supplanted by Service Linked Role */
- networkConfiguration: Lazy.anyValue({ produce: () => this.networkConfiguration }, { omitEmptyArray: true }),
- serviceRegistries: Lazy.anyValue({ produce: () => this.serviceRegistries }, { omitEmptyArray: true }),
+ networkConfiguration: Lazy.any({ produce: () => this.networkConfiguration }, { omitEmptyArray: true }),
+ serviceRegistries: Lazy.any({ produce: () => this.serviceRegistries }, { omitEmptyArray: true }),
...additionalProps,
});
@@ -606,7 +606,7 @@ export abstract class BaseService extends Resource
awsvpcConfiguration: {
assignPublicIp: assignPublicIp ? 'ENABLED' : 'DISABLED',
subnets: vpc.selectSubnets(vpcSubnets).subnetIds,
- securityGroups: Lazy.listValue({ produce: () => [securityGroup!.securityGroupId] }),
+ securityGroups: Lazy.list({ produce: () => [securityGroup!.securityGroupId] }),
},
};
}
@@ -714,7 +714,7 @@ export abstract class BaseService extends Resource
* healthCheckGracePeriod is not already set
*/
private evaluateHealthGracePeriod(providedHealthCheckGracePeriod?: Duration): IResolvable {
- return Lazy.anyValue({
+ return Lazy.any({
produce: () => providedHealthCheckGracePeriod !== undefined ? providedHealthCheckGracePeriod.toSeconds() :
this.loadBalancers.length > 0 ? 60 :
undefined,
diff --git a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts
index 862193b11fe3b..ff27f00cb79a8 100644
--- a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts
+++ b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts
@@ -122,9 +122,13 @@ export interface TaskDefinitionProps extends CommonTaskDefinitionProps {
* which determines your range of valid values for the memory parameter:
*
* 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
+ *
* 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
+ *
* 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
+ *
* 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
+ *
* 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
*
* @default - CPU units are not specified.
@@ -139,9 +143,13 @@ export interface TaskDefinitionProps extends CommonTaskDefinitionProps {
* which determines your range of valid values for the cpu parameter:
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
+ *
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
+ *
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
+ *
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
+ *
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
*
* @default - Memory used by task is not specified.
@@ -299,9 +307,9 @@ export class TaskDefinition extends TaskDefinitionBase {
});
const taskDef = new CfnTaskDefinition(this, 'Resource', {
- containerDefinitions: Lazy.anyValue({ produce: () => this.renderContainers() }, { omitEmptyArray: true }),
- volumes: Lazy.anyValue({ produce: () => this.renderVolumes() }, { omitEmptyArray: true }),
- executionRoleArn: Lazy.stringValue({ produce: () => this.executionRole && this.executionRole.roleArn }),
+ containerDefinitions: Lazy.any({ produce: () => this.renderContainers() }, { omitEmptyArray: true }),
+ volumes: Lazy.any({ produce: () => this.renderVolumes() }, { omitEmptyArray: true }),
+ executionRoleArn: Lazy.string({ produce: () => this.executionRole && this.executionRole.roleArn }),
family: this.family,
taskRoleArn: this.taskRole.roleArn,
requiresCompatibilities: [
@@ -309,7 +317,7 @@ export class TaskDefinition extends TaskDefinitionBase {
...(isFargateCompatible(props.compatibility) ? ['FARGATE'] : []),
],
networkMode: this.renderNetworkMode(this.networkMode),
- placementConstraints: Lazy.anyValue({
+ placementConstraints: Lazy.any({
produce: () =>
!isFargateCompatible(this.compatibility) ? this.placementConstraints : undefined,
}, { omitEmptyArray: true }),
diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts
index 0ad416ea61880..341ffe5237b4c 100644
--- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts
+++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts
@@ -590,7 +590,7 @@ export class ContainerDefinition extends cdk.Construct {
command: this.props.command,
cpu: this.props.cpu,
disableNetworking: this.props.disableNetworking,
- dependsOn: cdk.Lazy.anyValue({ produce: () => this.containerDependencies.map(renderContainerDependency) }, { omitEmptyArray: true }),
+ dependsOn: cdk.Lazy.any({ produce: () => this.containerDependencies.map(renderContainerDependency) }, { omitEmptyArray: true }),
dnsSearchDomains: this.props.dnsSearchDomains,
dnsServers: this.props.dnsServers,
dockerLabels: this.props.dockerLabels,
@@ -601,17 +601,17 @@ export class ContainerDefinition extends cdk.Construct {
image: this.imageConfig.imageName,
memory: this.props.memoryLimitMiB,
memoryReservation: this.props.memoryReservationMiB,
- mountPoints: cdk.Lazy.anyValue({ produce: () => this.mountPoints.map(renderMountPoint) }, { omitEmptyArray: true }),
+ mountPoints: cdk.Lazy.any({ produce: () => this.mountPoints.map(renderMountPoint) }, { omitEmptyArray: true }),
name: this.containerName,
- portMappings: cdk.Lazy.anyValue({ produce: () => this.portMappings.map(renderPortMapping) }, { omitEmptyArray: true }),
+ portMappings: cdk.Lazy.any({ produce: () => this.portMappings.map(renderPortMapping) }, { omitEmptyArray: true }),
privileged: this.props.privileged,
readonlyRootFilesystem: this.props.readonlyRootFilesystem,
repositoryCredentials: this.imageConfig.repositoryCredentials,
startTimeout: this.props.startTimeout && this.props.startTimeout.toSeconds(),
stopTimeout: this.props.stopTimeout && this.props.stopTimeout.toSeconds(),
- ulimits: cdk.Lazy.anyValue({ produce: () => this.ulimits.map(renderUlimit) }, { omitEmptyArray: true }),
+ ulimits: cdk.Lazy.any({ produce: () => this.ulimits.map(renderUlimit) }, { omitEmptyArray: true }),
user: this.props.user,
- volumesFrom: cdk.Lazy.anyValue({ produce: () => this.volumesFrom.map(renderVolumeFrom) }, { omitEmptyArray: true }),
+ volumesFrom: cdk.Lazy.any({ produce: () => this.volumesFrom.map(renderVolumeFrom) }, { omitEmptyArray: true }),
workingDirectory: this.props.workingDirectory,
logConfiguration: this.logDriverConfig,
environment: this.props.environment && renderKV(this.props.environment, 'name', 'value'),
@@ -619,7 +619,7 @@ export class ContainerDefinition extends cdk.Construct {
secrets: this.secrets,
extraHosts: this.props.extraHosts && renderKV(this.props.extraHosts, 'hostname', 'ipAddress'),
healthCheck: this.props.healthCheck && renderHealthCheck(this.props.healthCheck),
- links: cdk.Lazy.listValue({ produce: () => this.links }, { omitEmpty: true }),
+ links: cdk.Lazy.list({ produce: () => this.links }, { omitEmpty: true }),
linuxParameters: this.linuxParameters && this.linuxParameters.renderLinuxParameters(),
resourceRequirements: (this.props.gpuCount !== undefined) ? renderResourceRequirements(this.props.gpuCount) : undefined,
};
diff --git a/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts b/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts
index 151375ba68764..33769c3223b08 100644
--- a/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts
+++ b/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts
@@ -197,8 +197,8 @@ export class Ec2Service extends BaseService implements IEc2Service {
{
cluster: props.cluster.clusterName,
taskDefinition: props.deploymentController?.type === DeploymentControllerType.EXTERNAL ? undefined : props.taskDefinition.taskDefinitionArn,
- placementConstraints: Lazy.anyValue({ produce: () => this.constraints }, { omitEmptyArray: true }),
- placementStrategies: Lazy.anyValue({ produce: () => this.strategies }, { omitEmptyArray: true }),
+ placementConstraints: Lazy.any({ produce: () => this.constraints }, { omitEmptyArray: true }),
+ placementStrategies: Lazy.any({ produce: () => this.strategies }, { omitEmptyArray: true }),
schedulingStrategy: props.daemon ? 'DAEMON' : 'REPLICA',
}, props.taskDefinition);
diff --git a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts
index 4513e55debe63..eba4ac4371ee8 100644
--- a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts
+++ b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-task-definition.ts
@@ -12,9 +12,13 @@ export interface FargateTaskDefinitionProps extends CommonTaskDefinitionProps {
* which determines your range of valid values for the memory parameter:
*
* 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
+ *
* 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
+ *
* 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
+ *
* 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
+ *
* 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
*
* @default 256
@@ -26,9 +30,13 @@ export interface FargateTaskDefinitionProps extends CommonTaskDefinitionProps {
* this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter:
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
+ *
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
+ *
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
+ *
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
+ *
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
*
* @default 512
diff --git a/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts b/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts
index fbf77f69b76f3..45e792126fd20 100644
--- a/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts
+++ b/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts
@@ -107,11 +107,11 @@ export class LinuxParameters extends cdk.Construct {
initProcessEnabled: this.initProcessEnabled,
sharedMemorySize: this.sharedMemorySize,
capabilities: {
- add: cdk.Lazy.listValue({ produce: () => this.capAdd }, { omitEmpty: true }),
- drop: cdk.Lazy.listValue({ produce: () => this.capDrop }, { omitEmpty: true }),
+ add: cdk.Lazy.list({ produce: () => this.capAdd }, { omitEmpty: true }),
+ drop: cdk.Lazy.list({ produce: () => this.capDrop }, { omitEmpty: true }),
},
- devices: cdk.Lazy.anyValue({ produce: () => this.devices.map(renderDevice) }, { omitEmptyArray: true }),
- tmpfs: cdk.Lazy.anyValue({ produce: () => this.tmpfs.map(renderTmpfs) }, { omitEmptyArray: true }),
+ devices: cdk.Lazy.any({ produce: () => this.devices.map(renderDevice) }, { omitEmptyArray: true }),
+ tmpfs: cdk.Lazy.any({ produce: () => this.tmpfs.map(renderTmpfs) }, { omitEmptyArray: true }),
};
}
}
diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts
index 2d7687f5855e6..99aeb6da886f9 100644
--- a/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts
+++ b/packages/@aws-cdk/aws-ecs/test/fargate/test.fargate-task-definition.ts
@@ -28,8 +28,8 @@ export = {
const stack = new cdk.Stack();
new ecs.FargateTaskDefinition(stack, 'FargateTaskDef', {
- cpu: cdk.Lazy.numberValue({ produce: () => 128 }),
- memoryLimitMiB: cdk.Lazy.numberValue({ produce: () => 1024 }),
+ cpu: cdk.Lazy.number({ produce: () => 128 }),
+ memoryLimitMiB: cdk.Lazy.number({ produce: () => 1024 }),
});
// THEN
diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts b/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts
index b4c5de9af36d6..276937847d558 100644
--- a/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts
+++ b/packages/@aws-cdk/aws-eks-legacy/lib/aws-auth.ts
@@ -92,7 +92,7 @@ export class AwsAuth extends Construct {
}
private synthesizeMapRoles() {
- return Lazy.anyValue({
+ return Lazy.any({
produce: () => this.stack.toJsonString(this.roleMappings.map(m => ({
rolearn: m.role.roleArn,
username: m.mapping.username,
@@ -102,7 +102,7 @@ export class AwsAuth extends Construct {
}
private synthesizeMapUsers() {
- return Lazy.anyValue({
+ return Lazy.any({
produce: () => this.stack.toJsonString(this.userMappings.map(m => ({
userarn: m.user.userArn,
username: m.mapping.username,
@@ -112,7 +112,7 @@ export class AwsAuth extends Construct {
}
private synthesizeMapAccounts() {
- return Lazy.anyValue({
+ return Lazy.any({
produce: () => this.stack.toJsonString(this.accounts),
});
}
diff --git a/packages/@aws-cdk/aws-eks/lib/aws-auth.ts b/packages/@aws-cdk/aws-eks/lib/aws-auth.ts
index 1d0317758f705..02f2b321933f7 100644
--- a/packages/@aws-cdk/aws-eks/lib/aws-auth.ts
+++ b/packages/@aws-cdk/aws-eks/lib/aws-auth.ts
@@ -115,7 +115,7 @@ export class AwsAuth extends CoreConstruct {
}
private synthesizeMapRoles() {
- return Lazy.anyValue({
+ return Lazy.any({
produce: () => this.stack.toJsonString(this.roleMappings.map(m => ({
rolearn: m.role.roleArn,
username: m.mapping.username ?? m.role.roleArn,
@@ -125,7 +125,7 @@ export class AwsAuth extends CoreConstruct {
}
private synthesizeMapUsers() {
- return Lazy.anyValue({
+ return Lazy.any({
produce: () => this.stack.toJsonString(this.userMappings.map(m => ({
userarn: m.user.userArn,
username: m.mapping.username ?? m.user.userArn,
@@ -135,7 +135,7 @@ export class AwsAuth extends CoreConstruct {
}
private synthesizeMapAccounts() {
- return Lazy.anyValue({
+ return Lazy.any({
produce: () => this.stack.toJsonString(this.accounts),
});
}
diff --git a/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts b/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts
index e41625ea3c808..788210c987dbe 100644
--- a/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts
+++ b/packages/@aws-cdk/aws-eks/lib/cluster-resource.ts
@@ -122,7 +122,7 @@ export class ClusterResource extends CoreConstruct {
// this role to manage all clusters in the account. this must be lazy since
// `props.name` may contain a lazy value that conditionally resolves to a
// physical name.
- const resourceArns = Lazy.listValue({
+ const resourceArns = Lazy.list({
produce: () => {
const arn = stack.formatArn(clusterArnComponents(stack.resolve(props.name)));
return stack.resolve(props.name)
@@ -131,7 +131,7 @@ export class ClusterResource extends CoreConstruct {
},
});
- const fargateProfileResourceArn = Lazy.stringValue({
+ const fargateProfileResourceArn = Lazy.string({
produce: () => stack.resolve(props.name)
? stack.formatArn({ service: 'eks', resource: 'fargateprofile', resourceName: stack.resolve(props.name) + '/*' })
: '*',
diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts
index ec6f048a4de58..7974f988aff33 100644
--- a/packages/@aws-cdk/aws-eks/lib/cluster.ts
+++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts
@@ -1352,18 +1352,20 @@ export class Cluster extends ClusterBase {
private selectPrivateSubnets(): ec2.ISubnet[] {
const privateSubnets: ec2.ISubnet[] = [];
+ const vpcPrivateSubnetIds = this.vpc.privateSubnets.map(s => s.subnetId);
+ const vpcPublicSubnetIds = this.vpc.publicSubnets.map(s => s.subnetId);
for (const placement of this.vpcSubnets) {
for (const subnet of this.vpc.selectSubnets(placement).subnets) {
- if (this.vpc.privateSubnets.includes(subnet)) {
+ if (vpcPrivateSubnetIds.includes(subnet.subnetId)) {
// definitely private, take it.
privateSubnets.push(subnet);
continue;
}
- if (this.vpc.publicSubnets.includes(subnet)) {
+ if (vpcPublicSubnetIds.includes(subnet.subnetId)) {
// definitely public, skip it.
continue;
}
diff --git a/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts b/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts
index a070d04af3910..4ce6f094909bd 100644
--- a/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts
+++ b/packages/@aws-cdk/aws-eks/lib/fargate-profile.ts
@@ -183,7 +183,7 @@ export class FargateProfile extends CoreConstruct implements ITaggable {
podExecutionRoleArn: this.podExecutionRole.roleArn,
selectors: props.selectors,
subnets,
- tags: Lazy.anyValue({ produce: () => this.tags.renderTags() }),
+ tags: Lazy.any({ produce: () => this.tags.renderTags() }),
},
},
});
diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts
index 170273d0485fe..facdf1880d426 100644
--- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts
+++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts
@@ -2106,6 +2106,103 @@ export = {
test.done();
},
+ 'private endpoint access selects only private subnets from looked up vpc with concrete subnet selection'(test: Test) {
+
+ const vpcId = 'vpc-12345';
+ // can't use the regular fixture because it also adds a VPC to the stack, which prevents
+ // us from setting context.
+ const stack = new cdk.Stack(new cdk.App(), 'Stack', {
+ env: {
+ account: '11112222',
+ region: 'us-east-1',
+ },
+ });
+ stack.node.setContext(`vpc-provider:account=${stack.account}:filter.vpc-id=${vpcId}:region=${stack.region}:returnAsymmetricSubnets=true`, {
+ vpcId: vpcId,
+ vpcCidrBlock: '10.0.0.0/16',
+ subnetGroups: [
+ {
+ name: 'Private',
+ type: 'Private',
+ subnets: [
+ {
+ subnetId: 'subnet-private-in-us-east-1a',
+ cidr: '10.0.1.0/24',
+ availabilityZone: 'us-east-1a',
+ routeTableId: 'rtb-06068e4c4049921ef',
+ },
+ ],
+ },
+ {
+ name: 'Public',
+ type: 'Public',
+ subnets: [
+ {
+ subnetId: 'subnet-public-in-us-east-1c',
+ cidr: '10.0.0.0/24',
+ availabilityZone: 'us-east-1c',
+ routeTableId: 'rtb-0ff08e62195198dbb',
+ },
+ ],
+ },
+ ],
+ });
+ const vpc = ec2.Vpc.fromLookup(stack, 'Vpc', {
+ vpcId: vpcId,
+ });
+
+ new eks.Cluster(stack, 'Cluster', {
+ vpc,
+ version: CLUSTER_VERSION,
+ endpointAccess: eks.EndpointAccess.PRIVATE,
+ vpcSubnets: [{
+ subnets: [
+ ec2.Subnet.fromSubnetId(stack, 'Private', 'subnet-private-in-us-east-1a'),
+ ec2.Subnet.fromSubnetId(stack, 'Public', 'subnet-public-in-us-east-1c'),
+ ],
+ }],
+ });
+
+ const nested = stack.node.tryFindChild('@aws-cdk/aws-eks.KubectlProvider') as cdk.NestedStack;
+ const template = expect(nested).value;
+
+ test.deepEqual(template.Resources.Handler886CB40B.Properties.VpcConfig.SubnetIds, [
+ 'subnet-private-in-us-east-1a',
+ ]);
+
+ test.done();
+ },
+
+ 'private endpoint access selects only private subnets from managed vpc with concrete subnet selection'(test: Test) {
+
+ const { stack } = testFixture();
+
+ const vpc = new ec2.Vpc(stack, 'Vpc');
+
+ new eks.Cluster(stack, 'Cluster', {
+ vpc,
+ version: CLUSTER_VERSION,
+ endpointAccess: eks.EndpointAccess.PRIVATE,
+ vpcSubnets: [{
+ subnets: [
+ vpc.privateSubnets[0],
+ vpc.publicSubnets[1],
+ ec2.Subnet.fromSubnetId(stack, 'Private', 'subnet-unknown'),
+ ],
+ }],
+ });
+
+ const nested = stack.node.tryFindChild('@aws-cdk/aws-eks.KubectlProvider') as cdk.NestedStack;
+ const template = expect(nested).value;
+
+ test.deepEqual(template.Resources.Handler886CB40B.Properties.VpcConfig.SubnetIds, [
+ { Ref: 'referencetoStackVpcPrivateSubnet1Subnet8E6A14CBRef' },
+ 'subnet-unknown',
+ ]);
+
+ test.done();
+ },
+
'private endpoint access considers specific subnet selection'(test: Test) {
const { stack } = testFixture();
new eks.Cluster(stack, 'Cluster', {
diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts
index 2bb95496a4c74..55c423f157a55 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts
@@ -245,7 +245,7 @@ export class LoadBalancer extends Resource implements IConnectable {
this.elb = new CfnLoadBalancer(this, 'Resource', {
securityGroups: [this.securityGroup.securityGroupId],
subnets: selectedSubnets.subnetIds,
- listeners: Lazy.anyValue({ produce: () => this.listeners }),
+ listeners: Lazy.any({ produce: () => this.listeners }),
scheme: props.internetFacing ? 'internet-facing' : 'internal',
healthCheck: props.healthCheck && healthCheckToJSON(props.healthCheck),
crossZone: (props.crossZone === undefined || props.crossZone) ? true : false,
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts
index 425e8e8f29a31..13b725a3deb3b 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/lib/cognito-action.ts
@@ -85,7 +85,7 @@ export class AuthenticateCognitoAction extends elbv2.ListenerAction {
onUnauthenticatedRequest: options.onUnauthenticatedRequest,
scope: options.scope,
sessionCookieName: options.sessionCookieName,
- sessionTimeout: options.sessionTimeout?.toSeconds(),
+ sessionTimeout: options.sessionTimeout?.toSeconds().toString(),
},
}, options.next);
}
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts
index 9b3e713a6115c..09ae095c46a92 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-action.ts
@@ -40,7 +40,7 @@ export class ListenerAction implements IListenerAction {
onUnauthenticatedRequest: options.onUnauthenticatedRequest,
scope: options.scope,
sessionCookieName: options.sessionCookieName,
- sessionTimeout: options.sessionTimeout?.toSeconds(),
+ sessionTimeout: options.sessionTimeout?.toSeconds().toString(),
},
}, options.next);
}
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts
index fe22b97653430..edc0e04551f46 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts
@@ -231,8 +231,8 @@ export class ApplicationListenerRule extends cdk.Construct {
const resource = new CfnListenerRule(this, 'Resource', {
listenerArn: props.listener.listenerArn,
priority: props.priority,
- conditions: cdk.Lazy.anyValue({ produce: () => this.renderConditions() }),
- actions: cdk.Lazy.anyValue({ produce: () => this.action ? this.action.renderActions() : [] }),
+ conditions: cdk.Lazy.any({ produce: () => this.renderConditions() }),
+ actions: cdk.Lazy.any({ produce: () => this.action ? this.action.renderActions() : [] }),
});
if (props.hostHeader) {
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts
index 3a055b5fce4be..230c02f7ab84f 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts
@@ -190,7 +190,7 @@ export class ApplicationListener extends BaseListener implements IApplicationLis
super(scope, id, {
loadBalancerArn: props.loadBalancer.loadBalancerArn,
- certificates: Lazy.anyValue({ produce: () => this.certificateArns.map(certificateArn => ({ certificateArn })) }, { omitEmptyArray: true }),
+ certificates: Lazy.any({ produce: () => this.certificateArns.map(certificateArn => ({ certificateArn })) }, { omitEmptyArray: true }),
protocol,
port,
sslPolicy: props.sslPolicy,
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts
index 0b6c9d76a7d8f..d3b428094a344 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts
@@ -83,7 +83,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic
constructor(scope: Construct, id: string, props: ApplicationLoadBalancerProps) {
super(scope, id, props, {
type: 'application',
- securityGroups: Lazy.listValue({ produce: () => this.connections.securityGroups.map(sg => sg.securityGroupId) }),
+ securityGroups: Lazy.list({ produce: () => this.connections.securityGroups.map(sg => sg.securityGroupId) }),
ipAddressType: props.ipAddressType,
});
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts
index b735d6e375870..17170f4402b1a 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-listener.ts
@@ -108,7 +108,7 @@ export abstract class BaseListener extends Resource {
const resource = new CfnListener(this, 'Resource', {
...additionalProps,
- defaultActions: Lazy.anyValue({ produce: () => this.defaultAction ? this.defaultAction.renderActions() : [] }),
+ defaultActions: Lazy.any({ produce: () => this.defaultAction ? this.defaultAction.renderActions() : [] }),
});
this.listenerArn = resource.ref;
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts
index 46526b9376f68..f96b4e7711ccc 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts
@@ -209,7 +209,7 @@ export abstract class BaseLoadBalancer extends Resource {
name: this.physicalName,
subnets: subnetIds,
scheme: internetFacing ? 'internet-facing' : 'internal',
- loadBalancerAttributes: Lazy.anyValue({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true } ),
+ loadBalancerAttributes: Lazy.any({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true } ),
...additionalProps,
});
if (internetFacing) {
diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts
index fbe3e54b5b757..f9155bb1430eb 100644
--- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts
+++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts
@@ -236,25 +236,25 @@ export abstract class TargetGroupBase extends cdk.Construct implements ITargetGr
this.resource = new CfnTargetGroup(this, 'Resource', {
name: baseProps.targetGroupName,
- targetGroupAttributes: cdk.Lazy.anyValue({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true }),
- targetType: cdk.Lazy.stringValue({ produce: () => this.targetType }),
- targets: cdk.Lazy.anyValue({ produce: () => this.targetsJson }, { omitEmptyArray: true }),
- vpcId: cdk.Lazy.stringValue({ produce: () => this.vpc && this.targetType !== TargetType.LAMBDA ? this.vpc.vpcId : undefined }),
+ targetGroupAttributes: cdk.Lazy.any({ produce: () => renderAttributes(this.attributes) }, { omitEmptyArray: true }),
+ targetType: cdk.Lazy.string({ produce: () => this.targetType }),
+ targets: cdk.Lazy.any({ produce: () => this.targetsJson }, { omitEmptyArray: true }),
+ vpcId: cdk.Lazy.string({ produce: () => this.vpc && this.targetType !== TargetType.LAMBDA ? this.vpc.vpcId : undefined }),
// HEALTH CHECK
- healthCheckEnabled: cdk.Lazy.anyValue({ produce: () => this.healthCheck && this.healthCheck.enabled }),
- healthCheckIntervalSeconds: cdk.Lazy.numberValue({
+ healthCheckEnabled: cdk.Lazy.any({ produce: () => this.healthCheck && this.healthCheck.enabled }),
+ healthCheckIntervalSeconds: cdk.Lazy.number({
produce: () => this.healthCheck && this.healthCheck.interval && this.healthCheck.interval.toSeconds(),
}),
- healthCheckPath: cdk.Lazy.stringValue({ produce: () => this.healthCheck && this.healthCheck.path }),
- healthCheckPort: cdk.Lazy.stringValue({ produce: () => this.healthCheck && this.healthCheck.port }),
- healthCheckProtocol: cdk.Lazy.stringValue({ produce: () => this.healthCheck && this.healthCheck.protocol }),
- healthCheckTimeoutSeconds: cdk.Lazy.numberValue({
+ healthCheckPath: cdk.Lazy.string({ produce: () => this.healthCheck && this.healthCheck.path }),
+ healthCheckPort: cdk.Lazy.string({ produce: () => this.healthCheck && this.healthCheck.port }),
+ healthCheckProtocol: cdk.Lazy.string({ produce: () => this.healthCheck && this.healthCheck.protocol }),
+ healthCheckTimeoutSeconds: cdk.Lazy.number({
produce: () => this.healthCheck && this.healthCheck.timeout && this.healthCheck.timeout.toSeconds(),
}),
- healthyThresholdCount: cdk.Lazy.numberValue({ produce: () => this.healthCheck && this.healthCheck.healthyThresholdCount }),
- unhealthyThresholdCount: cdk.Lazy.numberValue({ produce: () => this.healthCheck && this.healthCheck.unhealthyThresholdCount }),
- matcher: cdk.Lazy.anyValue({
+ healthyThresholdCount: cdk.Lazy.number({ produce: () => this.healthCheck && this.healthCheck.healthyThresholdCount }),
+ unhealthyThresholdCount: cdk.Lazy.number({ produce: () => this.healthCheck && this.healthCheck.unhealthyThresholdCount }),
+ matcher: cdk.Lazy.any({
produce: () => this.healthCheck && this.healthCheck.healthyHttpCodes !== undefined ? {
httpCode: this.healthCheck.healthyHttpCodes,
} : undefined,
diff --git a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts
index 4931bde8f4a1e..42e50714bdad8 100644
--- a/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts
+++ b/packages/@aws-cdk/aws-elasticsearch/lib/domain.ts
@@ -1240,7 +1240,7 @@ export class Domain extends DomainBase implements IDomain {
effect: iam.Effect.ALLOW,
actions: ['es:ESHttp*'],
principals: [new iam.Anyone()],
- resources: [cdk.Lazy.stringValue({ produce: () => `${this.domainArn}/*` })],
+ resources: [cdk.Lazy.string({ produce: () => `${this.domainArn}/*` })],
});
const masterUserArn = props.fineGrainedAccessControl?.masterUserArn;
diff --git a/packages/@aws-cdk/aws-events/lib/event-bus.ts b/packages/@aws-cdk/aws-events/lib/event-bus.ts
index 6101b44f680f4..27c79c9c7fe3a 100644
--- a/packages/@aws-cdk/aws-events/lib/event-bus.ts
+++ b/packages/@aws-cdk/aws-events/lib/event-bus.ts
@@ -219,7 +219,7 @@ export class EventBus extends Resource implements IEventBus {
constructor(scope: Construct, id: string, props?: EventBusProps) {
const { eventBusName, eventSourceName } = EventBus.eventBusProps(
- Lazy.stringValue({ produce: () => Names.uniqueId(this) }),
+ Lazy.string({ produce: () => Names.uniqueId(this) }),
props,
);
diff --git a/packages/@aws-cdk/aws-events/lib/input.ts b/packages/@aws-cdk/aws-events/lib/input.ts
index b3f8938b4d4c7..1fd68a1754119 100644
--- a/packages/@aws-cdk/aws-events/lib/input.ts
+++ b/packages/@aws-cdk/aws-events/lib/input.ts
@@ -219,7 +219,7 @@ class FieldAwareEventInput extends RuleTargetInput {
private unquoteKeyPlaceholders(sub: string) {
if (this.inputType !== InputType.Object) { return sub; }
- return Lazy.stringValue({ produce: (ctx: IResolveContext) => Token.asString(deepUnquote(ctx.resolve(sub))) });
+ return Lazy.uncachedString({ produce: (ctx: IResolveContext) => Token.asString(deepUnquote(ctx.resolve(sub))) });
function deepUnquote(resolved: any): any {
if (Array.isArray(resolved)) {
diff --git a/packages/@aws-cdk/aws-events/lib/rule.ts b/packages/@aws-cdk/aws-events/lib/rule.ts
index 98e629874e382..0079954e73558 100644
--- a/packages/@aws-cdk/aws-events/lib/rule.ts
+++ b/packages/@aws-cdk/aws-events/lib/rule.ts
@@ -132,8 +132,8 @@ export class Rule extends Resource implements IRule {
description: this.description,
state: props.enabled == null ? 'ENABLED' : (props.enabled ? 'ENABLED' : 'DISABLED'),
scheduleExpression: this.scheduleExpression,
- eventPattern: Lazy.anyValue({ produce: () => this._renderEventPattern() }),
- targets: Lazy.anyValue({ produce: () => this.renderTargets() }),
+ eventPattern: Lazy.any({ produce: () => this._renderEventPattern() }),
+ targets: Lazy.any({ produce: () => this.renderTargets() }),
eventBusName: props.eventBus && props.eventBus.eventBusName,
});
diff --git a/packages/@aws-cdk/aws-events/test/test.input.ts b/packages/@aws-cdk/aws-events/test/test.input.ts
index 9094e02a5b86b..49c38f63ac1e8 100644
--- a/packages/@aws-cdk/aws-events/test/test.input.ts
+++ b/packages/@aws-cdk/aws-events/test/test.input.ts
@@ -156,7 +156,7 @@ export = {
schedule: Schedule.rate(cdk.Duration.minutes(1)),
});
- const world = cdk.Lazy.stringValue({ produce: () => 'world' });
+ const world = cdk.Lazy.string({ produce: () => 'world' });
// WHEN
rule.addTarget(new SomeTarget(RuleTargetInput.fromText(`hello ${world}`)));
diff --git a/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts b/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts
index f7c1b565af434..a2532aecdffa0 100644
--- a/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts
+++ b/packages/@aws-cdk/aws-globalaccelerator/lib/endpoint-group.ts
@@ -169,7 +169,7 @@ export class EndpointGroup extends cdk.Resource implements IEndpointGroup {
const resource = new ga.CfnEndpointGroup(this, 'Resource', {
listenerArn: props.listener.listenerArn,
endpointGroupRegion: props.region ?? cdk.Stack.of(this).region,
- endpointConfigurations: cdk.Lazy.anyValue({ produce: () => this.renderEndpoints() }, { omitEmptyArray: true }),
+ endpointConfigurations: cdk.Lazy.any({ produce: () => this.renderEndpoints() }, { omitEmptyArray: true }),
});
this.endpointGroupArn = resource.attrEndpointGroupArn;
diff --git a/packages/@aws-cdk/aws-iam/lib/group.ts b/packages/@aws-cdk/aws-iam/lib/group.ts
index 6fc5963fdbeeb..eca266f6975dd 100644
--- a/packages/@aws-cdk/aws-iam/lib/group.ts
+++ b/packages/@aws-cdk/aws-iam/lib/group.ts
@@ -170,7 +170,7 @@ export class Group extends GroupBase {
const group = new CfnGroup(this, 'Resource', {
groupName: this.physicalName,
- managedPolicyArns: Lazy.listValue({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }),
+ managedPolicyArns: Lazy.list({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }),
path: props.path,
});
diff --git a/packages/@aws-cdk/aws-iam/lib/managed-policy.ts b/packages/@aws-cdk/aws-iam/lib/managed-policy.ts
index 8393f71f58a0d..cc8bddc0e8a17 100644
--- a/packages/@aws-cdk/aws-iam/lib/managed-policy.ts
+++ b/packages/@aws-cdk/aws-iam/lib/managed-policy.ts
@@ -156,7 +156,7 @@ export class ManagedPolicy extends Resource implements IManagedPolicy {
*/
public static fromAwsManagedPolicyName(managedPolicyName: string): IManagedPolicy {
class AwsManagedPolicy implements IManagedPolicy {
- public readonly managedPolicyArn = Lazy.stringValue({
+ public readonly managedPolicyArn = Lazy.uncachedString({
produce(ctx: IResolveContext) {
return Stack.of(ctx.scope).formatArn({
service: 'iam',
diff --git a/packages/@aws-cdk/aws-iam/lib/policy.ts b/packages/@aws-cdk/aws-iam/lib/policy.ts
index 45cd1fb138927..6c006c6576120 100644
--- a/packages/@aws-cdk/aws-iam/lib/policy.ts
+++ b/packages/@aws-cdk/aws-iam/lib/policy.ts
@@ -131,7 +131,7 @@ export class Policy extends Resource implements IPolicy {
// generatePolicyName will take the last 128 characters of the logical id since
// policy names are limited to 128. the last 8 chars are a stack-unique hash, so
// that shouod be sufficient to ensure uniqueness within a principal.
- Lazy.stringValue({ produce: () => generatePolicyName(scope, resource.logicalId) }),
+ Lazy.string({ produce: () => generatePolicyName(scope, resource.logicalId) }),
});
const self = this;
diff --git a/packages/@aws-cdk/aws-iam/lib/role.ts b/packages/@aws-cdk/aws-iam/lib/role.ts
index 3a11bd7fae2d9..74e251bd7bc07 100644
--- a/packages/@aws-cdk/aws-iam/lib/role.ts
+++ b/packages/@aws-cdk/aws-iam/lib/role.ts
@@ -326,7 +326,7 @@ export class Role extends Resource implements IRole {
const role = new CfnRole(this, 'Resource', {
assumeRolePolicyDocument: this.assumeRolePolicy as any,
- managedPolicyArns: Lazy.listValue({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }),
+ managedPolicyArns: Lazy.list({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }),
policies: _flatten(this.inlinePolicies),
path: props.path,
permissionsBoundary: this.permissionsBoundary ? this.permissionsBoundary.managedPolicyArn : undefined,
diff --git a/packages/@aws-cdk/aws-iam/lib/user.ts b/packages/@aws-cdk/aws-iam/lib/user.ts
index c6c0799d2bc8d..a8c3b61443771 100644
--- a/packages/@aws-cdk/aws-iam/lib/user.ts
+++ b/packages/@aws-cdk/aws-iam/lib/user.ts
@@ -217,7 +217,7 @@ export class User extends Resource implements IIdentity, IUser {
const user = new CfnUser(this, 'Resource', {
userName: this.physicalName,
groups: undefinedIfEmpty(() => this.groups),
- managedPolicyArns: Lazy.listValue({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }),
+ managedPolicyArns: Lazy.list({ produce: () => this.managedPolicies.map(p => p.managedPolicyArn) }, { omitEmpty: true }),
path: props.path,
permissionsBoundary: this.permissionsBoundary ? this.permissionsBoundary.managedPolicyArn : undefined,
loginProfile: this.parseLoginProfile(props),
diff --git a/packages/@aws-cdk/aws-iam/lib/util.ts b/packages/@aws-cdk/aws-iam/lib/util.ts
index 545d5bc9de439..b5f1700baefe7 100644
--- a/packages/@aws-cdk/aws-iam/lib/util.ts
+++ b/packages/@aws-cdk/aws-iam/lib/util.ts
@@ -5,7 +5,7 @@ import { IPolicy } from './policy';
const MAX_POLICY_NAME_LEN = 128;
export function undefinedIfEmpty(f: () => string[]): string[] {
- return Lazy.listValue({
+ return Lazy.list({
produce: () => {
const array = f();
return (array && array.length > 0) ? array : undefined;
diff --git a/packages/@aws-cdk/aws-iam/test/cross-account.test.ts b/packages/@aws-cdk/aws-iam/test/cross-account.test.ts
index f3e8a7769d6cf..c3a45ec730580 100644
--- a/packages/@aws-cdk/aws-iam/test/cross-account.test.ts
+++ b/packages/@aws-cdk/aws-iam/test/cross-account.test.ts
@@ -170,7 +170,7 @@ class FakeResource extends cdk.Resource implements iam.IResourceWithPolicy {
new cdk.CfnResource(this, 'Default', {
type: 'Test::Fake::Resource',
properties: {
- ResourcePolicy: cdk.Lazy.anyValue({ produce: () => this.policy }),
+ ResourcePolicy: cdk.Lazy.any({ produce: () => this.policy }),
},
});
}
diff --git a/packages/@aws-cdk/aws-iam/test/policy-document.test.ts b/packages/@aws-cdk/aws-iam/test/policy-document.test.ts
index 9ce8b5f9ec6c8..d8a9b1337c21c 100644
--- a/packages/@aws-cdk/aws-iam/test/policy-document.test.ts
+++ b/packages/@aws-cdk/aws-iam/test/policy-document.test.ts
@@ -311,8 +311,8 @@ describe('IAM policy document', () => {
const stack = new Stack();
const statement = new PolicyStatement();
- statement.addActions(...Lazy.listValue({ produce: () => ['a', 'b', 'c'] }));
- statement.addResources(...Lazy.listValue({ produce: () => ['x', 'y', 'z'] }));
+ statement.addActions(...Lazy.list({ produce: () => ['a', 'b', 'c'] }));
+ statement.addResources(...Lazy.list({ produce: () => ['x', 'y', 'z'] }));
expect(stack.resolve(statement.toStatementJson())).toEqual({
Effect: 'Allow',
@@ -558,7 +558,7 @@ describe('IAM policy document', () => {
// WHEN
const p = new ArnPrincipal('arn:of:principal').withConditions({
- StringEquals: Lazy.anyValue({ produce: () => ({ goo: 'zar' }) }),
+ StringEquals: Lazy.any({ produce: () => ({ goo: 'zar' }) }),
});
statement.addPrincipals(p);
@@ -582,7 +582,7 @@ describe('IAM policy document', () => {
const p = new FederatedPrincipal('fed', {
StringEquals: { foo: 'bar' },
}).withConditions({
- StringEquals: Lazy.anyValue({ produce: () => ({ goo: 'zar' }) }),
+ StringEquals: Lazy.any({ produce: () => ({ goo: 'zar' }) }),
});
const statement = new PolicyStatement();
@@ -644,12 +644,12 @@ describe('IAM policy document', () => {
const p = new PolicyDocument();
const statement1 = new PolicyStatement();
- statement1.addResources(Lazy.stringValue({ produce: () => 'resource' }));
- statement1.addActions(Lazy.stringValue({ produce: () => 'action' }));
+ statement1.addResources(Lazy.string({ produce: () => 'resource' }));
+ statement1.addActions(Lazy.string({ produce: () => 'action' }));
const statement2 = new PolicyStatement();
- statement2.addResources(Lazy.stringValue({ produce: () => 'resource' }));
- statement2.addActions(Lazy.stringValue({ produce: () => 'action' }));
+ statement2.addResources(Lazy.string({ produce: () => 'resource' }));
+ statement2.addActions(Lazy.string({ produce: () => 'action' }));
// WHEN
p.addStatements(statement1);
diff --git a/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts b/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts
index a5044fa6722d2..afe6fb576f298 100644
--- a/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts
+++ b/packages/@aws-cdk/aws-iam/test/role.from-role-arn.test.ts
@@ -305,7 +305,7 @@ describe('IAM Role.fromRoleArn', () => {
});
describe('imported with a dynamic ARN', () => {
- const dynamicValue = Lazy.stringValue({ produce: () => 'role-arn' });
+ const dynamicValue = Lazy.string({ produce: () => 'role-arn' });
const roleName: any = {
'Fn::Select': [1,
{
diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts b/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts
index b8791c99017ec..76e437de0ae34 100644
--- a/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts
+++ b/packages/@aws-cdk/aws-lambda-event-sources/test/test.kinesis.ts
@@ -144,7 +144,7 @@ export = {
// WHEN
fn.addEventSource(new sources.KinesisEventSource(stream, {
- batchSize: cdk.Lazy.numberValue({ produce: () => 10 }),
+ batchSize: cdk.Lazy.number({ produce: () => 10 }),
startingPosition: lambda.StartingPosition.LATEST,
}));
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts
index 0ee96aa53f74c..afc370fcb200c 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts
+++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/util.ts
@@ -92,7 +92,10 @@ export function exec(cmd: string, args: string[], options?: SpawnSyncOptions) {
}
/**
- * Extract dependencies from a package.json
+ * Extract versions for a list of modules.
+ *
+ * First lookup the version in the package.json and then fallback to requiring
+ * the module's package.json. The fallback is needed for transitive dependencies.
*/
export function extractDependencies(pkgPath: string, modules: string[]): { [key: string]: string } {
const dependencies: { [key: string]: string } = {};
@@ -107,10 +110,13 @@ export function extractDependencies(pkgPath: string, modules: string[]): { [key:
};
for (const mod of modules) {
- if (!pkgDependencies[mod]) {
- throw new Error(`Cannot extract version for module '${mod}' in package.json`);
+ try {
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
+ const version = pkgDependencies[mod] ?? require(`${mod}/package.json`).version;
+ dependencies[mod] = version;
+ } catch (err) {
+ throw new Error(`Cannot extract version for module '${mod}'. Check that it's referenced in your package.json or installed.`);
}
- dependencies[mod] = pkgDependencies[mod];
}
return dependencies;
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts
index e807997df749c..6319008d9f2ec 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts
@@ -89,13 +89,24 @@ describe('exec', () => {
});
describe('extractDependencies', () => {
- test('with depencies referenced in package.json', () => {
- expect(extractDependencies(
+ test('with dependencies referenced in package.json', () => {
+ const deps = extractDependencies(
path.join(__dirname, '../package.json'),
['@aws-cdk/aws-lambda', '@aws-cdk/core'],
+ );
+ expect(Object.keys(deps)).toEqual([
+ '@aws-cdk/aws-lambda',
+ '@aws-cdk/core',
+ ]);
+ });
+
+ test('with transitive dependencies', () => {
+ expect(extractDependencies(
+ path.join(__dirname, '../package.json'),
+ ['typescript'],
)).toEqual({
- '@aws-cdk/aws-lambda': '0.0.0',
- '@aws-cdk/core': '0.0.0',
+ // eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies
+ typescript: require('typescript/package.json').version,
});
});
@@ -103,7 +114,7 @@ describe('extractDependencies', () => {
expect(() => extractDependencies(
path.join(__dirname, '../package.json'),
['unknown'],
- )).toThrow(/Cannot extract version for module 'unknown' in package.json/);
+ )).toThrow(/Cannot extract version for module 'unknown'/);
});
});
diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts
index e2d81c064c894..d2000fd32d342 100644
--- a/packages/@aws-cdk/aws-lambda/lib/function.ts
+++ b/packages/@aws-cdk/aws-lambda/lib/function.ts
@@ -348,8 +348,8 @@ export class Function extends FunctionBase {
const cfn = this._currentVersion.node.defaultChild as CfnResource;
const originalLogicalId = this.stack.resolve(cfn.logicalId) as string;
- cfn.overrideLogicalId(Lazy.stringValue({
- produce: _ => {
+ cfn.overrideLogicalId(Lazy.uncachedString({
+ produce: () => {
const hash = calculateFunctionHash(this);
const logicalId = trimFromStart(originalLogicalId, 255 - 32);
return `${logicalId}${hash}`;
@@ -599,12 +599,14 @@ export class Function extends FunctionBase {
s3ObjectVersion: code.s3Location && code.s3Location.objectVersion,
zipFile: code.inlineCode,
},
- layers: Lazy.listValue({ produce: () => this.layers.map(layer => layer.layerVersionArn) }, { omitEmpty: true }),
+ layers: Lazy.list({ produce: () => this.layers.map(layer => layer.layerVersionArn) }, { omitEmpty: true }),
handler: props.handler,
timeout: props.timeout && props.timeout.toSeconds(),
runtime: props.runtime.name,
role: this.role.roleArn,
- environment: Lazy.anyValue({ produce: () => this.renderEnvironment() }),
+ // Uncached because calling '_checkEdgeCompatibility', which gets called in the resolve of another
+ // Token, actually *modifies* the 'environment' map.
+ environment: Lazy.uncachedAny({ produce: () => this.renderEnvironment() }),
memorySize: props.memorySize,
vpcConfig: this.configureVpc(props),
deadLetterConfig: this.buildDeadLetterConfig(this.deadLetterQueue),
diff --git a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts
index 2156b2d87cfb5..b51d866ac815d 100644
--- a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts
+++ b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts
@@ -251,7 +251,7 @@ export class Version extends QualifiedFunctionBase implements IVersion {
// Check compatibility at synthesis. It could be that the version was associated
// with a CloudFront distribution first and made incompatible afterwards.
- return Lazy.stringValue({
+ return Lazy.string({
produce: () => {
// Validate that the underlying function can be used for Lambda@Edge
if (this.lambda instanceof Function) {
diff --git a/packages/@aws-cdk/aws-lambda/test/alias.test.ts b/packages/@aws-cdk/aws-lambda/test/alias.test.ts
index 334e40607ed5c..1f25aa1a6a823 100644
--- a/packages/@aws-cdk/aws-lambda/test/alias.test.ts
+++ b/packages/@aws-cdk/aws-lambda/test/alias.test.ts
@@ -499,7 +499,7 @@ describe('alias', () => {
// WHEN
const target = alias.addAutoScaling({ maxCapacity: 5 });
- target.scaleOnUtilization({ utilizationTarget: Lazy.numberValue({ produce: () => 0.95 }) });
+ target.scaleOnUtilization({ utilizationTarget: Lazy.number({ produce: () => 0.95 }) });
// THEN: no exception
expect(stack).toHaveResource('AWS::ApplicationAutoScaling::ScalingPolicy', {
diff --git a/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts b/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts
index 78c11922bf183..be42067f263f1 100644
--- a/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts
+++ b/packages/@aws-cdk/aws-lambda/test/event-source-mapping.test.ts
@@ -89,7 +89,7 @@ describe('event source mapping', () => {
new EventSourceMapping(stack, 'test', {
target: fn,
eventSourceArn: '',
- retryAttempts: cdk.Lazy.numberValue({ produce: () => 100 }),
+ retryAttempts: cdk.Lazy.number({ produce: () => 100 }),
});
});
@@ -134,7 +134,7 @@ describe('event source mapping', () => {
new EventSourceMapping(stack, 'test', {
target: fn,
eventSourceArn: '',
- parallelizationFactor: cdk.Lazy.numberValue({ produce: () => 20 }),
+ parallelizationFactor: cdk.Lazy.number({ produce: () => 20 }),
});
});
diff --git a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts
index 0f428fb03bc77..f9dfefdfed9f6 100644
--- a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts
+++ b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts
@@ -69,7 +69,7 @@ export class CrossAccountDestination extends cdk.Resource implements ILogSubscri
super(scope, id, {
physicalName: props.destinationName ||
// In the underlying model, the name is not optional, but we make it so anyway.
- cdk.Lazy.stringValue({ produce: () => this.generateUniqueName() }),
+ cdk.Lazy.string({ produce: () => this.generateUniqueName() }),
});
this.resource = new CfnDestination(this, 'Resource', {
@@ -109,7 +109,7 @@ export class CrossAccountDestination extends cdk.Resource implements ILogSubscri
* Return a stringified JSON version of the PolicyDocument
*/
private lazyStringifiedPolicyDocument(): string {
- return cdk.Lazy.stringValue({
+ return cdk.Lazy.string({
produce: () =>
this.policyDocument.isEmpty ? '' : cdk.Stack.of(this).toJsonString(this.policyDocument),
});
diff --git a/packages/@aws-cdk/aws-rds/lib/instance.ts b/packages/@aws-cdk/aws-rds/lib/instance.ts
index 392c75ef3564c..feb44facab4d2 100644
--- a/packages/@aws-cdk/aws-rds/lib/instance.ts
+++ b/packages/@aws-cdk/aws-rds/lib/instance.ts
@@ -643,7 +643,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData
this.connections = new ec2.Connections({
securityGroups,
- defaultPort: ec2.Port.tcp(Lazy.numberValue({ produce: () => this.instanceEndpoint.port })),
+ defaultPort: ec2.Port.tcp(Lazy.number({ produce: () => this.instanceEndpoint.port })),
});
let monitoringRole;
@@ -683,13 +683,13 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData
availabilityZone: props.multiAz ? undefined : props.availabilityZone,
backupRetentionPeriod: props.backupRetention ? props.backupRetention.toDays() : undefined,
copyTagsToSnapshot: props.copyTagsToSnapshot !== undefined ? props.copyTagsToSnapshot : true,
- dbInstanceClass: Lazy.stringValue({ produce: () => `db.${this.instanceType}` }),
+ dbInstanceClass: Lazy.string({ produce: () => `db.${this.instanceType}` }),
dbInstanceIdentifier: props.instanceIdentifier,
dbSubnetGroupName: subnetGroup.subnetGroupName,
deleteAutomatedBackups: props.deleteAutomatedBackups,
deletionProtection: defaultDeletionProtection(props.deletionProtection, props.removalPolicy),
enableCloudwatchLogsExports: this.cloudwatchLogsExports,
- enableIamDatabaseAuthentication: Lazy.anyValue({ produce: () => this.enableIamAuthentication }),
+ enableIamDatabaseAuthentication: Lazy.any({ produce: () => this.enableIamAuthentication }),
enablePerformanceInsights: enablePerformanceInsights || props.enablePerformanceInsights, // fall back to undefined if not set,
iops,
monitoringInterval: props.monitoringInterval && props.monitoringInterval.toSeconds(),
diff --git a/packages/@aws-cdk/aws-rds/lib/option-group.ts b/packages/@aws-cdk/aws-rds/lib/option-group.ts
index 7e29fe7495e3a..91dad4f8caffa 100644
--- a/packages/@aws-cdk/aws-rds/lib/option-group.ts
+++ b/packages/@aws-cdk/aws-rds/lib/option-group.ts
@@ -135,7 +135,7 @@ export class OptionGroup extends Resource implements IOptionGroup {
engineName: props.engine.engineType,
majorEngineVersion,
optionGroupDescription: props.description || `Option group for ${props.engine.engineType} ${majorEngineVersion}`,
- optionConfigurations: Lazy.anyValue({ produce: () => this.renderConfigurations(this.configurations) }),
+ optionConfigurations: Lazy.any({ produce: () => this.renderConfigurations(this.configurations) }),
});
this.optionGroupName = optionGroup.ref;
diff --git a/packages/@aws-cdk/aws-rds/lib/parameter-group.ts b/packages/@aws-cdk/aws-rds/lib/parameter-group.ts
index 23647b921efd8..0a1971c3ac843 100644
--- a/packages/@aws-cdk/aws-rds/lib/parameter-group.ts
+++ b/packages/@aws-cdk/aws-rds/lib/parameter-group.ts
@@ -139,7 +139,7 @@ export class ParameterGroup extends Resource implements IParameterGroup {
this.clusterCfnGroup = new CfnDBClusterParameterGroup(this, id, {
description: this.description || `Cluster parameter group for ${this.family}`,
family: this.family,
- parameters: Lazy.anyValue({ produce: () => this.parameters }),
+ parameters: Lazy.any({ produce: () => this.parameters }),
});
}
return {
@@ -153,7 +153,7 @@ export class ParameterGroup extends Resource implements IParameterGroup {
this.instanceCfnGroup = new CfnDBParameterGroup(this, id, {
description: this.description || `Parameter group for ${this.family}`,
family: this.family,
- parameters: Lazy.anyValue({ produce: () => this.parameters }),
+ parameters: Lazy.any({ produce: () => this.parameters }),
});
}
return {
diff --git a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts
index b489ffdcb3584..f11e9ae180e7f 100644
--- a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts
+++ b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts
@@ -157,7 +157,7 @@ export class HostedZone extends Resource implements IHostedZone {
name: props.zoneName + '.',
hostedZoneConfig: props.comment ? { comment: props.comment } : undefined,
queryLoggingConfig: props.queryLogsLogGroupArn ? { cloudWatchLogsLogGroupArn: props.queryLogsLogGroupArn } : undefined,
- vpcs: Lazy.anyValue({ produce: () => this.vpcs.length === 0 ? undefined : this.vpcs }),
+ vpcs: Lazy.any({ produce: () => this.vpcs.length === 0 ? undefined : this.vpcs }),
});
this.hostedZoneId = resource.ref;
diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts
index f1752cc402b5e..305674a847a15 100644
--- a/packages/@aws-cdk/aws-s3/lib/bucket.ts
+++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts
@@ -1246,14 +1246,14 @@ export class Bucket extends BucketBase {
bucketName: this.physicalName,
bucketEncryption,
versioningConfiguration: props.versioned ? { status: 'Enabled' } : undefined,
- lifecycleConfiguration: Lazy.anyValue({ produce: () => this.parseLifecycleConfiguration() }),
+ lifecycleConfiguration: Lazy.any({ produce: () => this.parseLifecycleConfiguration() }),
websiteConfiguration,
publicAccessBlockConfiguration: props.blockPublicAccess,
- metricsConfigurations: Lazy.anyValue({ produce: () => this.parseMetricConfiguration() }),
- corsConfiguration: Lazy.anyValue({ produce: () => this.parseCorsConfiguration() }),
- accessControl: Lazy.stringValue({ produce: () => this.accessControl }),
+ metricsConfigurations: Lazy.any({ produce: () => this.parseMetricConfiguration() }),
+ corsConfiguration: Lazy.any({ produce: () => this.parseCorsConfiguration() }),
+ accessControl: Lazy.string({ produce: () => this.accessControl }),
loggingConfiguration: this.parseServerAccessLogs(props),
- inventoryConfigurations: Lazy.anyValue({ produce: () => this.parseInventoryConfiguration() }),
+ inventoryConfigurations: Lazy.any({ produce: () => this.parseInventoryConfiguration() }),
});
resource.applyRemovalPolicy(props.removalPolicy);
diff --git a/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts b/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts
index e1cf34982a3c9..91bb688b28857 100644
--- a/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts
+++ b/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.ts
@@ -107,7 +107,7 @@ export class BucketNotifications extends cdk.Construct {
properties: {
ServiceToken: handlerArn,
BucketName: this.bucket.bucketName,
- NotificationConfiguration: cdk.Lazy.anyValue({ produce: () => this.renderNotificationConfiguration() }),
+ NotificationConfiguration: cdk.Lazy.any({ produce: () => this.renderNotificationConfiguration() }),
},
});
}
diff --git a/packages/@aws-cdk/aws-s3/test/bucket.test.ts b/packages/@aws-cdk/aws-s3/test/bucket.test.ts
index 275f4bc6aa822..900a33852beef 100644
--- a/packages/@aws-cdk/aws-s3/test/bucket.test.ts
+++ b/packages/@aws-cdk/aws-s3/test/bucket.test.ts
@@ -107,7 +107,7 @@ nodeunitShim({
const stack = new cdk.Stack();
test.doesNotThrow(() => new s3.Bucket(stack, 'MyBucket', {
- bucketName: cdk.Lazy.stringValue({ produce: () => '_BUCKET' }),
+ bucketName: cdk.Lazy.string({ produce: () => '_BUCKET' }),
}));
test.done();
diff --git a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts
index 714411640e83c..72c056d913693 100644
--- a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts
+++ b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts
@@ -126,7 +126,7 @@ export class ReceiptRule extends Resource implements IReceiptRule {
const resource = new CfnReceiptRule(this, 'Resource', {
after: props.after ? props.after.receiptRuleName : undefined,
rule: {
- actions: Lazy.anyValue({ produce: () => this.renderActions() }),
+ actions: Lazy.any({ produce: () => this.renderActions() }),
enabled: props.enabled === undefined ? true : props.enabled,
name: this.physicalName,
recipients: props.recipients,
diff --git a/packages/@aws-cdk/aws-ssm/test/test.parameter.ts b/packages/@aws-cdk/aws-ssm/test/test.parameter.ts
index cf7a43f3f3c2b..9734ddb4fdd9a 100644
--- a/packages/@aws-cdk/aws-ssm/test/test.parameter.ts
+++ b/packages/@aws-cdk/aws-ssm/test/test.parameter.ts
@@ -69,7 +69,7 @@ export = {
test.doesNotThrow(() => {
new ssm.StringParameter(stack, 'Parameter', {
allowedPattern: '^Bar$',
- stringValue: cdk.Lazy.stringValue({ produce: () => 'Foo!' }),
+ stringValue: cdk.Lazy.string({ produce: () => 'Foo!' }),
});
});
test.done();
@@ -239,7 +239,7 @@ export = {
// THEN
test.doesNotThrow(() => new ssm.StringListParameter(stack, 'Parameter', {
allowedPattern: '^(Foo|Bar)$',
- stringListValue: ['Foo', cdk.Lazy.stringValue({ produce: () => 'Baz!' })],
+ stringListValue: ['Foo', cdk.Lazy.string({ produce: () => 'Baz!' })],
}));
test.done();
},
diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts
index 12d1c71665577..d2f280d8d0c1e 100644
--- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts
+++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-task-base.ts
@@ -136,7 +136,7 @@ export class EcsRunTaskBase implements ec2.IConnectable, sfn.IStepFunctionsTask
AwsvpcConfiguration: {
AssignPublicIp: assignPublicIp !== undefined ? (assignPublicIp ? 'ENABLED' : 'DISABLED') : undefined,
Subnets: vpc.selectSubnets(subnetSelection).subnetIds,
- SecurityGroups: cdk.Lazy.listValue({ produce: () => [this.securityGroup!.securityGroupId] }),
+ SecurityGroups: cdk.Lazy.list({ produce: () => [this.securityGroup!.securityGroupId] }),
},
};
}
@@ -156,7 +156,7 @@ export class EcsRunTaskBase implements ec2.IConnectable, sfn.IStepFunctionsTask
}),
new iam.PolicyStatement({
actions: ['iam:PassRole'],
- resources: cdk.Lazy.listValue({ produce: () => this.taskExecutionRoles().map(r => r.roleArn) }),
+ resources: cdk.Lazy.list({ produce: () => this.taskExecutionRoles().map(r => r.roleArn) }),
}),
];
diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts
index 38f54c2c0c8fe..f80252cbb05f8 100644
--- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts
+++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-task.ts
@@ -294,7 +294,7 @@ export class EcsRunTask extends sfn.TaskStateBase implements ec2.IConnectable {
AwsvpcConfiguration: {
AssignPublicIp: this.props.assignPublicIp ? (this.props.assignPublicIp ? 'ENABLED' : 'DISABLED') : undefined,
Subnets: this.props.cluster.vpc.selectSubnets(subnetSelection).subnetIds,
- SecurityGroups: cdk.Lazy.listValue({ produce: () => this.securityGroups?.map(sg => sg.securityGroupId) }),
+ SecurityGroups: cdk.Lazy.list({ produce: () => this.securityGroups?.map(sg => sg.securityGroupId) }),
},
};
diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts
index 7b73afd355e3a..ee82cc6f69818 100644
--- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts
+++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-model.ts
@@ -229,7 +229,7 @@ export class SageMakerCreateModel extends sfn.TaskStateBase implements iam.IGran
return this.vpc
? {
VpcConfig: {
- SecurityGroupIds: cdk.Lazy.listValue({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }),
+ SecurityGroupIds: cdk.Lazy.list({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }),
Subnets: this.subnets,
},
}
diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts
index a6f925181e38e..e063378bf3eb2 100644
--- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts
+++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts
@@ -302,7 +302,7 @@ export class SageMakerCreateTrainingJob extends sfn.TaskStateBase implements iam
return config
? {
VpcConfig: {
- SecurityGroupIds: Lazy.listValue({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }),
+ SecurityGroupIds: Lazy.list({ produce: () => this.securityGroups.map((sg) => sg.securityGroupId) }),
Subnets: this.subnets,
},
}
diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts
index 601479fbed0e4..2d5d423a930b7 100644
--- a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts
+++ b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts
@@ -59,7 +59,7 @@ export class Activity extends Resource implements IActivity {
constructor(scope: Construct, id: string, props: ActivityProps = {}) {
super(scope, id, {
physicalName: props.activityName ||
- Lazy.stringValue({ produce: () => this.generateName() }),
+ Lazy.string({ produce: () => this.generateName() }),
});
const resource = new CfnActivity(this, 'Resource', {
diff --git a/packages/@aws-cdk/aws-synthetics/lib/canary.ts b/packages/@aws-cdk/aws-synthetics/lib/canary.ts
index f2bbb1407d76a..bee1d24e8cf11 100644
--- a/packages/@aws-cdk/aws-synthetics/lib/canary.ts
+++ b/packages/@aws-cdk/aws-synthetics/lib/canary.ts
@@ -243,7 +243,7 @@ export class Canary extends cdk.Resource {
}
super(scope, id, {
- physicalName: props.canaryName || cdk.Lazy.stringValue({
+ physicalName: props.canaryName || cdk.Lazy.string({
produce: () => this.generateUniqueName(),
}),
});
diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.test.ts b/packages/@aws-cdk/aws-synthetics/test/canary.test.ts
index 8fd9805bb04d4..d4a505e3a492b 100644
--- a/packages/@aws-cdk/aws-synthetics/test/canary.test.ts
+++ b/packages/@aws-cdk/aws-synthetics/test/canary.test.ts
@@ -59,7 +59,7 @@ test('Name validation does not fail when using Tokens', () => {
// WHEN
new synthetics.Canary(stack, 'Canary', {
- canaryName: Lazy.stringValue({ produce: () => 'My Canary' }),
+ canaryName: Lazy.string({ produce: () => 'My Canary' }),
test: synthetics.Test.custom({
handler: 'index.handler',
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md
index 8a871d71fe7ce..217f5b27025d8 100644
--- a/packages/@aws-cdk/cfnspec/CHANGELOG.md
+++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md
@@ -1,3 +1,86 @@
+# CloudFormation Resource Specification v20.3.0
+
+## New Resource Types
+
+* AWS::DataBrew::Dataset
+* AWS::DataBrew::Job
+* AWS::DataBrew::Project
+* AWS::DataBrew::Recipe
+* AWS::DataBrew::Schedule
+
+## Attribute Changes
+
+* AWS::ElasticLoadBalancingV2::Listener ListenerArn (__added__)
+
+## Property Changes
+
+* AWS::CodeStar::GitHubRepository ConnectionArn (__added__)
+* AWS::CodeStar::GitHubRepository RepositoryAccessToken.Required (__changed__)
+ * Old: true
+ * New: false
+* AWS::DMS::ReplicationInstance AvailabilityZone.UpdateType (__changed__)
+ * Old: Immutable
+ * New: Mutable
+* AWS::EC2::ClientVpnEndpoint ClientConnectOptions (__added__)
+* AWS::EC2::VPCEndpointService GatewayLoadBalancerArns (__added__)
+* AWS::ElasticLoadBalancingV2::Listener AlpnPolicy.DuplicatesAllowed (__deleted__)
+* AWS::Lambda::EventSourceMapping PartialBatchResponse (__added__)
+* AWS::Lambda::EventSourceMapping TumblingWindowInSeconds (__added__)
+
+## Property Type Changes
+
+* AWS::AppMesh::VirtualGateway.VirtualGatewayConnectionPool (__added__)
+* AWS::AppMesh::VirtualGateway.VirtualGatewayGrpcConnectionPool (__added__)
+* AWS::AppMesh::VirtualGateway.VirtualGatewayHttp2ConnectionPool (__added__)
+* AWS::AppMesh::VirtualGateway.VirtualGatewayHttpConnectionPool (__added__)
+* AWS::AppMesh::VirtualNode.OutlierDetection (__added__)
+* AWS::AppMesh::VirtualNode.VirtualNodeConnectionPool (__added__)
+* AWS::AppMesh::VirtualNode.VirtualNodeGrpcConnectionPool (__added__)
+* AWS::AppMesh::VirtualNode.VirtualNodeHttp2ConnectionPool (__added__)
+* AWS::AppMesh::VirtualNode.VirtualNodeHttpConnectionPool (__added__)
+* AWS::AppMesh::VirtualNode.VirtualNodeTcpConnectionPool (__added__)
+* AWS::EC2::ClientVpnEndpoint.ClientConnectOptions (__added__)
+* AWS::AppFlow::ConnectorProfile.SalesforceConnectorProfileCredentials ClientCredentialsArn (__added__)
+* AWS::AppMesh::VirtualGateway.VirtualGatewayListener ConnectionPool (__added__)
+* AWS::AppMesh::VirtualNode.Listener ConnectionPool (__added__)
+* AWS::AppMesh::VirtualNode.Listener OutlierDetection (__added__)
+* AWS::ElasticLoadBalancingV2::Listener.Action AuthenticateCognitoConfig.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig
+* AWS::ElasticLoadBalancingV2::Listener.Action AuthenticateOidcConfig.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig
+* AWS::ElasticLoadBalancingV2::Listener.Action FixedResponseConfig.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig
+* AWS::ElasticLoadBalancingV2::Listener.Action ForwardConfig.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig
+* AWS::ElasticLoadBalancingV2::Listener.Action Order.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-order
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-order
+* AWS::ElasticLoadBalancingV2::Listener.Action RedirectConfig.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig
+* AWS::ElasticLoadBalancingV2::Listener.Action TargetGroupArn.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-targetgrouparn
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-targetgrouparn
+* AWS::ElasticLoadBalancingV2::Listener.Action Type.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-type
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-type
+* AWS::ElasticLoadBalancingV2::Listener.AuthenticateCognitoConfig AuthenticationRequestExtraParams.DuplicatesAllowed (__deleted__)
+* AWS::ElasticLoadBalancingV2::Listener.AuthenticateCognitoConfig SessionTimeout.PrimitiveType (__changed__)
+ * Old: Long
+ * New: String
+* AWS::ElasticLoadBalancingV2::Listener.AuthenticateOidcConfig AuthenticationRequestExtraParams.DuplicatesAllowed (__deleted__)
+* AWS::ElasticLoadBalancingV2::Listener.AuthenticateOidcConfig SessionTimeout.PrimitiveType (__changed__)
+ * Old: Long
+ * New: String
+* AWS::ElasticLoadBalancingV2::Listener.Certificate CertificateArn.Documentation (__changed__)
+ * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html#cfn-elasticloadbalancingv2-listener-certificates-certificatearn
+ * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html#cfn-elasticloadbalancingv2-listener-certificate-certificatearn
+
+
# CloudFormation Resource Specification v20.2.0
## New Resource Types
diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version
index 86d4688d0910a..4adfbc353177e 100644
--- a/packages/@aws-cdk/cfnspec/cfn.version
+++ b/packages/@aws-cdk/cfnspec/cfn.version
@@ -1 +1 @@
-20.2.0
+20.3.0
diff --git a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json
index e9a8d24f35f4f..0d142fe207d30 100644
--- a/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json
+++ b/packages/@aws-cdk/cfnspec/spec-source/000_CloudFormationResourceSpecification.json
@@ -2288,6 +2288,12 @@
"Required": false,
"UpdateType": "Mutable"
},
+ "ClientCredentialsArn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-salesforceconnectorprofilecredentials.html#cfn-appflow-connectorprofile-salesforceconnectorprofilecredentials-clientcredentialsarn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
"ConnectorOAuthRequest": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-salesforceconnectorprofilecredentials.html#cfn-appflow-connectorprofile-salesforceconnectorprofilecredentials-connectoroauthrequest",
"Required": false,
@@ -3950,6 +3956,29 @@
}
}
},
+ "AWS::AppMesh::VirtualGateway.VirtualGatewayConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html",
+ "Properties": {
+ "GRPC": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayconnectionpool-grpc",
+ "Required": false,
+ "Type": "VirtualGatewayGrpcConnectionPool",
+ "UpdateType": "Mutable"
+ },
+ "HTTP": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayconnectionpool-http",
+ "Required": false,
+ "Type": "VirtualGatewayHttpConnectionPool",
+ "UpdateType": "Mutable"
+ },
+ "HTTP2": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayconnectionpool-http2",
+ "Required": false,
+ "Type": "VirtualGatewayHttp2ConnectionPool",
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::AppMesh::VirtualGateway.VirtualGatewayFileAccessLog": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayfileaccesslog.html",
"Properties": {
@@ -3961,6 +3990,17 @@
}
}
},
+ "AWS::AppMesh::VirtualGateway.VirtualGatewayGrpcConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaygrpcconnectionpool.html",
+ "Properties": {
+ "MaxRequests": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaygrpcconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewaygrpcconnectionpool-maxrequests",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::AppMesh::VirtualGateway.VirtualGatewayHealthCheckPolicy": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhealthcheckpolicy.html",
"Properties": {
@@ -4008,9 +4048,43 @@
}
}
},
+ "AWS::AppMesh::VirtualGateway.VirtualGatewayHttp2ConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttp2connectionpool.html",
+ "Properties": {
+ "MaxRequests": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttp2connectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayhttp2connectionpool-maxrequests",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::AppMesh::VirtualGateway.VirtualGatewayHttpConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttpconnectionpool.html",
+ "Properties": {
+ "MaxConnections": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttpconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayhttpconnectionpool-maxconnections",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "MaxPendingRequests": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayhttpconnectionpool.html#cfn-appmesh-virtualgateway-virtualgatewayhttpconnectionpool-maxpendingrequests",
+ "PrimitiveType": "Integer",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::AppMesh::VirtualGateway.VirtualGatewayListener": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaylistener.html",
"Properties": {
+ "ConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaylistener.html#cfn-appmesh-virtualgateway-virtualgatewaylistener-connectionpool",
+ "Required": false,
+ "Type": "VirtualGatewayConnectionPool",
+ "UpdateType": "Mutable"
+ },
"HealthCheck": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewaylistener.html#cfn-appmesh-virtualgateway-virtualgatewaylistener-healthcheck",
"Required": false,
@@ -4428,12 +4502,24 @@
"AWS::AppMesh::VirtualNode.Listener": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html",
"Properties": {
+ "ConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-connectionpool",
+ "Required": false,
+ "Type": "VirtualNodeConnectionPool",
+ "UpdateType": "Mutable"
+ },
"HealthCheck": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-healthcheck",
"Required": false,
"Type": "HealthCheck",
"UpdateType": "Mutable"
},
+ "OutlierDetection": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-outlierdetection",
+ "Required": false,
+ "Type": "OutlierDetection",
+ "UpdateType": "Mutable"
+ },
"PortMapping": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-listener.html#cfn-appmesh-virtualnode-listener-portmapping",
"Required": true,
@@ -4556,6 +4642,35 @@
}
}
},
+ "AWS::AppMesh::VirtualNode.OutlierDetection": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html",
+ "Properties": {
+ "BaseEjectionDuration": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-baseejectionduration",
+ "Required": true,
+ "Type": "Duration",
+ "UpdateType": "Mutable"
+ },
+ "Interval": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-interval",
+ "Required": true,
+ "Type": "Duration",
+ "UpdateType": "Mutable"
+ },
+ "MaxEjectionPercent": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-maxejectionpercent",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "MaxServerErrors": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-outlierdetection.html#cfn-appmesh-virtualnode-outlierdetection-maxservererrors",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::AppMesh::VirtualNode.PortMapping": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html",
"Properties": {
@@ -4652,6 +4767,74 @@
}
}
},
+ "AWS::AppMesh::VirtualNode.VirtualNodeConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html",
+ "Properties": {
+ "GRPC": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-grpc",
+ "Required": false,
+ "Type": "VirtualNodeGrpcConnectionPool",
+ "UpdateType": "Mutable"
+ },
+ "HTTP": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-http",
+ "Required": false,
+ "Type": "VirtualNodeHttpConnectionPool",
+ "UpdateType": "Mutable"
+ },
+ "HTTP2": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-http2",
+ "Required": false,
+ "Type": "VirtualNodeHttp2ConnectionPool",
+ "UpdateType": "Mutable"
+ },
+ "TCP": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodeconnectionpool.html#cfn-appmesh-virtualnode-virtualnodeconnectionpool-tcp",
+ "Required": false,
+ "Type": "VirtualNodeTcpConnectionPool",
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::AppMesh::VirtualNode.VirtualNodeGrpcConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodegrpcconnectionpool.html",
+ "Properties": {
+ "MaxRequests": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodegrpcconnectionpool.html#cfn-appmesh-virtualnode-virtualnodegrpcconnectionpool-maxrequests",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::AppMesh::VirtualNode.VirtualNodeHttp2ConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttp2connectionpool.html",
+ "Properties": {
+ "MaxRequests": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttp2connectionpool.html#cfn-appmesh-virtualnode-virtualnodehttp2connectionpool-maxrequests",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::AppMesh::VirtualNode.VirtualNodeHttpConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttpconnectionpool.html",
+ "Properties": {
+ "MaxConnections": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttpconnectionpool.html#cfn-appmesh-virtualnode-virtualnodehttpconnectionpool-maxconnections",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "MaxPendingRequests": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodehttpconnectionpool.html#cfn-appmesh-virtualnode-virtualnodehttpconnectionpool-maxpendingrequests",
+ "PrimitiveType": "Integer",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::AppMesh::VirtualNode.VirtualNodeSpec": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodespec.html",
"Properties": {
@@ -4689,6 +4872,17 @@
}
}
},
+ "AWS::AppMesh::VirtualNode.VirtualNodeTcpConnectionPool": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodetcpconnectionpool.html",
+ "Properties": {
+ "MaxConnections": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualnodetcpconnectionpool.html#cfn-appmesh-virtualnode-virtualnodetcpconnectionpool-maxconnections",
+ "PrimitiveType": "Integer",
+ "Required": true,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::AppMesh::VirtualNode.VirtualServiceBackend": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-virtualservicebackend.html",
"Properties": {
@@ -12591,6 +12785,796 @@
}
}
},
+ "AWS::DataBrew::Job.Output": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html",
+ "Properties": {
+ "CompressionFormat": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-compressionformat",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Format": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-format",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Location": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-location",
+ "Required": true,
+ "Type": "S3Location",
+ "UpdateType": "Mutable"
+ },
+ "Overwrite": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-overwrite",
+ "PrimitiveType": "Boolean",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "PartitionColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-output.html#cfn-databrew-job-output-partitioncolumns",
+ "DuplicatesAllowed": false,
+ "PrimitiveItemType": "String",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Job.S3Location": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html",
+ "Properties": {
+ "Bucket": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html#cfn-databrew-job-s3location-bucket",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Key": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html#cfn-databrew-job-s3location-key",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe.Action": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-action.html",
+ "Properties": {
+ "Operation": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-action.html#cfn-databrew-recipe-action-operation",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Parameters": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-action.html#cfn-databrew-recipe-action-parameters",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe.ConditionExpression": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html",
+ "Properties": {
+ "Condition": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-condition",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "TargetColumn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-targetcolumn",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Value": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-value",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe.DataCatalogInputDefinition": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html",
+ "Properties": {
+ "CatalogId": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-catalogid",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "DatabaseName": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-databasename",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TableName": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-tablename",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TempDirectory": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-datacataloginputdefinition.html#cfn-databrew-recipe-datacataloginputdefinition-tempdirectory",
+ "Required": false,
+ "Type": "S3Location",
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe.RecipeParameters": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html",
+ "Properties": {
+ "AggregateFunction": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-aggregatefunction",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Base": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-base",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "CaseStatement": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-casestatement",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "CategoryMap": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-categorymap",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "CharsToRemove": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-charstoremove",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "CollapseConsecutiveWhitespace": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-collapseconsecutivewhitespace",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "ColumnDataType": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-columndatatype",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "ColumnRange": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-columnrange",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Count": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-count",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "CustomCharacters": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-customcharacters",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "CustomStopWords": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-customstopwords",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "CustomValue": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-customvalue",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "DatasetsColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-datasetscolumns",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "DateAddValue": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-dateaddvalue",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "DateTimeFormat": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-datetimeformat",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "DateTimeParameters": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-datetimeparameters",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "DeleteOtherRows": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-deleteotherrows",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Delimiter": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-delimiter",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "EndPattern": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-endpattern",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "EndPosition": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-endposition",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "EndValue": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-endvalue",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "ExpandContractions": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-expandcontractions",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Exponent": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-exponent",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "FalseString": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-falsestring",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "GroupByAggFunctionOptions": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-groupbyaggfunctionoptions",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "GroupByColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-groupbycolumns",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "HiddenColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-hiddencolumns",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "IgnoreCase": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-ignorecase",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "IncludeInSplit": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-includeinsplit",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Input": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-input",
+ "PrimitiveType": "Json",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Interval": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-interval",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "IsText": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-istext",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "JoinKeys": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-joinkeys",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "JoinType": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-jointype",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "LeftColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-leftcolumns",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Limit": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-limit",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "LowerBound": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-lowerbound",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "MapType": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-maptype",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "ModeType": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-modetype",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "MultiLine": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-multiline",
+ "PrimitiveType": "Boolean",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "NumRows": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-numrows",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "NumRowsAfter": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-numrowsafter",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "NumRowsBefore": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-numrowsbefore",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "OrderByColumn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-orderbycolumn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "OrderByColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-orderbycolumns",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Other": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-other",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Pattern": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-pattern",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "PatternOption1": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-patternoption1",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "PatternOption2": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-patternoption2",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "PatternOptions": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-patternoptions",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Period": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-period",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Position": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-position",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveAllPunctuation": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeallpunctuation",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveAllQuotes": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeallquotes",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveAllWhitespace": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeallwhitespace",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveCustomCharacters": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removecustomcharacters",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveCustomValue": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removecustomvalue",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveLeadingAndTrailingPunctuation": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeleadingandtrailingpunctuation",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveLeadingAndTrailingQuotes": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeleadingandtrailingquotes",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveLeadingAndTrailingWhitespace": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeleadingandtrailingwhitespace",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveLetters": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removeletters",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveNumbers": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removenumbers",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveSourceColumn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removesourcecolumn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RemoveSpecialCharacters": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-removespecialcharacters",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RightColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-rightcolumns",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "SampleSize": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-samplesize",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "SampleType": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sampletype",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "SecondInput": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-secondinput",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "SecondaryInputs": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-secondaryinputs",
+ "DuplicatesAllowed": true,
+ "ItemType": "SecondaryInput",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ },
+ "SheetIndexes": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sheetindexes",
+ "PrimitiveItemType": "Integer",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ },
+ "SheetNames": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sheetnames",
+ "PrimitiveItemType": "String",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ },
+ "SourceColumn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "SourceColumn1": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumn1",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "SourceColumn2": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumn2",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "SourceColumns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-sourcecolumns",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StartColumnIndex": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startcolumnindex",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StartPattern": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startpattern",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StartPosition": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startposition",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StartValue": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-startvalue",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StemmingMode": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stemmingmode",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StepCount": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stepcount",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StepIndex": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stepindex",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "StopWordsMode": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-stopwordsmode",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Strategy": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-strategy",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TargetColumn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetcolumn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TargetColumnNames": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetcolumnnames",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TargetDateFormat": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetdateformat",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TargetIndex": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-targetindex",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TimeZone": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-timezone",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TokenizerPattern": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-tokenizerpattern",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "TrueString": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-truestring",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "UdfLang": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-udflang",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Units": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-units",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "UnpivotColumn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-unpivotcolumn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "UpperBound": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-upperbound",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "UseNewDataFrame": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-usenewdataframe",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Value": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-value",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Value1": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-value1",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Value2": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-value2",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "ValueColumn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-valuecolumn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "ViewFrame": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipeparameters.html#cfn-databrew-recipe-recipeparameters-viewframe",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe.RecipeStep": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipestep.html",
+ "Properties": {
+ "Action": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipestep.html#cfn-databrew-recipe-recipestep-action",
+ "PrimitiveType": "Json",
+ "Required": true,
+ "Type": "Action",
+ "UpdateType": "Mutable"
+ },
+ "ConditionExpressions": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-recipestep.html#cfn-databrew-recipe-recipestep-conditionexpressions",
+ "ItemType": "ConditionExpression",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe.S3Location": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-s3location.html",
+ "Properties": {
+ "Bucket": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-s3location.html#cfn-databrew-recipe-s3location-bucket",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Key": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-s3location.html#cfn-databrew-recipe-s3location-key",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe.SecondaryInput": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-secondaryinput.html",
+ "Properties": {
+ "DataCatalogInputDefinition": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-secondaryinput.html#cfn-databrew-recipe-secondaryinput-datacataloginputdefinition",
+ "Required": false,
+ "Type": "DataCatalogInputDefinition",
+ "UpdateType": "Mutable"
+ },
+ "S3InputDefinition": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-secondaryinput.html#cfn-databrew-recipe-secondaryinput-s3inputdefinition",
+ "Required": false,
+ "Type": "S3Location",
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::DataPipeline::Pipeline.Field": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html",
"Properties": {
@@ -13006,6 +13990,23 @@
}
}
},
+ "AWS::EC2::ClientVpnEndpoint.ClientConnectOptions": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-clientconnectoptions.html",
+ "Properties": {
+ "Enabled": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-clientconnectoptions.html#cfn-ec2-clientvpnendpoint-clientconnectoptions-enabled",
+ "PrimitiveType": "Boolean",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "LambdaFunctionArn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-clientconnectoptions.html#cfn-ec2-clientvpnendpoint-clientconnectoptions-lambdafunctionarn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
"AWS::EC2::ClientVpnEndpoint.ConnectionLogOptions": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-connectionlogoptions.html",
"Properties": {
@@ -18522,52 +19523,52 @@
}
},
"AWS::ElasticLoadBalancingV2::Listener.Action": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html",
"Properties": {
"AuthenticateCognitoConfig": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig",
"Required": false,
"Type": "AuthenticateCognitoConfig",
"UpdateType": "Mutable"
},
"AuthenticateOidcConfig": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig",
"Required": false,
"Type": "AuthenticateOidcConfig",
"UpdateType": "Mutable"
},
"FixedResponseConfig": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig",
"Required": false,
"Type": "FixedResponseConfig",
"UpdateType": "Mutable"
},
"ForwardConfig": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig",
"Required": false,
"Type": "ForwardConfig",
"UpdateType": "Mutable"
},
"Order": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-order",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-order",
"PrimitiveType": "Integer",
"Required": false,
"UpdateType": "Mutable"
},
"RedirectConfig": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig",
"Required": false,
"Type": "RedirectConfig",
"UpdateType": "Mutable"
},
"TargetGroupArn": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-targetgrouparn",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-targetgrouparn",
"PrimitiveType": "String",
"Required": false,
"UpdateType": "Mutable"
},
"Type": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-defaultactions.html#cfn-elasticloadbalancingv2-listener-defaultactions-type",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-type",
"PrimitiveType": "String",
"Required": true,
"UpdateType": "Mutable"
@@ -18579,7 +19580,6 @@
"Properties": {
"AuthenticationRequestExtraParams": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-authenticationrequestextraparams",
- "DuplicatesAllowed": false,
"PrimitiveItemType": "String",
"Required": false,
"Type": "Map",
@@ -18605,7 +19605,7 @@
},
"SessionTimeout": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-sessiontimeout",
- "PrimitiveType": "Long",
+ "PrimitiveType": "String",
"Required": false,
"UpdateType": "Mutable"
},
@@ -18634,7 +19634,6 @@
"Properties": {
"AuthenticationRequestExtraParams": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-authenticationrequestextraparams",
- "DuplicatesAllowed": false,
"PrimitiveItemType": "String",
"Required": false,
"Type": "Map",
@@ -18684,7 +19683,7 @@
},
"SessionTimeout": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-sessiontimeout",
- "PrimitiveType": "Long",
+ "PrimitiveType": "String",
"Required": false,
"UpdateType": "Mutable"
},
@@ -18703,10 +19702,10 @@
}
},
"AWS::ElasticLoadBalancingV2::Listener.Certificate": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html",
"Properties": {
"CertificateArn": {
- "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html#cfn-elasticloadbalancingv2-listener-certificates-certificatearn",
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html#cfn-elasticloadbalancingv2-listener-certificate-certificatearn",
"PrimitiveType": "String",
"Required": false,
"UpdateType": "Mutable"
@@ -43274,7 +44273,7 @@
}
}
},
- "ResourceSpecificationVersion": "20.2.0",
+ "ResourceSpecificationVersion": "20.3.0",
"ResourceTypes": {
"AWS::ACMPCA::Certificate": {
"Attributes": {
@@ -49883,6 +50882,12 @@
"Type": "Code",
"UpdateType": "Mutable"
},
+ "ConnectionArn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html#cfn-codestar-githubrepository-connectionarn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
"EnableIssues": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html#cfn-codestar-githubrepository-enableissues",
"PrimitiveType": "Boolean",
@@ -49898,7 +50903,7 @@
"RepositoryAccessToken": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html#cfn-codestar-githubrepository-repositoryaccesstoken",
"PrimitiveType": "String",
- "Required": true,
+ "Required": false,
"UpdateType": "Mutable"
},
"RepositoryDescription": {
@@ -51432,7 +52437,7 @@
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-replicationinstance.html#cfn-dms-replicationinstance-availabilityzone",
"PrimitiveType": "String",
"Required": false,
- "UpdateType": "Immutable"
+ "UpdateType": "Mutable"
},
"EngineVersion": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-replicationinstance.html#cfn-dms-replicationinstance-engineversion",
@@ -51607,6 +52612,255 @@
}
}
},
+ "AWS::DataBrew::Dataset": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html",
+ "Properties": {
+ "FormatOptions": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-formatoptions",
+ "PrimitiveType": "Json",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Input": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-input",
+ "PrimitiveType": "Json",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Name": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-name",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Immutable"
+ },
+ "Tags": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-dataset.html#cfn-databrew-dataset-tags",
+ "DuplicatesAllowed": true,
+ "ItemType": "Tag",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Immutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Job": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html",
+ "Properties": {
+ "DatasetName": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-datasetname",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "EncryptionKeyArn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-encryptionkeyarn",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "EncryptionMode": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-encryptionmode",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "LogSubscription": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-logsubscription",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "MaxCapacity": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-maxcapacity",
+ "PrimitiveType": "Integer",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "MaxRetries": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-maxretries",
+ "PrimitiveType": "Integer",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Name": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-name",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Immutable"
+ },
+ "OutputLocation": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-outputlocation",
+ "PrimitiveType": "Json",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Outputs": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-outputs",
+ "ItemType": "Output",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ },
+ "ProjectName": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-projectname",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Recipe": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-recipe",
+ "PrimitiveType": "Json",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "RoleArn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-rolearn",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Tags": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-tags",
+ "DuplicatesAllowed": true,
+ "ItemType": "Tag",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Immutable"
+ },
+ "Timeout": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-timeout",
+ "PrimitiveType": "Integer",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Type": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-job.html#cfn-databrew-job-type",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Immutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Project": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html",
+ "Properties": {
+ "DatasetName": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-datasetname",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Name": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-name",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Immutable"
+ },
+ "RecipeName": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-recipename",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "RoleArn": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-rolearn",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "Sample": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-sample",
+ "PrimitiveType": "Json",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Tags": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-project.html#cfn-databrew-project-tags",
+ "DuplicatesAllowed": true,
+ "ItemType": "Tag",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Immutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Recipe": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html",
+ "Properties": {
+ "Description": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-description",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Name": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-name",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Immutable"
+ },
+ "ProjectName": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-projectname",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
+ "Steps": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-steps",
+ "ItemType": "RecipeStep",
+ "Required": true,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ },
+ "Tags": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-tags",
+ "DuplicatesAllowed": true,
+ "ItemType": "Tag",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Immutable"
+ },
+ "Version": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-recipe.html#cfn-databrew-recipe-version",
+ "PrimitiveType": "String",
+ "Required": false,
+ "UpdateType": "Mutable"
+ }
+ }
+ },
+ "AWS::DataBrew::Schedule": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html",
+ "Properties": {
+ "CronExpression": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-cronexpression",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Mutable"
+ },
+ "JobNames": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-jobnames",
+ "DuplicatesAllowed": false,
+ "PrimitiveItemType": "String",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ },
+ "Name": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-name",
+ "PrimitiveType": "String",
+ "Required": true,
+ "UpdateType": "Immutable"
+ },
+ "Tags": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-schedule.html#cfn-databrew-schedule-tags",
+ "DuplicatesAllowed": true,
+ "ItemType": "Tag",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Immutable"
+ }
+ }
+ },
"AWS::DataPipeline::Pipeline": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html",
"Properties": {
@@ -52335,6 +53589,12 @@
"Required": true,
"UpdateType": "Immutable"
},
+ "ClientConnectOptions": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-clientconnectoptions",
+ "Required": false,
+ "Type": "ClientConnectOptions",
+ "UpdateType": "Mutable"
+ },
"ConnectionLogOptions": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnendpoint.html#cfn-ec2-clientvpnendpoint-connectionlogoptions",
"Required": true,
@@ -54470,6 +55730,13 @@
"Required": false,
"UpdateType": "Mutable"
},
+ "GatewayLoadBalancerArns": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-gatewayloadbalancerarns",
+ "PrimitiveItemType": "String",
+ "Required": false,
+ "Type": "List",
+ "UpdateType": "Mutable"
+ },
"NetworkLoadBalancerArns": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservice.html#cfn-ec2-vpcendpointservice-networkloadbalancerarns",
"PrimitiveItemType": "String",
@@ -56711,11 +57978,15 @@
}
},
"AWS::ElasticLoadBalancingV2::Listener": {
+ "Attributes": {
+ "ListenerArn": {
+ "PrimitiveType": "String"
+ }
+ },
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html",
"Properties": {
"AlpnPolicy": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-alpnpolicy",
- "DuplicatesAllowed": false,
"PrimitiveItemType": "String",
"Required": false,
"Type": "List",
@@ -62023,6 +63294,12 @@
"Required": false,
"UpdateType": "Mutable"
},
+ "PartialBatchResponse": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-partialbatchresponse",
+ "PrimitiveType": "Boolean",
+ "Required": false,
+ "UpdateType": "Mutable"
+ },
"Queues": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues",
"DuplicatesAllowed": false,
@@ -62052,6 +63329,12 @@
"Required": false,
"Type": "List",
"UpdateType": "Mutable"
+ },
+ "TumblingWindowInSeconds": {
+ "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tumblingwindowinseconds",
+ "PrimitiveType": "Integer",
+ "Required": false,
+ "UpdateType": "Mutable"
}
}
},
diff --git a/packages/@aws-cdk/cfnspec/spec-source/700_DataBrew_patch.json b/packages/@aws-cdk/cfnspec/spec-source/700_DataBrew_patch.json
new file mode 100644
index 0000000000000..12e9cd1768ea6
--- /dev/null
+++ b/packages/@aws-cdk/cfnspec/spec-source/700_DataBrew_patch.json
@@ -0,0 +1,32 @@
+{
+ "PropertyTypes": {
+ "AWS::DataBrew::Recipe.Action": {
+ "patch": {
+ "description": "AWS::DataBrew::Recipe.Action.Parameters does not have a type",
+ "operations": [
+ {
+ "op": "add",
+ "path": "/Properties/Parameters/Type",
+ "value": "Map"
+ },
+ {
+ "op": "add",
+ "path": "/Properties/Parameters/PrimitiveItemType",
+ "value": "String"
+ }
+ ]
+ }
+ },
+ "AWS::DataBrew::Recipe.RecipeStep": {
+ "patch": {
+ "description": "AWS::DataBrew::Recipe.RecipeStep.Action has both PrimitiveType and Type",
+ "operations": [
+ {
+ "op": "remove",
+ "path": "/Properties/Action/PrimitiveType"
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json
index e465c8aa10595..1f0284428620e 100644
--- a/packages/@aws-cdk/cloudformation-diff/package.json
+++ b/packages/@aws-cdk/cloudformation-diff/package.json
@@ -26,7 +26,7 @@
"diff": "^5.0.0",
"fast-deep-equal": "^3.1.3",
"string-width": "^4.2.0",
- "table": "^6.0.3"
+ "table": "^6.0.4"
},
"devDependencies": {
"@types/jest": "^26.0.15",
diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json
index 787e999447b0c..73b41baf6a3a7 100644
--- a/packages/@aws-cdk/cloudformation-include/package.json
+++ b/packages/@aws-cdk/cloudformation-include/package.json
@@ -106,6 +106,7 @@
"@aws-cdk/aws-codestarnotifications": "0.0.0",
"@aws-cdk/aws-cognito": "0.0.0",
"@aws-cdk/aws-config": "0.0.0",
+ "@aws-cdk/aws-databrew": "0.0.0",
"@aws-cdk/aws-datapipeline": "0.0.0",
"@aws-cdk/aws-dax": "0.0.0",
"@aws-cdk/aws-detective": "0.0.0",
@@ -239,6 +240,7 @@
"@aws-cdk/aws-codestarnotifications": "0.0.0",
"@aws-cdk/aws-cognito": "0.0.0",
"@aws-cdk/aws-config": "0.0.0",
+ "@aws-cdk/aws-databrew": "0.0.0",
"@aws-cdk/aws-datapipeline": "0.0.0",
"@aws-cdk/aws-dax": "0.0.0",
"@aws-cdk/aws-detective": "0.0.0",
diff --git a/packages/@aws-cdk/core/lib/cfn-element.ts b/packages/@aws-cdk/core/lib/cfn-element.ts
index d381441f9a19e..5e2cf1602c614 100644
--- a/packages/@aws-cdk/core/lib/cfn-element.ts
+++ b/packages/@aws-cdk/core/lib/cfn-element.ts
@@ -60,7 +60,7 @@ export abstract class CfnElement extends CoreConstruct {
this.stack = Stack.of(this);
- this.logicalId = Lazy.stringValue({ produce: () => this.synthesizeLogicalId() }, {
+ this.logicalId = Lazy.uncachedString({ produce: () => this.synthesizeLogicalId() }, {
displayHint: `${notTooLong(Node.of(this).path)}.LogicalID`,
});
diff --git a/packages/@aws-cdk/core/lib/cfn-parse.ts b/packages/@aws-cdk/core/lib/cfn-parse.ts
index 663bdd6437a98..c5fc563c3778f 100644
--- a/packages/@aws-cdk/core/lib/cfn-parse.ts
+++ b/packages/@aws-cdk/core/lib/cfn-parse.ts
@@ -492,7 +492,7 @@ export class CfnParser {
// as otherwise Fn.join() will try to concatenate
// the non-token parts,
// causing a diff with the original template
- return Fn.join(value[0], Lazy.listValue({ produce: () => value[1] }));
+ return Fn.join(value[0], Lazy.list({ produce: () => value[1] }));
}
case 'Fn::Cidr': {
const value = this.parseValue(object[key]);
@@ -670,7 +670,7 @@ export class CfnParser {
// as Fn.valueOf() returns a string,
// which is incorrect
// (Fn::ValueOf can also return an array)
- return Lazy.anyValue({ produce: () => ({ 'Fn::ValueOf': [param.logicalId, value[1]] }) });
+ return Lazy.any({ produce: () => ({ 'Fn::ValueOf': [param.logicalId, value[1]] }) });
}
default:
// I don't want to hard-code the list of supported Rules-specific intrinsics in this function;
diff --git a/packages/@aws-cdk/core/lib/lazy.ts b/packages/@aws-cdk/core/lib/lazy.ts
index c4fa348dd56db..58eb3bd6522b9 100644
--- a/packages/@aws-cdk/core/lib/lazy.ts
+++ b/packages/@aws-cdk/core/lib/lazy.ts
@@ -13,6 +13,16 @@ export interface IStringProducer {
produce(context: IResolveContext): string | undefined;
}
+/**
+ * Interface for (stable) lazy string producers
+ */
+export interface IStableStringProducer {
+ /**
+ * Produce the string value
+ */
+ produce(): string | undefined;
+}
+
/**
* Interface for lazy list producers
*/
@@ -23,6 +33,16 @@ export interface IListProducer {
produce(context: IResolveContext): string[] | undefined;
}
+/**
+ * Interface for (stable) lazy list producers
+ */
+export interface IStableListProducer {
+ /**
+ * Produce the list value
+ */
+ produce(): string[] | undefined;
+}
+
/**
* Interface for lazy number producers
*/
@@ -33,6 +53,16 @@ export interface INumberProducer {
produce(context: IResolveContext): number | undefined;
}
+/**
+ * Interface for (stable) lazy number producers
+ */
+export interface IStableNumberProducer {
+ /**
+ * Produce the number value
+ */
+ produce(): number | undefined;
+}
+
/**
* Interface for lazy untyped value producers
*/
@@ -43,6 +73,16 @@ export interface IAnyProducer {
produce(context: IResolveContext): any;
}
+/**
+ * Interface for (stable) lazy untyped value producers
+ */
+export interface IStableAnyProducer {
+ /**
+ * Produce the value
+ */
+ produce(): any;
+}
+
/**
* Options for creating a lazy string token
*/
@@ -100,30 +140,202 @@ export interface LazyAnyValueOptions {
* will only be calculated later, during synthesis.
*/
export class Lazy {
+ /**
+ * Defer the calculation of a string value to synthesis time
+ *
+ * Use this if you want to render a string to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * If you are simply looking to force a value to a `string` type and don't need
+ * the calculation to be deferred, use `Token.asString()` instead.
+ *
+ * @deprecated Use `Lazy.string()` or `Lazy.uncachedString()` instead.
+ */
public static stringValue(producer: IStringProducer, options: LazyStringValueOptions = {}) {
- return Token.asString(new LazyString(producer), options);
+ return Token.asString(new LazyString(producer, false), options);
+ }
+
+ /**
+ * Defer the one-time calculation of a string value to synthesis time
+ *
+ * Use this if you want to render a string to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * If you are simply looking to force a value to a `string` type and don't need
+ * the calculation to be deferred, use `Token.asString()` instead.
+ *
+ * The inner function will only be invoked once, and the resolved value
+ * cannot depend on the Stack the Token is used in.
+ */
+ public static string(producer: IStableStringProducer, options: LazyStringValueOptions = {}) {
+ return Token.asString(new LazyString(producer, true), options);
+ }
+
+ /**
+ * Defer the calculation of a string value to synthesis time
+ *
+ * Use of this function is not recommended; unless you know you need it for sure, you
+ * probably don't. Use `Lazy.string()` instead.
+ *
+ * The inner function may be invoked multiple times during synthesis. You
+ * should only use this method if the returned value depends on variables
+ * that may change during the Aspect application phase of synthesis, or if
+ * the value depends on the Stack the value is being used in. Both of these
+ * cases are rare, and only ever occur for AWS Construct Library authors.
+ */
+ public static uncachedString(producer: IStringProducer, options: LazyStringValueOptions = {}) {
+ return Token.asString(new LazyString(producer, false), options);
}
+ /**
+ * Defer the one-time calculation of a number value to synthesis time
+ *
+ * Use this if you want to render a number to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * If you are simply looking to force a value to a `number` type and don't need
+ * the calculation to be deferred, use `Token.asNumber()` instead.
+ *
+ * @deprecated Use `Lazy.number()` or `Lazy.uncachedNumber()` instead.
+ */
public static numberValue(producer: INumberProducer) {
- return Token.asNumber(new LazyNumber(producer));
+ return Token.asNumber(new LazyNumber(producer, false));
+ }
+
+ /**
+ * Defer the one-time calculation of a number value to synthesis time
+ *
+ * Use this if you want to render a number to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * If you are simply looking to force a value to a `number` type and don't need
+ * the calculation to be deferred, use `Token.asNumber()` instead.
+ *
+ * The inner function will only be invoked once, and the resolved value
+ * cannot depend on the Stack the Token is used in.
+ */
+ public static number(producer: IStableNumberProducer) {
+ return Token.asNumber(new LazyNumber(producer, true));
+ }
+
+ /**
+ * Defer the calculation of a number value to synthesis time
+ *
+ * Use of this function is not recommended; unless you know you need it for sure, you
+ * probably don't. Use `Lazy.number()` instead.
+ *
+ * The inner function may be invoked multiple times during synthesis. You
+ * should only use this method if the returned value depends on variables
+ * that may change during the Aspect application phase of synthesis, or if
+ * the value depends on the Stack the value is being used in. Both of these
+ * cases are rare, and only ever occur for AWS Construct Library authors.
+ */
+ public static uncachedNumber(producer: INumberProducer) {
+ return Token.asNumber(new LazyNumber(producer, false));
}
+ /**
+ * Defer the one-time calculation of a list value to synthesis time
+ *
+ * Use this if you want to render a list to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * If you are simply looking to force a value to a `string[]` type and don't need
+ * the calculation to be deferred, use `Token.asList()` instead.
+ *
+ * @deprecated Use `Lazy.list()` or `Lazy.uncachedList()` instead.
+ */
public static listValue(producer: IListProducer, options: LazyListValueOptions = {}) {
- return Token.asList(new LazyList(producer, options), options);
+ return Token.asList(new LazyList(producer, false, options), options);
+ }
+
+ /**
+ * Defer the calculation of a list value to synthesis time
+ *
+ * Use of this function is not recommended; unless you know you need it for sure, you
+ * probably don't. Use `Lazy.list()` instead.
+ *
+ * The inner function may be invoked multiple times during synthesis. You
+ * should only use this method if the returned value depends on variables
+ * that may change during the Aspect application phase of synthesis, or if
+ * the value depends on the Stack the value is being used in. Both of these
+ * cases are rare, and only ever occur for AWS Construct Library authors.
+ */
+ public static uncachedList(producer: IListProducer, options: LazyListValueOptions = {}) {
+ return Token.asList(new LazyList(producer, false, options), options);
+ }
+
+ /**
+ * Defer the one-time calculation of a list value to synthesis time
+ *
+ * Use this if you want to render a list to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * If you are simply looking to force a value to a `string[]` type and don't need
+ * the calculation to be deferred, use `Token.asList()` instead.
+ *
+ * The inner function will only be invoked once, and the resolved value
+ * cannot depend on the Stack the Token is used in.
+ */
+ public static list(producer: IStableListProducer, options: LazyListValueOptions = {}) {
+ return Token.asList(new LazyList(producer, true, options), options);
}
+ /**
+ * Defer the one-time calculation of an arbitrarily typed value to synthesis time
+ *
+ * Use this if you want to render an object to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * @deprecated Use `Lazy.any()` or `Lazy.uncachedAny()` instead.
+ */
public static anyValue(producer: IAnyProducer, options: LazyAnyValueOptions = {}): IResolvable {
- return new LazyAny(producer, options);
+ return new LazyAny(producer, false, options);
+ }
+
+ /**
+ * Defer the one-time calculation of an arbitrarily typed value to synthesis time
+ *
+ * Use this if you want to render an object to a template whose actual value depends on
+ * some state mutation that may happen after the construct has been created.
+ *
+ * The inner function will only be invoked one time and cannot depend on
+ * resolution context.
+ */
+ public static any(producer: IStableAnyProducer, options: LazyAnyValueOptions = {}): IResolvable {
+ return new LazyAny(producer, true, options);
+ }
+
+ /**
+ * Defer the calculation of an untyped value to synthesis time
+ *
+ * Use of this function is not recommended; unless you know you need it for sure, you
+ * probably don't. Use `Lazy.any()` instead.
+ *
+ * The inner function may be invoked multiple times during synthesis. You
+ * should only use this method if the returned value depends on variables
+ * that may change during the Aspect application phase of synthesis, or if
+ * the value depends on the Stack the value is being used in. Both of these
+ * cases are rare, and only ever occur for AWS Construct Library authors.
+ */
+ public static uncachedAny(producer: IAnyProducer, options: LazyAnyValueOptions = {}): IResolvable {
+ return new LazyAny(producer, false, options);
}
private constructor() {
}
}
-abstract class LazyBase implements IResolvable {
+
+interface ILazyProducer {
+ produce(context: IResolveContext): A | undefined;
+}
+
+abstract class LazyBase implements IResolvable {
public readonly creationStack: string[];
+ private _cached?: A;
- constructor() {
+ constructor(private readonly producer: ILazyProducer, private readonly cache: boolean) {
// Stack trace capture is conditionned to `debugModeEnabled()`, because
// lazies can be created in a fairly thrashy way, and the stack traces are
// large and slow to obtain; but are mostly useful only when debugging a
@@ -133,7 +345,13 @@ abstract class LazyBase implements IResolvable {
: [`Execute again with ${CDK_DEBUG}=true to capture stack traces`];
}
- public abstract resolve(context: IResolveContext): any;
+ public resolve(context: IResolveContext) {
+ if (this.cache) {
+ return this._cached ?? (this._cached = this.producer.produce(context));
+ } else {
+ return this.producer.produce(context);
+ }
+ }
public toString() {
return Token.asString(this);
@@ -150,50 +368,36 @@ abstract class LazyBase implements IResolvable {
}
-class LazyString extends LazyBase {
- constructor(private readonly producer: IStringProducer) {
- super();
- }
-
- public resolve(context: IResolveContext) {
- return this.producer.produce(context);
- }
+class LazyString extends LazyBase {
}
-class LazyNumber extends LazyBase {
- constructor(private readonly producer: INumberProducer) {
- super();
- }
-
- public resolve(context: IResolveContext) {
- return this.producer.produce(context);
- }
+class LazyNumber extends LazyBase {
}
-class LazyList extends LazyBase {
- constructor(private readonly producer: IListProducer, private readonly options: LazyListValueOptions = {}) {
- super();
+class LazyList extends LazyBase> {
+ constructor(producer: IListProducer, cache: boolean, private readonly options: LazyListValueOptions = {}) {
+ super(producer, cache);
}
public resolve(context: IResolveContext) {
- const ret = this.producer.produce(context);
- if (ret !== undefined && ret.length === 0 && this.options.omitEmpty) {
+ const resolved = super.resolve(context);
+ if (resolved?.length === 0 && this.options.omitEmpty) {
return undefined;
}
- return ret;
+ return resolved;
}
}
-class LazyAny extends LazyBase {
- constructor(private readonly producer: IAnyProducer, private readonly options: LazyAnyValueOptions = {}) {
- super();
+class LazyAny extends LazyBase {
+ constructor(producer: IAnyProducer, cache: boolean, private readonly options: LazyAnyValueOptions = {}) {
+ super(producer, cache);
}
public resolve(context: IResolveContext) {
- const ret = this.producer.produce(context);
- if (Array.isArray(ret) && ret.length === 0 && this.options.omitEmptyArray) {
+ const resolved = super.resolve(context);
+ if (Array.isArray(resolved) && resolved.length === 0 && this.options.omitEmptyArray) {
return undefined;
}
- return ret;
+ return resolved;
}
}
diff --git a/packages/@aws-cdk/core/lib/nested-stack.ts b/packages/@aws-cdk/core/lib/nested-stack.ts
index cca4b827b57cf..f130d00ded80b 100644
--- a/packages/@aws-cdk/core/lib/nested-stack.ts
+++ b/packages/@aws-cdk/core/lib/nested-stack.ts
@@ -120,8 +120,9 @@ export class NestedStack extends Stack {
this.parameters = props.parameters || {};
this.resource = new CfnStack(parentScope, `${id}.NestedStackResource`, {
- templateUrl: Lazy.stringValue({ produce: () => this._templateUrl || '' }),
- parameters: Lazy.anyValue({ produce: () => Object.keys(this.parameters).length > 0 ? this.parameters : undefined }),
+ // This value cannot be cached since it changes during the synthesis phase
+ templateUrl: Lazy.uncachedString({ produce: () => this._templateUrl || '' }),
+ parameters: Lazy.any({ produce: () => Object.keys(this.parameters).length > 0 ? this.parameters : undefined }),
notificationArns: props.notificationArns,
timeoutInMinutes: props.timeout ? props.timeout.toMinutes() : undefined,
});
diff --git a/packages/@aws-cdk/core/lib/private/cfn-reference.ts b/packages/@aws-cdk/core/lib/private/cfn-reference.ts
index b25597602f6b6..34c3da0138ae8 100644
--- a/packages/@aws-cdk/core/lib/private/cfn-reference.ts
+++ b/packages/@aws-cdk/core/lib/private/cfn-reference.ts
@@ -50,7 +50,7 @@ export class CfnReference extends Reference {
* the prepare() phase (for the purpose of cross-stack references), it's
* important that the state isn't lost if it's lazily created, like so:
*
- * Lazy.stringValue({ produce: () => new CfnReference(...) })
+ * Lazy.string({ produce: () => new CfnReference(...) })
*
*/
public static for(target: CfnElement, attribute: string, refRender?: ReferenceRendering) {
diff --git a/packages/@aws-cdk/core/lib/private/metadata-resource.ts b/packages/@aws-cdk/core/lib/private/metadata-resource.ts
index 09813ccb87faa..ff84b931f819b 100644
--- a/packages/@aws-cdk/core/lib/private/metadata-resource.ts
+++ b/packages/@aws-cdk/core/lib/private/metadata-resource.ts
@@ -51,7 +51,7 @@ export class MetadataResource extends Construct {
const resource = new CfnResource(this, 'Default', {
type: 'AWS::CDK::Metadata',
properties: {
- Modules: Lazy.stringValue({ produce: () => MetadataResource.modulesProperty() }),
+ Modules: Lazy.string({ produce: () => MetadataResource.modulesProperty() }),
},
});
diff --git a/packages/@aws-cdk/core/lib/resource.ts b/packages/@aws-cdk/core/lib/resource.ts
index 6a810b8a971e8..917a2c442dcf1 100644
--- a/packages/@aws-cdk/core/lib/resource.ts
+++ b/packages/@aws-cdk/core/lib/resource.ts
@@ -126,7 +126,7 @@ export abstract class Resource extends CoreConstruct implements IResource {
// auto-generate only if cross-env is required
this._physicalName = undefined;
this._allowCrossEnvironment = true;
- physicalName = Lazy.stringValue({ produce: () => this._physicalName });
+ physicalName = Lazy.string({ produce: () => this._physicalName });
} else if (props.physicalName && !Token.isUnresolved(props.physicalName)) {
// concrete value specified by the user
this._physicalName = props.physicalName;
@@ -181,7 +181,7 @@ export abstract class Resource extends CoreConstruct implements IResource {
* @experimental
*/
protected getResourceNameAttribute(nameAttr: string) {
- return Lazy.stringValue({
+ return Lazy.uncachedString({
produce: (context: IResolveContext) => {
const consumingStack = Stack.of(context.scope);
diff --git a/packages/@aws-cdk/core/lib/token.ts b/packages/@aws-cdk/core/lib/token.ts
index 35f2667f67365..5f98db7a4f11f 100644
--- a/packages/@aws-cdk/core/lib/token.ts
+++ b/packages/@aws-cdk/core/lib/token.ts
@@ -179,7 +179,7 @@ export class Tokenization {
// only convert numbers to strings so that Refs, conditions, and other things don't end up synthesizing as [object object]
if (Token.isUnresolved(x)) {
- return Lazy.stringValue({
+ return Lazy.uncachedString({
produce: context => {
const resolved = context.resolve(x);
return typeof resolved !== 'number' ? resolved : `${resolved}`;
diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json
index ff2a7d059f09d..e6041125237cb 100644
--- a/packages/@aws-cdk/core/package.json
+++ b/packages/@aws-cdk/core/package.json
@@ -171,7 +171,7 @@
"@types/lodash": "^4.14.165",
"@types/minimatch": "^3.0.3",
"@types/node": "^10.17.46",
- "@types/sinon": "^9.0.8",
+ "@types/sinon": "^9.0.9",
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"fast-check": "^2.7.0",
diff --git a/packages/@aws-cdk/core/test/cfn-json.test.ts b/packages/@aws-cdk/core/test/cfn-json.test.ts
index 85ee12c822cb8..150d1971cc39f 100644
--- a/packages/@aws-cdk/core/test/cfn-json.test.ts
+++ b/packages/@aws-cdk/core/test/cfn-json.test.ts
@@ -42,7 +42,7 @@ nodeunitShim({
value: {
[other.ref]: 1234,
world: {
- bar: `this is a ${Lazy.stringValue({ produce: () => 'I am lazy' })}`,
+ bar: `this is a ${Lazy.string({ produce: () => 'I am lazy' })}`,
},
},
});
@@ -62,7 +62,7 @@ nodeunitShim({
const res = new CfnResource(stack, 'MyResource', { type: 'Foo' });
const cfnjson = new CfnJson(stack, 'MyCfnJson', {
value: {
- [`ref=${res.ref}`]: `this is a ${Lazy.stringValue({ produce: () => 'I am lazy' })}`,
+ [`ref=${res.ref}`]: `this is a ${Lazy.string({ produce: () => 'I am lazy' })}`,
},
});
diff --git a/packages/@aws-cdk/core/test/cloudformation-json.test.ts b/packages/@aws-cdk/core/test/cloudformation-json.test.ts
index 8d7e571501462..e9d850eb178a2 100644
--- a/packages/@aws-cdk/core/test/cloudformation-json.test.ts
+++ b/packages/@aws-cdk/core/test/cloudformation-json.test.ts
@@ -155,7 +155,7 @@ nodeunitShim({
'Doubly nested strings evaluate correctly in JSON context'(test: Test) {
// WHEN
const stack = new Stack();
- const fidoSays = Lazy.stringValue({ produce: () => 'woof' });
+ const fidoSays = Lazy.string({ produce: () => 'woof' });
// WHEN
const resolved = stack.resolve(stack.toJsonString({
@@ -171,7 +171,7 @@ nodeunitShim({
'Doubly nested intrinsics evaluate correctly in JSON context'(test: Test) {
// GIVEN
const stack = new Stack();
- const fidoSays = Lazy.anyValue({ produce: () => ({ Ref: 'Something' }) });
+ const fidoSays = Lazy.any({ produce: () => ({ Ref: 'Something' }) });
// WHEN
const resolved = stack.resolve(stack.toJsonString({
@@ -188,7 +188,7 @@ nodeunitShim({
'Quoted strings in embedded JSON context are escaped'(test: Test) {
// GIVEN
const stack = new Stack();
- const fidoSays = Lazy.stringValue({ produce: () => '"woof"' });
+ const fidoSays = Lazy.string({ produce: () => '"woof"' });
// WHEN
const resolved = stack.resolve(stack.toJsonString({
@@ -235,6 +235,30 @@ nodeunitShim({
test.done();
},
+
+ 'Every Token used inside a JSONified string is given an opportunity to be uncached'(test: Test) {
+ // Check that tokens aren't accidentally fully resolved by the first invocation/resolution
+ // of toJsonString(). On every evaluation, Tokens referenced inside the structure should be
+ // given a chance to be either cached or uncached.
+ //
+ // (NOTE: This does not check whether the implementation of toJsonString() itself is cached or
+ // not; that depends on aws/aws-cdk#11224 and should be done in a different PR).
+
+ // GIVEN
+ const app = new App();
+ const stack = new Stack(app, 'Stack1');
+
+ // WHEN
+ let counter = 0;
+ const counterString = Token.asString({ resolve: () => `${++counter}` });
+ const jsonString = stack.toJsonString({ counterString });
+
+ // THEN
+ expect(stack.resolve(jsonString)).toEqual('{"counterString":"1"}');
+ expect(stack.resolve(jsonString)).toEqual('{"counterString":"2"}');
+
+ test.done();
+ },
});
/**
@@ -243,6 +267,6 @@ nodeunitShim({
function tokensThatResolveTo(value: any): Token[] {
return [
new Intrinsic(value),
- Lazy.anyValue({ produce: () => value }),
+ Lazy.any({ produce: () => value }),
];
}
diff --git a/packages/@aws-cdk/core/test/construct.test.ts b/packages/@aws-cdk/core/test/construct.test.ts
index 872ba9dceedca..a190ebaac7327 100644
--- a/packages/@aws-cdk/core/test/construct.test.ts
+++ b/packages/@aws-cdk/core/test/construct.test.ts
@@ -67,7 +67,7 @@ nodeunitShim({
'dont allow unresolved tokens to be used in construct IDs'(test: Test) {
// GIVEN
const root = new Root();
- const token = Lazy.stringValue({ produce: () => 'lazy' });
+ const token = Lazy.string({ produce: () => 'lazy' });
// WHEN + THEN
test.throws(() => new Construct(root, `MyID: ${token}`), /Cannot use tokens in construct ID: MyID: \${Token/);
diff --git a/packages/@aws-cdk/core/test/duration.test.ts b/packages/@aws-cdk/core/test/duration.test.ts
index 4d84d80c3eaf7..70b7cb786e344 100644
--- a/packages/@aws-cdk/core/test/duration.test.ts
+++ b/packages/@aws-cdk/core/test/duration.test.ts
@@ -145,7 +145,7 @@ nodeunitShim({
'to human string'(test: Test) {
test.equal(Duration.minutes(0).toHumanString(), '0 minutes');
- test.equal(Duration.minutes(Lazy.numberValue({ produce: () => 5 })).toHumanString(), ' minutes');
+ test.equal(Duration.minutes(Lazy.number({ produce: () => 5 })).toHumanString(), ' minutes');
test.equal(Duration.minutes(10).toHumanString(), '10 minutes');
test.equal(Duration.minutes(1).toHumanString(), '1 minute');
diff --git a/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts b/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts
index 2d6e5e93d8d2a..22539e435b214 100644
--- a/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts
+++ b/packages/@aws-cdk/core/test/private/physical-name-generator.test.ts
@@ -113,7 +113,7 @@ nodeunitShim({
isGeneratedWhenNeededMarker: {
'correctly response for other tokens'(test: Test) {
test.ok(!isGeneratedWhenNeededMarker('this is not even a token!'));
- test.ok(!isGeneratedWhenNeededMarker(Lazy.stringValue({ produce: () => 'Bazinga!' })));
+ test.ok(!isGeneratedWhenNeededMarker(Lazy.string({ produce: () => 'Bazinga!' })));
test.done();
},
diff --git a/packages/@aws-cdk/core/test/private/tree-metadata.test.ts b/packages/@aws-cdk/core/test/private/tree-metadata.test.ts
index ce64cf5991e1a..f62df683c422a 100644
--- a/packages/@aws-cdk/core/test/private/tree-metadata.test.ts
+++ b/packages/@aws-cdk/core/test/private/tree-metadata.test.ts
@@ -123,7 +123,7 @@ nodeunitShim({
class MyCfnResource extends AbstractCfnResource {
protected get cfnProperties(): { [key: string]: any } {
return {
- lazykey: Lazy.stringValue({ produce: () => 'LazyResolved!' }),
+ lazykey: Lazy.string({ produce: () => 'LazyResolved!' }),
cfnparamkey: cfnparam,
};
}
@@ -178,7 +178,7 @@ nodeunitShim({
constructor(scope: Construct, id: string) {
super(scope, id);
- this.lazykey = Lazy.stringValue({ produce: () => 'LazyResolved!' });
+ this.lazykey = Lazy.string({ produce: () => 'LazyResolved!' });
}
protected get cfnProperties(): { [key: string]: any } {
diff --git a/packages/@aws-cdk/core/test/stack.test.ts b/packages/@aws-cdk/core/test/stack.test.ts
index 50a91b7be7827..dad2a64b3235c 100644
--- a/packages/@aws-cdk/core/test/stack.test.ts
+++ b/packages/@aws-cdk/core/test/stack.test.ts
@@ -309,7 +309,7 @@ nodeunitShim({
const stack2 = new Stack(app, 'Stack2');
// WHEN - used in another stack
- new CfnParameter(stack2, 'SomeParameter', { type: 'String', default: Lazy.stringValue({ produce: () => account1 }) });
+ new CfnParameter(stack2, 'SomeParameter', { type: 'String', default: Lazy.string({ produce: () => account1 }) });
const assembly = app.synth();
const template1 = assembly.getStackByName(stack1.stackName).template;
diff --git a/packages/@aws-cdk/core/test/tokens.test.ts b/packages/@aws-cdk/core/test/tokens.test.ts
index e8dec9c64212a..39f4332d0ad86 100644
--- a/packages/@aws-cdk/core/test/tokens.test.ts
+++ b/packages/@aws-cdk/core/test/tokens.test.ts
@@ -273,7 +273,7 @@ nodeunitShim({
'tokens can be nested in hash keys'(test: Test) {
// GIVEN
- const token = new Intrinsic(Lazy.stringValue({ produce: () => Lazy.stringValue({ produce: (() => 'I am a string') }) }));
+ const token = new Intrinsic(Lazy.string({ produce: () => Lazy.string({ produce: (() => 'I am a string') }) }));
// WHEN
const s = {
@@ -285,6 +285,55 @@ nodeunitShim({
test.done();
},
+ 'Function passed to Lazy.uncachedString() is evaluated multiple times'(test: Test) {
+ // GIVEN
+ let counter = 0;
+ const counterString = Lazy.uncachedString({ produce: () => `${++counter}` });
+
+ // THEN
+ expect(resolve(counterString)).toEqual('1');
+ expect(resolve(counterString)).toEqual('2');
+
+ test.done();
+ },
+
+ 'Function passed to Lazy.string() is only evaluated once'(test: Test) {
+ // GIVEN
+ let counter = 0;
+ const counterString = Lazy.string({ produce: () => `${++counter}` });
+
+ // THEN
+ expect(resolve(counterString)).toEqual('1');
+ expect(resolve(counterString)).toEqual('1');
+
+ test.done();
+ },
+
+ 'Uncached tokens returned by cached tokens are still evaluated multiple times'(test: Test) {
+ // Check that nested token returns aren't accidentally fully resolved by the
+ // first resolution. On every evaluation, Tokens referenced inside the
+ // structure should be given a chance to be either cached or uncached.
+
+ // GIVEN
+ let counter = 0;
+ const uncachedToken = Lazy.uncachedString({ produce: () => `${++counter}` });
+ // Directly returned
+ const counterString1 = Lazy.string({ produce: () => uncachedToken });
+ // In quoted context
+ const counterString2 = Lazy.string({ produce: () => `->${uncachedToken}` });
+ // In object context
+ const counterObject = Lazy.any({ produce: () => ({ finalCount: uncachedToken }) });
+
+ // THEN
+ expect(resolve(counterString1)).toEqual('1');
+ expect(resolve(counterString1)).toEqual('2');
+ expect(resolve(counterString2)).toEqual('->3');
+ expect(resolve(counterString2)).toEqual('->4');
+ expect(resolve(counterObject)).toEqual({ finalCount: '5' });
+
+ test.done();
+ },
+
'tokens can be nested and concatenated in hash keys'(test: Test) {
// GIVEN
const innerToken = new Intrinsic( 'toot');
@@ -591,7 +640,7 @@ nodeunitShim({
'creation stack is attached to errors emitted during resolve with CDK_DEBUG=true'(test: Test) {
function showMeInTheStackTrace() {
- return Lazy.stringValue({ produce: () => { throw new Error('fooError'); } });
+ return Lazy.string({ produce: () => { throw new Error('fooError'); } });
}
const previousValue = process.env.CDK_DEBUG;
@@ -658,7 +707,7 @@ nodeunitShim({
'lazy Ref remains the same'(test: Test) {
const resolvedVal = { Ref: 'SomeLogicalId' };
- const tokenizedVal = Lazy.anyValue({
+ const tokenizedVal = Lazy.any({
produce: () => resolvedVal,
});
const res = Tokenization.stringifyNumber(tokenizedVal as any) as any;
@@ -720,7 +769,7 @@ class DataType extends BaseDataType {
function tokensThatResolveTo(value: any): Token[] {
return [
new Intrinsic(value),
- Lazy.anyValue({ produce: () => value }),
+ Lazy.any({ produce: () => value }),
];
}
diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json
index e7f1206f606f7..3bdd18d612336 100644
--- a/packages/@aws-cdk/custom-resources/package.json
+++ b/packages/@aws-cdk/custom-resources/package.json
@@ -78,7 +78,7 @@
"@aws-cdk/aws-ssm": "0.0.0",
"@types/aws-lambda": "^8.10.64",
"@types/fs-extra": "^8.1.1",
- "@types/sinon": "^9.0.8",
+ "@types/sinon": "^9.0.9",
"aws-sdk": "^2.797.0",
"aws-sdk-mock": "^5.1.0",
"cdk-build-tools": "0.0.0",
diff --git a/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts b/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts
index 1e2adadafb52d..0c661b61e9251 100644
--- a/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts
+++ b/packages/@aws-cdk/pipelines/lib/actions/publish-assets-action.ts
@@ -116,7 +116,7 @@ export class PublishAssetsAction extends CoreConstruct implements codepipeline.I
commands: `npm install -g cdk-assets${installSuffix}`,
},
build: {
- commands: Lazy.listValue({ produce: () => this.commands }),
+ commands: Lazy.list({ produce: () => this.commands }),
},
},
}),
diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json
index cfb97631655f4..6fb76cd3eca49 100644
--- a/packages/aws-cdk-lib/package.json
+++ b/packages/aws-cdk-lib/package.json
@@ -149,6 +149,7 @@
"@aws-cdk/aws-codestarnotifications": "0.0.0",
"@aws-cdk/aws-cognito": "0.0.0",
"@aws-cdk/aws-config": "0.0.0",
+ "@aws-cdk/aws-databrew": "0.0.0",
"@aws-cdk/aws-datapipeline": "0.0.0",
"@aws-cdk/aws-dax": "0.0.0",
"@aws-cdk/aws-detective": "0.0.0",
diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json
index a79504918a893..c194a4db600ca 100644
--- a/packages/aws-cdk/package.json
+++ b/packages/aws-cdk/package.json
@@ -48,7 +48,7 @@
"@types/node": "^10.17.46",
"@types/promptly": "^3.0.0",
"@types/semver": "^7.3.4",
- "@types/sinon": "^9.0.8",
+ "@types/sinon": "^9.0.9",
"@types/table": "^5.0.0",
"@types/uuid": "^8.3.0",
"@types/wrap-ansi": "^3.0.0",
@@ -84,7 +84,7 @@
"proxy-agent": "^4.0.0",
"semver": "^7.3.2",
"source-map-support": "^0.5.19",
- "table": "^6.0.3",
+ "table": "^6.0.4",
"uuid": "^8.3.1",
"wrap-ansi": "^7.0.0",
"yargs": "^16.1.1"
diff --git a/packages/decdk/lib/declarative-stack.ts b/packages/decdk/lib/declarative-stack.ts
index 8b937ecd3525e..a093d16a5922f 100644
--- a/packages/decdk/lib/declarative-stack.ts
+++ b/packages/decdk/lib/declarative-stack.ts
@@ -382,7 +382,7 @@ function invokeMethod(stack: cdk.Stack, method: reflect.Callable, parameters: an
* an `Fn::GetAtt`.
*/
function deconstructGetAtt(stack: cdk.Stack, id: string, attribute: string) {
- return cdk.Lazy.stringValue({ produce: () => {
+ return cdk.Lazy.string({ produce: () => {
const res = stack.node.tryFindChild(id);
if (!res) {
const include = stack.node.tryFindChild('Include') as cdk.CfnInclude;
diff --git a/packages/decdk/package.json b/packages/decdk/package.json
index f7ff60585e9cd..f0b086c41264f 100644
--- a/packages/decdk/package.json
+++ b/packages/decdk/package.json
@@ -76,6 +76,7 @@
"@aws-cdk/aws-codestarnotifications": "0.0.0",
"@aws-cdk/aws-cognito": "0.0.0",
"@aws-cdk/aws-config": "0.0.0",
+ "@aws-cdk/aws-databrew": "0.0.0",
"@aws-cdk/aws-datapipeline": "0.0.0",
"@aws-cdk/aws-dax": "0.0.0",
"@aws-cdk/aws-detective": "0.0.0",
diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json
index 49e674e35ea0f..367ee89c1d98a 100644
--- a/packages/monocdk/package.json
+++ b/packages/monocdk/package.json
@@ -148,6 +148,7 @@
"@aws-cdk/aws-codestarnotifications": "0.0.0",
"@aws-cdk/aws-cognito": "0.0.0",
"@aws-cdk/aws-config": "0.0.0",
+ "@aws-cdk/aws-databrew": "0.0.0",
"@aws-cdk/aws-datapipeline": "0.0.0",
"@aws-cdk/aws-dax": "0.0.0",
"@aws-cdk/aws-detective": "0.0.0",
diff --git a/yarn.lock b/yarn.lock
index 122b5b0c73dca..7aafafb318f3d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1703,10 +1703,10 @@
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb"
integrity sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==
-"@types/sinon@^9.0.8":
- version "9.0.8"
- resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.8.tgz#1ed0038d356784f75b086104ef83bfd4130bb81b"
- integrity sha512-IVnI820FZFMGI+u1R+2VdRaD/82YIQTdqLYC9DLPszZuynAJDtCvCtCs3bmyL66s7FqRM3+LPX7DhHnVTaagDw==
+"@types/sinon@^9.0.9":
+ version "9.0.9"
+ resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.9.tgz#115843b491583f924080f684b6d0d7438344f73c"
+ integrity sha512-z/y8maYOQyYLyqaOB+dYQ6i0pxKLOsfwCmHmn4T7jS/SDHicIslr37oE3Dg8SCqKrKeBy6Lemu7do2yy+unLrw==
dependencies:
"@types/sinonjs__fake-timers" "*"
@@ -9441,10 +9441,10 @@ table@^5.2.3:
slice-ansi "^2.1.0"
string-width "^3.0.0"
-table@^6.0.3:
- version "6.0.3"
- resolved "https://registry.yarnpkg.com/table/-/table-6.0.3.tgz#e5b8a834e37e27ad06de2e0fda42b55cfd8a0123"
- integrity sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==
+table@^6.0.4:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/table/-/table-6.0.4.tgz#c523dd182177e926c723eb20e1b341238188aa0d"
+ integrity sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==
dependencies:
ajv "^6.12.4"
lodash "^4.17.20"