Skip to content

Commit

Permalink
Merge branch 'main' into kinesis-firehouse-ca-west-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 4, 2024
2 parents 957bf52 + cd58b50 commit 399c3d0
Show file tree
Hide file tree
Showing 19 changed files with 2,533 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2190,3 +2190,13 @@ async function listChildren(parent: string, pred: (x: string) => Promise<boolean
async function listChildDirs(parent: string) {
return listChildren(parent, async (fullPath: string) => (await fs.stat(fullPath)).isDirectory());
}

integTest(
'cdk notices with --unacknowledged',
withDefaultFixture(async (fixture) => {
const noticesUnacknowledged = await fixture.cdk(['notices', '--unacknowledged'], { verbose: false });
const noticesUnacknowledgedAlias = await fixture.cdk(['notices', '-u'], { verbose: false });
expect(noticesUnacknowledged).toEqual(expect.stringMatching(/There are \d{1,} unacknowledged notice\(s\)./));
expect(noticesUnacknowledged).toEqual(noticesUnacknowledgedAlias);
}),
);
12 changes: 12 additions & 0 deletions packages/@aws-cdk/aws-neptune-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ new neptune.DatabaseCluster(this, 'Cluster', {
});
```

## Port

By default, Neptune uses port `8182`. You can override the default port by specifying the `port` property:

```ts
const cluster = new neptune.DatabaseCluster(this, 'Database', {
vpc,
instanceType: neptune.InstanceType.R5_LARGE,
port: 12345,
});
```

## Logging

Neptune supports various methods for monitoring performance and usage. One of those methods is logging
Expand Down
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ export interface DatabaseClusterProps {
* @default - false
*/
readonly copyTagsToSnapshot?: boolean;

/**
* The port number on which the DB instances in the DB cluster accept connections.
*
* @default 8182
*/
readonly port?: number;
}

/**
Expand Down Expand Up @@ -617,6 +624,7 @@ export class DatabaseCluster extends DatabaseClusterBase implements IDatabaseClu
deletionProtection: deletionProtection,
associatedRoles: props.associatedRoles ? props.associatedRoles.map(role => ({ roleArn: role.roleArn })) : undefined,
iamAuthEnabled: Lazy.any({ produce: () => this.enableIamAuthentication }),
dbPort: props.port,
// Backup
backupRetentionPeriod: props.backupRetention?.toDays(),
preferredBackupWindow: props.preferredBackupWindow,
Expand Down
18 changes: 18 additions & 0 deletions packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,24 @@ describe('DatabaseCluster', () => {
});
});

test('cluster with port', () => {
// GIVEN
const stack = testStack();
const vpc = new ec2.Vpc(stack, 'VPC');

// WHEN
new DatabaseCluster(stack, 'Database', {
vpc,
instanceType: InstanceType.R5_LARGE,
port: 1234,
});

// THEN
Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', {
DBPort: 1234,
});
});

test('cluster with imported parameter group', () => {
// GIVEN
const stack = testStack();
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.

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

Loading

0 comments on commit 399c3d0

Please sign in to comment.