Skip to content

Commit 40295d2

Browse files
authored
chore(neptune): update readme to work with default fixture (#13477)
fixes #13476 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a7d314c commit 40295d2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/@aws-cdk/aws-neptune/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ versions and limitations.
6767
The following example shows enabling IAM authentication for a database cluster and granting connection access to an IAM role.
6868

6969
```ts
70-
const cluster = new rds.DatabaseCluster(stack, 'Cluster', {
70+
const cluster = new neptune.DatabaseCluster(this, 'Cluster', {
7171
vpc,
7272
instanceType: neptune.InstanceType.R5_LARGE,
7373
iamAuthentication: true, // Optional - will be automatically set if you call grantConnect().
7474
});
75-
const role = new Role(stack, 'DBRole', { assumedBy: new AccountPrincipal(stack.account) });
76-
instance.grantConnect(role); // Grant the role connection access to the DB.
75+
const role = new iam.Role(this, 'DBRole', { assumedBy: new iam.AccountPrincipal(this.account) });
76+
cluster.grantConnect(role); // Grant the role connection access to the DB.
7777
```
7878

7979
## Customizing parameters

packages/@aws-cdk/aws-neptune/rosetta/default.ts-fixture

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Duration, Stack } from '@aws-cdk/core';
22
import { Construct } from 'constructs';
3+
import * as iam from '@aws-cdk/aws-iam';
34
import * as ec2 from '@aws-cdk/aws-ec2';
45
import * as neptune from '@aws-cdk/aws-neptune';
56

0 commit comments

Comments
 (0)