Skip to content

Commit

Permalink
Merge branch 'main' into ce-anomaly
Browse files Browse the repository at this point in the history
  • Loading branch information
jogold authored Jan 2, 2024
2 parents b0a1a01 + 5dd8072 commit 2525154
Show file tree
Hide file tree
Showing 128 changed files with 247 additions and 178 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Shout out to our top contributors!
- [rix0rrr](https://github.com/rix0rrr)
- [skinny85](https://github.com/skinny85)
- [RomainMuller](https://github.com/RomainMuller)
- [njlynch](https://github.com/njlynch)
- [kaizencc](https://github.com/kaizencc)
- [njlynch](https://github.com/njlynch)
- [jogold](https://github.com/jogold)
- [iliapolo](https://github.com/iliapolo)
- [corymhall](https://github.com/corymhall)
- [shivlaks](https://github.com/shivlaks)
- [otaviomacedo](https://github.com/otaviomacedo)
- [madeline-k](https://github.com/madeline-k)
- [NetaNir](https://github.com/NetaNir)
- [mrgrain](https://github.com/mrgrain)
- [NetaNir](https://github.com/NetaNir)
- [comcalvi](https://github.com/comcalvi)
- [robertd](https://github.com/robertd)
- [pahud](https://github.com/pahud)
Expand All @@ -22,11 +22,11 @@ Shout out to our top contributors!
- [TheRealAmazonKendra](https://github.com/TheRealAmazonKendra)
- [lpizzinidev](https://github.com/lpizzinidev)
- [colifran](https://github.com/colifran)
- [go-to-k](https://github.com/go-to-k)
- [nija-at](https://github.com/nija-at)
- [hoegertn](https://github.com/hoegertn)
- [watany-dev](https://github.com/watany-dev)
- [jumic](https://github.com/jumic)
- [SoManyHs](https://github.com/SoManyHs)


_Last updated: Fri, 01 Dec 23 00:09:47 +0000_
_Last updated: Mon, 01 Jan 24 00:09:50 +0000_
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/framework-integ/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/framework-integ/NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-staging-synthesizer-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-staging-synthesizer-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appconfig-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appconfig-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.

-------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apprunner-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apprunner-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloud9-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloud9-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codestar-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codestar-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cognito-identitypool-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cognito-identitypool-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-gamelift-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-gamelift-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-glue-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-glue-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-glue-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ See [documentation](https://docs.aws.amazon.com/glue/latest/dg/encryption-securi
A `Database` is a logical grouping of `Tables` in the Glue Catalog.

```ts
new glue.Database(this, 'MyDatabase');
new glue.Database(this, 'MyDatabase', {
databaseName: 'my_database',
description: 'my_database_description',
});
```

## Table
Expand Down
20 changes: 19 additions & 1 deletion packages/@aws-cdk/aws-glue-alpha/lib/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ export interface DatabaseProps {
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html
*/
readonly locationUri?: string;

/**
* A description of the database.
*
* @default - no database description
*/
readonly description?: string;
}

/**
Expand Down Expand Up @@ -96,8 +103,13 @@ export class Database extends Resource implements IDatabase {
}),
});

if (props.description !== undefined) {
validateDescription(props.description);
}

let databaseInput: CfnDatabase.DatabaseInputProperty = {
name: this.physicalName,
description: props.description,
};

if (props.locationUri !== undefined) {
Expand Down Expand Up @@ -133,6 +145,12 @@ export class Database extends Resource implements IDatabase {

function validateLocationUri(locationUri: string): void {
if (locationUri.length < 1 || locationUri.length > 1024) {
throw new Error(`locationUri length must be (inclusively) between 1 and 1024, but was ${locationUri.length}`);
throw new Error(`locationUri length must be (inclusively) between 1 and 1024, got ${locationUri.length}`);
}
}

function validateDescription(description: string): void {
if (description.length > 2048) {
throw new Error(`description length must be less than or equal to 2048, got ${description.length}`);
}
}
33 changes: 32 additions & 1 deletion packages/@aws-cdk/aws-glue-alpha/test/database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,29 @@ test('explicit locationURI', () => {

});

test('explicit description', () => {
new glue.Database(stack, 'Database', {
description: 'database-description',
});

Template.fromStack(stack).templateMatches({
Resources: {
DatabaseB269D8BB: {
Type: 'AWS::Glue::Database',
Properties: {
CatalogId: {
Ref: 'AWS::AccountId',
},
DatabaseInput: {
Description: 'database-description',
Name: 'database',
},
},
},
},
});
});

test('fromDatabase', () => {
// WHEN
const database = glue.Database.fromDatabaseArn(stack, 'import', 'arn:aws:glue:us-east-1:123456789012:database/db1');
Expand Down Expand Up @@ -85,7 +108,15 @@ test('locationUri length must be <= 1024', () => {
new glue.Database(stack, 'Database', {
locationUri: 'a'.repeat(1025),
}),
).toThrow();
).toThrow('locationUri length must be (inclusively) between 1 and 1024, got 1025');
});

test('description length must be <= 2048', () => {
expect(() =>
new glue.Database(stack, 'Database', {
description: 'a'.repeat(2049),
}),
).toThrow('description length must be less than or equal to 2048, got 2049');
});

test('can specify a physical name', () => {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"Ref": "AWS::AccountId"
},
"DatabaseInput": {
"Description": "my_database_description",
"Name": "my_database"
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-glue-alpha/test/integ.table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const bucket = new s3.Bucket(stack, 'DataBucket', {

const database = new glue.Database(stack, 'MyDatabase', {
databaseName: 'my_database',
description: 'my_database_description',
});

const columns = [{
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iot-actions-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iot-actions-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.

-------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iot-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iot-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iotevents-actions-alpha/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iotevents-actions-alpha/NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Loading

0 comments on commit 2525154

Please sign in to comment.