Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Introduced Duration class #2857

Merged
merged 8 commits into from
Jun 20, 2019
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into rmuller/duration
  • Loading branch information
RomainMuller committed Jun 13, 2019
commit 910e652a5774d4a863b700f87f59ae7d2d25509e
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');
import iam = require('@aws-cdk/aws-iam');
import sns = require('@aws-cdk/aws-sns');

import { AutoScalingRollingUpdate, Construct, Duration, Fn, IResource, Lazy, Resource, Tag } from '@aws-cdk/cdk';
import { AutoScalingRollingUpdate, Construct, Duration, Fn, IResource, Lazy, Resource, Stack, Tag } from '@aws-cdk/cdk';
import { CfnAutoScalingGroup, CfnAutoScalingGroupProps, CfnLaunchConfiguration } from './autoscaling.generated';
import { BasicLifecycleHookProps, LifecycleHook } from './lifecycle-hook';
import { BasicScheduledActionProps, ScheduledAction } from './scheduled-action';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class DnsValidatedCertificate extends cdk.Resource implements ICertificat
const requestorFunction = new lambda.Function(this, 'CertificateRequestorFunction', {
code: lambda.Code.asset(path.resolve(__dirname, '..', 'lambda-packages', 'dns_validated_certificate_handler', 'lib')),
handler: 'index.certificateRequestHandler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
timeout: cdk.Duration.minutes(15)
});
requestorFunction.addToRolePolicy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class GlobalTableCoordinator extends cdk.Stack {
code: lambda.Code.asset(path.resolve(__dirname, "../", "lambda-packages", "aws-global-table-coordinator", "lib")),
description: "Lambda to make DynamoDB a global table",
handler: "index.handler",
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
timeout: cdk.Duration.minutes(5),
uuid: "D38B65A6-6B54-4FB6-9BAD-9CD40A6DAC12",
});
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ecs/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import cloudwatch = require ('@aws-cdk/aws-cloudwatch');
import ec2 = require('@aws-cdk/aws-ec2');
import iam = require('@aws-cdk/aws-iam');
import cloudmap = require('@aws-cdk/aws-servicediscovery');
import { Construct, Duration, IResource, Resource, SSMParameterProvider, Stack } from '@aws-cdk/cdk';
import { Construct, Context, Duration, IResource, Resource, Stack } from '@aws-cdk/cdk';
import { InstanceDrainHook } from './drain-hook/instance-drain-hook';
import { CfnCluster } from './ecs.generated';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import cloudwatch = require('@aws-cdk/aws-cloudwatch');
import ec2 = require('@aws-cdk/aws-ec2');
import iam = require('@aws-cdk/aws-iam');
import s3 = require('@aws-cdk/aws-s3');
import { Construct, Duration, Lazy, Resource, Stack } from '@aws-cdk/cdk';
import { Construct, Duration, Lazy, Resource, Stack, Token } from '@aws-cdk/cdk';
import { BaseLoadBalancer, BaseLoadBalancerProps, ILoadBalancerV2 } from '../shared/base-load-balancer';
import { IpAddressType } from '../shared/enums';
import { ApplicationListener, BaseApplicationListenerProps } from './application-listener';
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/lib/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ec2 = require('@aws-cdk/aws-ec2');
import iam = require('@aws-cdk/aws-iam');
import logs = require('@aws-cdk/aws-logs');
import sqs = require('@aws-cdk/aws-sqs');
import { Construct, Duration, Fn, Lazy, Stack, toSeconds } from '@aws-cdk/cdk';
import { Construct, Duration, Fn, Lazy, Stack, Token, toSeconds } from '@aws-cdk/cdk';
import { Code } from './code';
import { IEventSource } from './event-source';
import { FunctionAttributes, FunctionBase, IFunction } from './function-base';
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-lambda/test/integ.log-retention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ const stack = new cdk.Stack(app, 'aws-cdk-lambda-log-retention');
new lambda.Function(stack, 'OneWeek', {
code: new lambda.InlineCode('exports.handler = (event) => console.log(JSON.stringify(event));'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
logRetention: logs.RetentionDays.OneWeek
});

new lambda.Function(stack, 'OneMonth', {
code: new lambda.InlineCode('exports.handler = (event) => console.log(JSON.stringify(event));'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
logRetention: logs.RetentionDays.OneMonth
});

new lambda.Function(stack, 'OneYear', {
code: new lambda.InlineCode('exports.handler = (event) => console.log(JSON.stringify(event));'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
logRetention: logs.RetentionDays.OneYear
});

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/test/test.lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ export = {
new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS,
runtime: lambda.Runtime.Nodejs,
logRetention: logs.RetentionDays.OneMonth
});

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.