From 40295d2178333cd6f95df661f5f1ce4ea038612d Mon Sep 17 00:00:00 2001 From: Sainath Mallidi Date: Tue, 9 Mar 2021 12:06:04 -0800 Subject: [PATCH] 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* --- packages/@aws-cdk/aws-neptune/README.md | 6 +++--- packages/@aws-cdk/aws-neptune/rosetta/default.ts-fixture | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-neptune/README.md b/packages/@aws-cdk/aws-neptune/README.md index 1be41b88a1022..57ecabab058be 100644 --- a/packages/@aws-cdk/aws-neptune/README.md +++ b/packages/@aws-cdk/aws-neptune/README.md @@ -67,13 +67,13 @@ versions and limitations. The following example shows enabling IAM authentication for a database cluster and granting connection access to an IAM role. ```ts -const cluster = new rds.DatabaseCluster(stack, 'Cluster', { +const cluster = new neptune.DatabaseCluster(this, 'Cluster', { vpc, instanceType: neptune.InstanceType.R5_LARGE, iamAuthentication: true, // Optional - will be automatically set if you call grantConnect(). }); -const role = new Role(stack, 'DBRole', { assumedBy: new AccountPrincipal(stack.account) }); -instance.grantConnect(role); // Grant the role connection access to the DB. +const role = new iam.Role(this, 'DBRole', { assumedBy: new iam.AccountPrincipal(this.account) }); +cluster.grantConnect(role); // Grant the role connection access to the DB. ``` ## Customizing parameters diff --git a/packages/@aws-cdk/aws-neptune/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-neptune/rosetta/default.ts-fixture index 2e687290371fa..63e17311b5dc5 100644 --- a/packages/@aws-cdk/aws-neptune/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/aws-neptune/rosetta/default.ts-fixture @@ -1,5 +1,6 @@ import { Duration, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; +import * as iam from '@aws-cdk/aws-iam'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as neptune from '@aws-cdk/aws-neptune';