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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename CloudTrail log retention
  • Loading branch information
RomainMuller committed Jun 20, 2019
commit 91dc9511054c59c551e2b07e4b39bcf8c7fe4bc9
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-cloudtrail/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface TrailProps {
*
* @default logs.RetentionDays.OneYear
*/
readonly cloudWatchLogsRetentionTimeDays?: logs.RetentionDays;
readonly cloudWatchLogsRetention?: logs.RetentionDays;

/** The AWS Key Management Service (AWS KMS) key ID that you want to use to encrypt CloudTrail logs.
*
Expand Down Expand Up @@ -151,7 +151,7 @@ export class Trail extends Resource {
let logsRole: iam.IRole | undefined;
if (props.sendToCloudWatchLogs) {
logGroup = new logs.CfnLogGroup(this, "LogGroup", {
retentionInDays: props.cloudWatchLogsRetentionTimeDays || logs.RetentionDays.ONE_YEAR
retentionInDays: props.cloudWatchLogsRetention || logs.RetentionDays.ONE_YEAR
});

logsRole = new iam.Role(this, 'LogsRole', { assumedBy: cloudTrailPrincipal });
Expand Down
6 changes: 0 additions & 6 deletions packages/@aws-cdk/aws-cloudtrail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@
"@aws-cdk/aws-s3": "^0.35.0",
"@aws-cdk/cdk": "^0.35.0"
},
"awslint": {
"exclude": [
"duration-prop-type:@aws-cdk/aws-cloudtrail.TrailProps.cloudWatchLogsRetentionTimeDays",
"duration-prop-name:@aws-cdk/aws-cloudtrail.TrailProps.cloudWatchLogsRetentionTimeDays"
]
},
"engines": {
"node": ">= 8.10.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudtrail/test/test.cloudtrail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export = {
const stack = getTestStack();
new Trail(stack, 'MyAmazingCloudTrail', {
sendToCloudWatchLogs: true,
cloudWatchLogsRetentionTimeDays: RetentionDays.ONE_WEEK
cloudWatchLogsRetention: RetentionDays.ONE_WEEK
});

expect(stack).to(haveResource("AWS::CloudTrail::Trail"));
Expand Down