@aws-cdk/aws-redshift-alpha 2.64.0-alpha.0 → 2.66.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +115 -64
- package/.jsii.tabl.json.gz +0 -0
- package/README.md +55 -0
- package/lib/cluster-parameter-change-reboot-handler/index.d.ts +1 -0
- package/lib/cluster-parameter-change-reboot-handler/index.js +56 -0
- package/lib/cluster.d.ts +22 -1
- package/lib/cluster.js +88 -5
- package/lib/database-secret.js +1 -1
- package/lib/endpoint.js +1 -1
- package/lib/parameter-group.js +1 -1
- package/lib/private/database-query-provider/privileges.d.ts +1 -1
- package/lib/private/database-query-provider/privileges.js +1 -1
- package/lib/private/database-query-provider/table.js +1 -1
- package/lib/private/database-query-provider/user.d.ts +1 -1
- package/lib/private/database-query-provider/user.js +1 -1
- package/lib/private/database-query-provider/util.d.ts +1 -1
- package/lib/private/database-query-provider/util.js +1 -1
- package/lib/private/database-query.js +1 -1
- package/lib/private/privileges.js +2 -2
- package/lib/subnet-group.js +1 -1
- package/lib/table.js +1 -1
- package/lib/user.js +1 -1
- package/package.json +9 -9
package/.jsii
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"aws-cdk-lib": "^2.66.0",
|
|
12
12
|
"constructs": "^10.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -3349,7 +3349,7 @@
|
|
|
3349
3349
|
"stability": "experimental"
|
|
3350
3350
|
},
|
|
3351
3351
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
3352
|
-
"jsiiVersion": "1.
|
|
3352
|
+
"jsiiVersion": "1.75.0 (build 63bb957)",
|
|
3353
3353
|
"keywords": [
|
|
3354
3354
|
"aws",
|
|
3355
3355
|
"cdk",
|
|
@@ -3370,7 +3370,7 @@
|
|
|
3370
3370
|
},
|
|
3371
3371
|
"name": "@aws-cdk/aws-redshift-alpha",
|
|
3372
3372
|
"readme": {
|
|
3373
|
-
"markdown": "# Amazon Redshift Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n## Starting a Redshift Cluster Database\n\nTo set up a Redshift cluster, define a `Cluster`. It will be launched in a VPC.\nYou can specify a VPC, otherwise one will be created. The nodes are always launched in private subnets and are encrypted by default.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\n\nconst vpc = new ec2.Vpc(this, 'Vpc');\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc\n});\n```\n\nBy default, the master password will be generated and stored in AWS Secrets Manager.\n\nA default database named `default_db` will be created in the cluster. To change the name of this database set the `defaultDatabaseName` attribute in the constructor properties.\n\nBy default, the cluster will not be publicly accessible.\nDepending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property.\n\n## Adding a logging bucket for database audit logging to S3\n\nAmazon Redshift logs information about connections and user activities in your database. These logs help you to monitor the database for security and troubleshooting purposes, a process called database auditing. To send these logs to an S3 bucket, specify the `loggingProperties` when creating a new cluster.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\n\nconst vpc = new ec2.Vpc(this, 'Vpc');\nconst bucket = s3.Bucket.fromBucketName(this, 'bucket', 'logging-bucket');\n\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n loggingProperties: {\n loggingBucket: bucket,\n loggingKeyPrefix: 'prefix',\n }\n});\n```\n\n## Connecting\n\nTo control who can access the cluster, use the `.connections` attribute. Redshift Clusters have\na default port, so you don't need to specify the port:\n\n```ts fixture=cluster\ncluster.connections.allowDefaultPortFromAnyIpv4('Open to the world');\n```\n\nThe endpoint to access your database cluster will be available as the `.clusterEndpoint` attribute:\n\n```ts fixture=cluster\ncluster.clusterEndpoint.socketAddress; // \"HOSTNAME:PORT\"\n```\n\n## Database Resources\n\nThis module allows for the creation of non-CloudFormation database resources such as users\nand tables. This allows you to manage identities, permissions, and stateful resources\nwithin your Redshift cluster from your CDK application.\n\nBecause these resources are not available in CloudFormation, this library leverages\n[custom\nresources](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html)\nto manage them. In addition to the IAM permissions required to make Redshift service\ncalls, the execution role for the custom resource handler requires database credentials to\ncreate resources within the cluster.\n\nThese database credentials can be supplied explicitly through the `adminUser` properties\nof the various database resource constructs. Alternatively, the credentials can be\nautomatically pulled from the Redshift cluster's default administrator\ncredentials. However, this option is only available if the password for the credentials\nwas generated by the CDK application (ie., no value vas provided for [the `masterPassword`\nproperty](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Login.html#masterpasswordspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)\nof\n[`Cluster.masterUser`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Cluster.html#masteruserspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)).\n\n### Creating Users\n\nCreate a user within a Redshift cluster database by instantiating a `User` construct. This\nwill generate a username and password, store the credentials in a [AWS Secrets Manager\n`Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html),\nand make a query to the Redshift cluster to create a new database user with the\ncredentials.\n\n```ts fixture=cluster\nnew User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nBy default, the user credentials are encrypted with your AWS account's default Secrets\nManager encryption key. You can specify the encryption key used for this purpose by\nsupplying a key in the `encryptionKey` property.\n\n```ts fixture=cluster\nimport * as kms from 'aws-cdk-lib/aws-kms';\n\nconst encryptionKey = new kms.Key(this, 'Key');\nnew User(this, 'User', {\n encryptionKey: encryptionKey,\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nBy default, a username is automatically generated from the user construct ID and its path\nin the construct tree. You can specify a particular username by providing a value for the\n`username` property. Usernames must be valid identifiers; see: [Names and\nidentifiers](https://docs.aws.amazon.com/redshift/latest/dg/r_names.html) in the *Amazon\nRedshift Database Developer Guide*.\n\n```ts fixture=cluster\nnew User(this, 'User', {\n username: 'myuser',\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nThe user password is generated by AWS Secrets Manager using the default configuration\nfound in\n[`secretsmanager.SecretStringGenerator`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.SecretStringGenerator.html),\nexcept with password length `30` and some SQL-incompliant characters excluded. The\nplaintext for the password will never be present in the CDK application; instead, a\n[CloudFormation Dynamic\nReference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)\nwill be used wherever the password value is required.\n\n### Creating Tables\n\nCreate a table within a Redshift cluster database by instantiating a `Table`\nconstruct. This will make a query to the Redshift cluster to create a new database table\nwith the supplied schema.\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nThe table can be configured to have distStyle attribute and a distKey column:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', distKey: true },\n { name: 'col2', dataType: 'float' },\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n distStyle: TableDistStyle.KEY,\n});\n```\n\nThe table can also be configured to have sortStyle attribute and sortKey columns:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', sortKey: true },\n { name: 'col2', dataType: 'float', sortKey: true },\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n sortStyle: TableSortStyle.COMPOUND,\n});\n```\n\nTables can also be configured with a comment:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)' },\n { name: 'col2', dataType: 'float' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n comment: 'This is a comment',\n});\n```\n\n### Granting Privileges\n\nYou can give a user privileges to perform certain actions on a table by using the\n`Table.grant()` method.\n\n```ts fixture=cluster\nconst user = new User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n});\nconst table = new Table(this, 'Table', {\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n\ntable.grant(user, TableAction.DROP, TableAction.SELECT);\n```\n\nTake care when managing privileges via the CDK, as attempting to manage a user's\nprivileges on the same table in multiple CDK applications could lead to accidentally\noverriding these permissions. Consider the following two CDK applications which both refer\nto the same user and table. In application 1, the resources are created and the user is\ngiven `INSERT` permissions on the table:\n\n```ts fixture=cluster\nconst databaseName = 'databaseName';\nconst username = 'myuser'\nconst tableName = 'mytable'\n\nconst user = new User(this, 'User', {\n username: username,\n cluster: cluster,\n databaseName: databaseName,\n});\nconst table = new Table(this, 'Table', {\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: databaseName,\n});\ntable.grant(user, TableAction.INSERT);\n```\n\nIn application 2, the resources are imported and the user is given `INSERT` permissions on\nthe table:\n\n```ts fixture=cluster\nconst databaseName = 'databaseName';\nconst username = 'myuser'\nconst tableName = 'mytable'\n\nconst user = User.fromUserAttributes(this, 'User', {\n username: username,\n password: SecretValue.unsafePlainText('NOT_FOR_PRODUCTION'),\n cluster: cluster,\n databaseName: databaseName,\n});\nconst table = Table.fromTableAttributes(this, 'Table', {\n tableName: tableName,\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: 'databaseName',\n});\ntable.grant(user, TableAction.INSERT);\n```\n\nBoth applications attempt to grant the user the appropriate privilege on the table by\nsubmitting a `GRANT USER` SQL query to the Redshift cluster. Note that the latter of these\ntwo calls will have no effect since the user has already been granted the privilege.\n\nNow, if application 1 were to remove the call to `grant`, a `REVOKE USER` SQL query is\nsubmitted to the Redshift cluster. In general, application 1 does not know that\napplication 2 has also granted this permission and thus cannot decide not to issue the\nrevocation. This leads to the undesirable state where application 2 still contains the\ncall to `grant` but the user does not have the specified permission.\n\nNote that this does not occur when duplicate privileges are granted within the same\napplication, as such privileges are de-duplicated before any SQL query is submitted.\n\n## Rotating credentials\n\nWhen the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically:\n\n```ts fixture=cluster\ncluster.addRotationSingleUser(); // Will rotate automatically after 30 days\n```\n\nThe multi user rotation scheme is also available:\n\n```ts fixture=cluster\n\nconst user = new User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n});\ncluster.addRotationMultiUser('MultiUserRotation', {\n secret: user.secret,\n});\n```\n\n## Adding Parameters\n\nYou can add a parameter to a parameter group with`ClusterParameterGroup.addParameter()`.\n\n```ts\nimport { ClusterParameterGroup } from '@aws-cdk/aws-redshift-alpha';\n\nconst params = new ClusterParameterGroup(this, 'Params', {\n description: 'desc',\n parameters: {\n require_ssl: 'true',\n },\n});\n\nparams.addParameter('enable_user_activity_logging', 'true');\n```\n\nAdditionally, you can add a parameter to the cluster's associated parameter group with `Cluster.addToParameterGroup()`. If the cluster does not have an associated parameter group, a new parameter group is created.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as cdk from 'aws-cdk-lib';\ndeclare const vpc: ec2.Vpc;\n\nconst cluster = new Cluster(this, 'Cluster', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n});\n\ncluster.addToParameterGroup('enable_user_activity_logging', 'true');\n```\n\n## Elastic IP\n\nIf you configure your cluster to be publicly accessible, you can optionally select an *elastic IP address* to use for the external IP address. An elastic IP address is a static IP address that is associated with your AWS account. You can use an elastic IP address to connect to your cluster from outside the VPC. An elastic IP address gives you the ability to change your underlying configuration without affecting the IP address that clients use to connect to your cluster. This approach can be helpful for situations such as recovery after a failure.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as cdk from 'aws-cdk-lib';\ndeclare const vpc: ec2.Vpc;\n\nnew Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n publiclyAccessible: true,\n elasticIp: '10.123.123.255', // A elastic ip you own\n})\n```\n\nIf the Cluster is in a VPC and you want to connect to it using the private IP address from within the cluster, it is important to enable *DNS resolution* and *DNS hostnames* in the VPC config. If these parameters would not be set, connections from within the VPC would connect to the elastic IP address and not the private IP address.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nconst vpc = new ec2.Vpc(this, 'VPC', {\n enableDnsSupport: true,\n enableDnsHostnames: true,\n});\n```\n\nNote that if there is already an existing, public accessible Cluster, which VPC configuration is changed to use *DNS hostnames* and *DNS resolution*, connections still use the elastic IP address until the cluster is resized.\n\n### Elastic IP vs. Cluster node public IP\n\nThe elastic IP address is an external IP address for accessing the cluster outside of a VPC. It's not related to the cluster node public IP addresses and private IP addresses that are accessible via the `clusterEndpoint` property. The public and private cluster node IP addresses appear regardless of whether the cluster is publicly accessible or not. They are used only in certain circumstances to configure ingress rules on the remote host. These circumstances occur when you load data from an Amazon EC2 instance or other remote host using a Secure Shell (SSH) connection.\n\n### Attach Elastic IP after Cluster creation\n\nIn some cases, you might want to associate the cluster with an elastic IP address or change an elastic IP address that is associated with the cluster. To attach an elastic IP address after the cluster is created, first update the cluster so that it is not publicly accessible, then make it both publicly accessible and add an Elastic IP address in the same operation.\n\n## Enhanced VPC Routing\n\nWhen you use Amazon Redshift enhanced VPC routing, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC) based on the Amazon VPC service. By using enhanced VPC routing, you can use standard VPC features, such as VPC security groups, network access control lists (ACLs), VPC endpoints, VPC endpoint policies, internet gateways, and Domain Name System (DNS) servers, as described in the Amazon VPC User Guide. You use these features to tightly manage the flow of data between your Amazon Redshift cluster and other resources. When you use enhanced VPC routing to route traffic through your VPC, you can also use VPC flow logs to monitor COPY and UNLOAD traffic.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as cdk from 'aws-cdk-lib';\ndeclare const vpc: ec2.Vpc;\n\nnew Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n enhancedVpcRouting: true,\n})\n```\n\nIf enhanced VPC routing is not enabled, Amazon Redshift routes traffic through the internet, including traffic to other services within the AWS network.\n\n## Default IAM role\n\nSome Amazon Redshift features require Amazon Redshift to access other AWS services on your behalf. For your Amazon Redshift clusters to act on your behalf, you supply security credentials to your clusters. The preferred method to supply security credentials is to specify an AWS Identity and Access Management (IAM) role.\n\nWhen you create an IAM role and set it as the default for the cluster using console, you don't have to provide the IAM role's Amazon Resource Name (ARN) to perform authentication and authorization.\n\n```ts\ndeclare const vpc: ec2.Vpc;\n\nconst defaultRole = new iam.Role(this, 'DefaultRole', {\n assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'),\n},\n);\n\nnew Cluster(stack, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n roles: [defaultRole],\n defaultRole: defaultRole,\n});\n```\n\nA default role can also be added to a cluster using the `addDefaultIamRole` method.\n\n```ts\ndeclare const vpc: ec2.Vpc;\n\nconst defaultRole = new iam.Role(this, 'DefaultRole', {\n assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'),\n},\n);\n\nconst redshiftCluster = new Cluster(stack, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n roles: [defaultRole],\n});\n\nredshiftCluster.addDefaultIamRole(defaultRole);\n```\n"
|
|
3373
|
+
"markdown": "# Amazon Redshift Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n## Starting a Redshift Cluster Database\n\nTo set up a Redshift cluster, define a `Cluster`. It will be launched in a VPC.\nYou can specify a VPC, otherwise one will be created. The nodes are always launched in private subnets and are encrypted by default.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\n\nconst vpc = new ec2.Vpc(this, 'Vpc');\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc\n});\n```\n\nBy default, the master password will be generated and stored in AWS Secrets Manager.\n\nA default database named `default_db` will be created in the cluster. To change the name of this database set the `defaultDatabaseName` attribute in the constructor properties.\n\nBy default, the cluster will not be publicly accessible.\nDepending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property.\n\n## Adding a logging bucket for database audit logging to S3\n\nAmazon Redshift logs information about connections and user activities in your database. These logs help you to monitor the database for security and troubleshooting purposes, a process called database auditing. To send these logs to an S3 bucket, specify the `loggingProperties` when creating a new cluster.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\n\nconst vpc = new ec2.Vpc(this, 'Vpc');\nconst bucket = s3.Bucket.fromBucketName(this, 'bucket', 'logging-bucket');\n\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n loggingProperties: {\n loggingBucket: bucket,\n loggingKeyPrefix: 'prefix',\n }\n});\n```\n\n## Connecting\n\nTo control who can access the cluster, use the `.connections` attribute. Redshift Clusters have\na default port, so you don't need to specify the port:\n\n```ts fixture=cluster\ncluster.connections.allowDefaultPortFromAnyIpv4('Open to the world');\n```\n\nThe endpoint to access your database cluster will be available as the `.clusterEndpoint` attribute:\n\n```ts fixture=cluster\ncluster.clusterEndpoint.socketAddress; // \"HOSTNAME:PORT\"\n```\n\n## Database Resources\n\nThis module allows for the creation of non-CloudFormation database resources such as users\nand tables. This allows you to manage identities, permissions, and stateful resources\nwithin your Redshift cluster from your CDK application.\n\nBecause these resources are not available in CloudFormation, this library leverages\n[custom\nresources](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html)\nto manage them. In addition to the IAM permissions required to make Redshift service\ncalls, the execution role for the custom resource handler requires database credentials to\ncreate resources within the cluster.\n\nThese database credentials can be supplied explicitly through the `adminUser` properties\nof the various database resource constructs. Alternatively, the credentials can be\nautomatically pulled from the Redshift cluster's default administrator\ncredentials. However, this option is only available if the password for the credentials\nwas generated by the CDK application (ie., no value vas provided for [the `masterPassword`\nproperty](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Login.html#masterpasswordspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)\nof\n[`Cluster.masterUser`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Cluster.html#masteruserspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)).\n\n### Creating Users\n\nCreate a user within a Redshift cluster database by instantiating a `User` construct. This\nwill generate a username and password, store the credentials in a [AWS Secrets Manager\n`Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html),\nand make a query to the Redshift cluster to create a new database user with the\ncredentials.\n\n```ts fixture=cluster\nnew User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nBy default, the user credentials are encrypted with your AWS account's default Secrets\nManager encryption key. You can specify the encryption key used for this purpose by\nsupplying a key in the `encryptionKey` property.\n\n```ts fixture=cluster\nimport * as kms from 'aws-cdk-lib/aws-kms';\n\nconst encryptionKey = new kms.Key(this, 'Key');\nnew User(this, 'User', {\n encryptionKey: encryptionKey,\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nBy default, a username is automatically generated from the user construct ID and its path\nin the construct tree. You can specify a particular username by providing a value for the\n`username` property. Usernames must be valid identifiers; see: [Names and\nidentifiers](https://docs.aws.amazon.com/redshift/latest/dg/r_names.html) in the *Amazon\nRedshift Database Developer Guide*.\n\n```ts fixture=cluster\nnew User(this, 'User', {\n username: 'myuser',\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nThe user password is generated by AWS Secrets Manager using the default configuration\nfound in\n[`secretsmanager.SecretStringGenerator`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.SecretStringGenerator.html),\nexcept with password length `30` and some SQL-incompliant characters excluded. The\nplaintext for the password will never be present in the CDK application; instead, a\n[CloudFormation Dynamic\nReference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)\nwill be used wherever the password value is required.\n\n### Creating Tables\n\nCreate a table within a Redshift cluster database by instantiating a `Table`\nconstruct. This will make a query to the Redshift cluster to create a new database table\nwith the supplied schema.\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nThe table can be configured to have distStyle attribute and a distKey column:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', distKey: true },\n { name: 'col2', dataType: 'float' },\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n distStyle: TableDistStyle.KEY,\n});\n```\n\nThe table can also be configured to have sortStyle attribute and sortKey columns:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', sortKey: true },\n { name: 'col2', dataType: 'float', sortKey: true },\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n sortStyle: TableSortStyle.COMPOUND,\n});\n```\n\nTables can also be configured with a comment:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)' },\n { name: 'col2', dataType: 'float' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n comment: 'This is a comment',\n});\n```\n\n### Granting Privileges\n\nYou can give a user privileges to perform certain actions on a table by using the\n`Table.grant()` method.\n\n```ts fixture=cluster\nconst user = new User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n});\nconst table = new Table(this, 'Table', {\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n\ntable.grant(user, TableAction.DROP, TableAction.SELECT);\n```\n\nTake care when managing privileges via the CDK, as attempting to manage a user's\nprivileges on the same table in multiple CDK applications could lead to accidentally\noverriding these permissions. Consider the following two CDK applications which both refer\nto the same user and table. In application 1, the resources are created and the user is\ngiven `INSERT` permissions on the table:\n\n```ts fixture=cluster\nconst databaseName = 'databaseName';\nconst username = 'myuser'\nconst tableName = 'mytable'\n\nconst user = new User(this, 'User', {\n username: username,\n cluster: cluster,\n databaseName: databaseName,\n});\nconst table = new Table(this, 'Table', {\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: databaseName,\n});\ntable.grant(user, TableAction.INSERT);\n```\n\nIn application 2, the resources are imported and the user is given `INSERT` permissions on\nthe table:\n\n```ts fixture=cluster\nconst databaseName = 'databaseName';\nconst username = 'myuser'\nconst tableName = 'mytable'\n\nconst user = User.fromUserAttributes(this, 'User', {\n username: username,\n password: SecretValue.unsafePlainText('NOT_FOR_PRODUCTION'),\n cluster: cluster,\n databaseName: databaseName,\n});\nconst table = Table.fromTableAttributes(this, 'Table', {\n tableName: tableName,\n tableColumns: [{ name: 'col1', dataType: 'varchar(4)' }, { name: 'col2', dataType: 'float' }],\n cluster: cluster,\n databaseName: 'databaseName',\n});\ntable.grant(user, TableAction.INSERT);\n```\n\nBoth applications attempt to grant the user the appropriate privilege on the table by\nsubmitting a `GRANT USER` SQL query to the Redshift cluster. Note that the latter of these\ntwo calls will have no effect since the user has already been granted the privilege.\n\nNow, if application 1 were to remove the call to `grant`, a `REVOKE USER` SQL query is\nsubmitted to the Redshift cluster. In general, application 1 does not know that\napplication 2 has also granted this permission and thus cannot decide not to issue the\nrevocation. This leads to the undesirable state where application 2 still contains the\ncall to `grant` but the user does not have the specified permission.\n\nNote that this does not occur when duplicate privileges are granted within the same\napplication, as such privileges are de-duplicated before any SQL query is submitted.\n\n## Rotating credentials\n\nWhen the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically:\n\n```ts fixture=cluster\ncluster.addRotationSingleUser(); // Will rotate automatically after 30 days\n```\n\nThe multi user rotation scheme is also available:\n\n```ts fixture=cluster\n\nconst user = new User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n});\ncluster.addRotationMultiUser('MultiUserRotation', {\n secret: user.secret,\n});\n```\n\n## Adding Parameters\n\nYou can add a parameter to a parameter group with`ClusterParameterGroup.addParameter()`.\n\n```ts\nimport { ClusterParameterGroup } from '@aws-cdk/aws-redshift-alpha';\n\nconst params = new ClusterParameterGroup(this, 'Params', {\n description: 'desc',\n parameters: {\n require_ssl: 'true',\n },\n});\n\nparams.addParameter('enable_user_activity_logging', 'true');\n```\n\nAdditionally, you can add a parameter to the cluster's associated parameter group with `Cluster.addToParameterGroup()`. If the cluster does not have an associated parameter group, a new parameter group is created.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as cdk from 'aws-cdk-lib';\ndeclare const vpc: ec2.Vpc;\n\nconst cluster = new Cluster(this, 'Cluster', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n});\n\ncluster.addToParameterGroup('enable_user_activity_logging', 'true');\n```\n\n## Rebooting for Parameter Updates\n\nIn most cases, existing clusters [must be manually rebooted](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) to apply parameter changes. You can automate parameter related reboots by setting the cluster's `rebootForParameterChanges` property to `true` , or by using `Cluster.enableRebootForParameterChanges()`.\n\n```ts\ndeclare const vpc: ec2.Vpc;\n\nconst cluster = new Cluster(this, 'Cluster', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n});\n\ncluster.addToParameterGroup('enable_user_activity_logging', 'true');\ncluster.enableRebootForParameterChanges()\n```\n\n## Elastic IP\n\nIf you configure your cluster to be publicly accessible, you can optionally select an *elastic IP address* to use for the external IP address. An elastic IP address is a static IP address that is associated with your AWS account. You can use an elastic IP address to connect to your cluster from outside the VPC. An elastic IP address gives you the ability to change your underlying configuration without affecting the IP address that clients use to connect to your cluster. This approach can be helpful for situations such as recovery after a failure.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as cdk from 'aws-cdk-lib';\ndeclare const vpc: ec2.Vpc;\n\nnew Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n publiclyAccessible: true,\n elasticIp: '10.123.123.255', // A elastic ip you own\n})\n```\n\nIf the Cluster is in a VPC and you want to connect to it using the private IP address from within the cluster, it is important to enable *DNS resolution* and *DNS hostnames* in the VPC config. If these parameters would not be set, connections from within the VPC would connect to the elastic IP address and not the private IP address.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nconst vpc = new ec2.Vpc(this, 'VPC', {\n enableDnsSupport: true,\n enableDnsHostnames: true,\n});\n```\n\nNote that if there is already an existing, public accessible Cluster, which VPC configuration is changed to use *DNS hostnames* and *DNS resolution*, connections still use the elastic IP address until the cluster is resized.\n\n### Elastic IP vs. Cluster node public IP\n\nThe elastic IP address is an external IP address for accessing the cluster outside of a VPC. It's not related to the cluster node public IP addresses and private IP addresses that are accessible via the `clusterEndpoint` property. The public and private cluster node IP addresses appear regardless of whether the cluster is publicly accessible or not. They are used only in certain circumstances to configure ingress rules on the remote host. These circumstances occur when you load data from an Amazon EC2 instance or other remote host using a Secure Shell (SSH) connection.\n\n### Attach Elastic IP after Cluster creation\n\nIn some cases, you might want to associate the cluster with an elastic IP address or change an elastic IP address that is associated with the cluster. To attach an elastic IP address after the cluster is created, first update the cluster so that it is not publicly accessible, then make it both publicly accessible and add an Elastic IP address in the same operation.\n\n## Enhanced VPC Routing\n\nWhen you use Amazon Redshift enhanced VPC routing, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC) based on the Amazon VPC service. By using enhanced VPC routing, you can use standard VPC features, such as VPC security groups, network access control lists (ACLs), VPC endpoints, VPC endpoint policies, internet gateways, and Domain Name System (DNS) servers, as described in the Amazon VPC User Guide. You use these features to tightly manage the flow of data between your Amazon Redshift cluster and other resources. When you use enhanced VPC routing to route traffic through your VPC, you can also use VPC flow logs to monitor COPY and UNLOAD traffic.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as cdk from 'aws-cdk-lib';\ndeclare const vpc: ec2.Vpc;\n\nnew Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n enhancedVpcRouting: true,\n})\n```\n\nIf enhanced VPC routing is not enabled, Amazon Redshift routes traffic through the internet, including traffic to other services within the AWS network.\n\n## Default IAM role\n\nSome Amazon Redshift features require Amazon Redshift to access other AWS services on your behalf. For your Amazon Redshift clusters to act on your behalf, you supply security credentials to your clusters. The preferred method to supply security credentials is to specify an AWS Identity and Access Management (IAM) role.\n\nWhen you create an IAM role and set it as the default for the cluster using console, you don't have to provide the IAM role's Amazon Resource Name (ARN) to perform authentication and authorization.\n\n```ts\ndeclare const vpc: ec2.Vpc;\n\nconst defaultRole = new iam.Role(this, 'DefaultRole', {\n assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'),\n},\n);\n\nnew Cluster(stack, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n roles: [defaultRole],\n defaultRole: defaultRole,\n});\n```\n\nA default role can also be added to a cluster using the `addDefaultIamRole` method.\n\n```ts\ndeclare const vpc: ec2.Vpc;\n\nconst defaultRole = new iam.Role(this, 'DefaultRole', {\n assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'),\n},\n);\n\nconst redshiftCluster = new Cluster(stack, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n roles: [defaultRole],\n});\n\nredshiftCluster.addDefaultIamRole(defaultRole);\n```\n\n## IAM roles\n\nAttaching IAM roles to a Redshift Cluster grants permissions to the Redshift service to perform actions on your behalf.\n\n```ts\ndeclare const vpc: ec2.Vpc\n\nconst role = new iam.Role(this, 'Role', {\n assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'),\n});\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n roles: [role],\n});\n```\n\nAdditional IAM roles can be attached to a cluster using the `addIamRole` method.\n\n```ts\ndeclare const vpc: ec2.Vpc\n\nconst role = new iam.Role(this, 'Role', {\n assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'),\n});\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n});\ncluster.addIamRole(role);\n```\n"
|
|
3374
3374
|
},
|
|
3375
3375
|
"repository": {
|
|
3376
3376
|
"directory": "packages/individual-packages/aws-redshift",
|
|
@@ -3427,7 +3427,7 @@
|
|
|
3427
3427
|
},
|
|
3428
3428
|
"locationInModule": {
|
|
3429
3429
|
"filename": "lib/cluster.ts",
|
|
3430
|
-
"line":
|
|
3430
|
+
"line": 487
|
|
3431
3431
|
},
|
|
3432
3432
|
"parameters": [
|
|
3433
3433
|
{
|
|
@@ -3456,7 +3456,7 @@
|
|
|
3456
3456
|
"kind": "class",
|
|
3457
3457
|
"locationInModule": {
|
|
3458
3458
|
"filename": "lib/cluster.ts",
|
|
3459
|
-
"line":
|
|
3459
|
+
"line": 420
|
|
3460
3460
|
},
|
|
3461
3461
|
"methods": [
|
|
3462
3462
|
{
|
|
@@ -3466,7 +3466,7 @@
|
|
|
3466
3466
|
},
|
|
3467
3467
|
"locationInModule": {
|
|
3468
3468
|
"filename": "lib/cluster.ts",
|
|
3469
|
-
"line":
|
|
3469
|
+
"line": 424
|
|
3470
3470
|
},
|
|
3471
3471
|
"name": "fromClusterAttributes",
|
|
3472
3472
|
"parameters": [
|
|
@@ -3504,7 +3504,7 @@
|
|
|
3504
3504
|
},
|
|
3505
3505
|
"locationInModule": {
|
|
3506
3506
|
"filename": "lib/cluster.ts",
|
|
3507
|
-
"line":
|
|
3507
|
+
"line": 771
|
|
3508
3508
|
},
|
|
3509
3509
|
"name": "addDefaultIamRole",
|
|
3510
3510
|
"parameters": [
|
|
@@ -3519,6 +3519,28 @@
|
|
|
3519
3519
|
}
|
|
3520
3520
|
]
|
|
3521
3521
|
},
|
|
3522
|
+
{
|
|
3523
|
+
"docs": {
|
|
3524
|
+
"stability": "experimental",
|
|
3525
|
+
"summary": "Adds a role to the cluster."
|
|
3526
|
+
},
|
|
3527
|
+
"locationInModule": {
|
|
3528
|
+
"filename": "lib/cluster.ts",
|
|
3529
|
+
"line": 825
|
|
3530
|
+
},
|
|
3531
|
+
"name": "addIamRole",
|
|
3532
|
+
"parameters": [
|
|
3533
|
+
{
|
|
3534
|
+
"docs": {
|
|
3535
|
+
"summary": "the role to add."
|
|
3536
|
+
},
|
|
3537
|
+
"name": "role",
|
|
3538
|
+
"type": {
|
|
3539
|
+
"fqn": "aws-cdk-lib.aws_iam.IRole"
|
|
3540
|
+
}
|
|
3541
|
+
}
|
|
3542
|
+
]
|
|
3543
|
+
},
|
|
3522
3544
|
{
|
|
3523
3545
|
"docs": {
|
|
3524
3546
|
"stability": "experimental",
|
|
@@ -3526,7 +3548,7 @@
|
|
|
3526
3548
|
},
|
|
3527
3549
|
"locationInModule": {
|
|
3528
3550
|
"filename": "lib/cluster.ts",
|
|
3529
|
-
"line":
|
|
3551
|
+
"line": 645
|
|
3530
3552
|
},
|
|
3531
3553
|
"name": "addRotationMultiUser",
|
|
3532
3554
|
"parameters": [
|
|
@@ -3556,7 +3578,7 @@
|
|
|
3556
3578
|
},
|
|
3557
3579
|
"locationInModule": {
|
|
3558
3580
|
"filename": "lib/cluster.ts",
|
|
3559
|
-
"line":
|
|
3581
|
+
"line": 621
|
|
3560
3582
|
},
|
|
3561
3583
|
"name": "addRotationSingleUser",
|
|
3562
3584
|
"parameters": [
|
|
@@ -3584,7 +3606,7 @@
|
|
|
3584
3606
|
},
|
|
3585
3607
|
"locationInModule": {
|
|
3586
3608
|
"filename": "lib/cluster.ts",
|
|
3587
|
-
"line":
|
|
3609
|
+
"line": 685
|
|
3588
3610
|
},
|
|
3589
3611
|
"name": "addToParameterGroup",
|
|
3590
3612
|
"parameters": [
|
|
@@ -3615,7 +3637,7 @@
|
|
|
3615
3637
|
},
|
|
3616
3638
|
"locationInModule": {
|
|
3617
3639
|
"filename": "lib/cluster.ts",
|
|
3618
|
-
"line":
|
|
3640
|
+
"line": 407
|
|
3619
3641
|
},
|
|
3620
3642
|
"name": "asSecretAttachmentTarget",
|
|
3621
3643
|
"overrides": "aws-cdk-lib.aws_secretsmanager.ISecretAttachmentTarget",
|
|
@@ -3624,6 +3646,17 @@
|
|
|
3624
3646
|
"fqn": "aws-cdk-lib.aws_secretsmanager.SecretAttachmentTargetProps"
|
|
3625
3647
|
}
|
|
3626
3648
|
}
|
|
3649
|
+
},
|
|
3650
|
+
{
|
|
3651
|
+
"docs": {
|
|
3652
|
+
"stability": "experimental",
|
|
3653
|
+
"summary": "Enables automatic cluster rebooting when changes to the cluster's parameter group require a restart to apply."
|
|
3654
|
+
},
|
|
3655
|
+
"locationInModule": {
|
|
3656
|
+
"filename": "lib/cluster.ts",
|
|
3657
|
+
"line": 704
|
|
3658
|
+
},
|
|
3659
|
+
"name": "enableRebootForParameterChanges"
|
|
3627
3660
|
}
|
|
3628
3661
|
],
|
|
3629
3662
|
"name": "Cluster",
|
|
@@ -3636,7 +3669,7 @@
|
|
|
3636
3669
|
"immutable": true,
|
|
3637
3670
|
"locationInModule": {
|
|
3638
3671
|
"filename": "lib/cluster.ts",
|
|
3639
|
-
"line":
|
|
3672
|
+
"line": 445
|
|
3640
3673
|
},
|
|
3641
3674
|
"name": "clusterEndpoint",
|
|
3642
3675
|
"overrides": "@aws-cdk/aws-redshift-alpha.ICluster",
|
|
@@ -3652,7 +3685,7 @@
|
|
|
3652
3685
|
"immutable": true,
|
|
3653
3686
|
"locationInModule": {
|
|
3654
3687
|
"filename": "lib/cluster.ts",
|
|
3655
|
-
"line":
|
|
3688
|
+
"line": 440
|
|
3656
3689
|
},
|
|
3657
3690
|
"name": "clusterName",
|
|
3658
3691
|
"overrides": "@aws-cdk/aws-redshift-alpha.ICluster",
|
|
@@ -3668,7 +3701,7 @@
|
|
|
3668
3701
|
"immutable": true,
|
|
3669
3702
|
"locationInModule": {
|
|
3670
3703
|
"filename": "lib/cluster.ts",
|
|
3671
|
-
"line":
|
|
3704
|
+
"line": 450
|
|
3672
3705
|
},
|
|
3673
3706
|
"name": "connections",
|
|
3674
3707
|
"overrides": "aws-cdk-lib.aws_ec2.IConnectable",
|
|
@@ -3684,7 +3717,7 @@
|
|
|
3684
3717
|
"immutable": true,
|
|
3685
3718
|
"locationInModule": {
|
|
3686
3719
|
"filename": "lib/cluster.ts",
|
|
3687
|
-
"line":
|
|
3720
|
+
"line": 455
|
|
3688
3721
|
},
|
|
3689
3722
|
"name": "secret",
|
|
3690
3723
|
"optional": true,
|
|
@@ -3699,7 +3732,7 @@
|
|
|
3699
3732
|
},
|
|
3700
3733
|
"locationInModule": {
|
|
3701
3734
|
"filename": "lib/cluster.ts",
|
|
3702
|
-
"line":
|
|
3735
|
+
"line": 478
|
|
3703
3736
|
},
|
|
3704
3737
|
"name": "parameterGroup",
|
|
3705
3738
|
"optional": true,
|
|
@@ -3726,7 +3759,7 @@
|
|
|
3726
3759
|
"kind": "interface",
|
|
3727
3760
|
"locationInModule": {
|
|
3728
3761
|
"filename": "lib/cluster.ts",
|
|
3729
|
-
"line":
|
|
3762
|
+
"line": 170
|
|
3730
3763
|
},
|
|
3731
3764
|
"name": "ClusterAttributes",
|
|
3732
3765
|
"properties": [
|
|
@@ -3739,7 +3772,7 @@
|
|
|
3739
3772
|
"immutable": true,
|
|
3740
3773
|
"locationInModule": {
|
|
3741
3774
|
"filename": "lib/cluster.ts",
|
|
3742
|
-
"line":
|
|
3775
|
+
"line": 186
|
|
3743
3776
|
},
|
|
3744
3777
|
"name": "clusterEndpointAddress",
|
|
3745
3778
|
"type": {
|
|
@@ -3755,7 +3788,7 @@
|
|
|
3755
3788
|
"immutable": true,
|
|
3756
3789
|
"locationInModule": {
|
|
3757
3790
|
"filename": "lib/cluster.ts",
|
|
3758
|
-
"line":
|
|
3791
|
+
"line": 191
|
|
3759
3792
|
},
|
|
3760
3793
|
"name": "clusterEndpointPort",
|
|
3761
3794
|
"type": {
|
|
@@ -3771,7 +3804,7 @@
|
|
|
3771
3804
|
"immutable": true,
|
|
3772
3805
|
"locationInModule": {
|
|
3773
3806
|
"filename": "lib/cluster.ts",
|
|
3774
|
-
"line":
|
|
3807
|
+
"line": 181
|
|
3775
3808
|
},
|
|
3776
3809
|
"name": "clusterName",
|
|
3777
3810
|
"type": {
|
|
@@ -3788,7 +3821,7 @@
|
|
|
3788
3821
|
"immutable": true,
|
|
3789
3822
|
"locationInModule": {
|
|
3790
3823
|
"filename": "lib/cluster.ts",
|
|
3791
|
-
"line":
|
|
3824
|
+
"line": 176
|
|
3792
3825
|
},
|
|
3793
3826
|
"name": "securityGroups",
|
|
3794
3827
|
"optional": true,
|
|
@@ -4041,7 +4074,7 @@
|
|
|
4041
4074
|
"kind": "interface",
|
|
4042
4075
|
"locationInModule": {
|
|
4043
4076
|
"filename": "lib/cluster.ts",
|
|
4044
|
-
"line":
|
|
4077
|
+
"line": 198
|
|
4045
4078
|
},
|
|
4046
4079
|
"name": "ClusterProps",
|
|
4047
4080
|
"properties": [
|
|
@@ -4054,7 +4087,7 @@
|
|
|
4054
4087
|
"immutable": true,
|
|
4055
4088
|
"locationInModule": {
|
|
4056
4089
|
"filename": "lib/cluster.ts",
|
|
4057
|
-
"line":
|
|
4090
|
+
"line": 299
|
|
4058
4091
|
},
|
|
4059
4092
|
"name": "masterUser",
|
|
4060
4093
|
"type": {
|
|
@@ -4070,7 +4103,7 @@
|
|
|
4070
4103
|
"immutable": true,
|
|
4071
4104
|
"locationInModule": {
|
|
4072
4105
|
"filename": "lib/cluster.ts",
|
|
4073
|
-
"line":
|
|
4106
|
+
"line": 273
|
|
4074
4107
|
},
|
|
4075
4108
|
"name": "vpc",
|
|
4076
4109
|
"type": {
|
|
@@ -4089,7 +4122,7 @@
|
|
|
4089
4122
|
"immutable": true,
|
|
4090
4123
|
"locationInModule": {
|
|
4091
4124
|
"filename": "lib/cluster.ts",
|
|
4092
|
-
"line":
|
|
4125
|
+
"line": 357
|
|
4093
4126
|
},
|
|
4094
4127
|
"name": "classicResizing",
|
|
4095
4128
|
"optional": true,
|
|
@@ -4107,7 +4140,7 @@
|
|
|
4107
4140
|
"immutable": true,
|
|
4108
4141
|
"locationInModule": {
|
|
4109
4142
|
"filename": "lib/cluster.ts",
|
|
4110
|
-
"line":
|
|
4143
|
+
"line": 205
|
|
4111
4144
|
},
|
|
4112
4145
|
"name": "clusterName",
|
|
4113
4146
|
"optional": true,
|
|
@@ -4125,7 +4158,7 @@
|
|
|
4125
4158
|
"immutable": true,
|
|
4126
4159
|
"locationInModule": {
|
|
4127
4160
|
"filename": "lib/cluster.ts",
|
|
4128
|
-
"line":
|
|
4161
|
+
"line": 236
|
|
4129
4162
|
},
|
|
4130
4163
|
"name": "clusterType",
|
|
4131
4164
|
"optional": true,
|
|
@@ -4143,7 +4176,7 @@
|
|
|
4143
4176
|
"immutable": true,
|
|
4144
4177
|
"locationInModule": {
|
|
4145
4178
|
"filename": "lib/cluster.ts",
|
|
4146
|
-
"line":
|
|
4179
|
+
"line": 322
|
|
4147
4180
|
},
|
|
4148
4181
|
"name": "defaultDatabaseName",
|
|
4149
4182
|
"optional": true,
|
|
@@ -4162,7 +4195,7 @@
|
|
|
4162
4195
|
"immutable": true,
|
|
4163
4196
|
"locationInModule": {
|
|
4164
4197
|
"filename": "lib/cluster.ts",
|
|
4165
|
-
"line":
|
|
4198
|
+
"line": 315
|
|
4166
4199
|
},
|
|
4167
4200
|
"name": "defaultRole",
|
|
4168
4201
|
"optional": true,
|
|
@@ -4181,7 +4214,7 @@
|
|
|
4181
4214
|
"immutable": true,
|
|
4182
4215
|
"locationInModule": {
|
|
4183
4216
|
"filename": "lib/cluster.ts",
|
|
4184
|
-
"line":
|
|
4217
|
+
"line": 366
|
|
4185
4218
|
},
|
|
4186
4219
|
"name": "elasticIp",
|
|
4187
4220
|
"optional": true,
|
|
@@ -4199,7 +4232,7 @@
|
|
|
4199
4232
|
"immutable": true,
|
|
4200
4233
|
"locationInModule": {
|
|
4201
4234
|
"filename": "lib/cluster.ts",
|
|
4202
|
-
"line":
|
|
4235
|
+
"line": 250
|
|
4203
4236
|
},
|
|
4204
4237
|
"name": "encrypted",
|
|
4205
4238
|
"optional": true,
|
|
@@ -4217,7 +4250,7 @@
|
|
|
4217
4250
|
"immutable": true,
|
|
4218
4251
|
"locationInModule": {
|
|
4219
4252
|
"filename": "lib/cluster.ts",
|
|
4220
|
-
"line":
|
|
4253
|
+
"line": 257
|
|
4221
4254
|
},
|
|
4222
4255
|
"name": "encryptionKey",
|
|
4223
4256
|
"optional": true,
|
|
@@ -4236,7 +4269,7 @@
|
|
|
4236
4269
|
"immutable": true,
|
|
4237
4270
|
"locationInModule": {
|
|
4238
4271
|
"filename": "lib/cluster.ts",
|
|
4239
|
-
"line":
|
|
4272
|
+
"line": 381
|
|
4240
4273
|
},
|
|
4241
4274
|
"name": "enhancedVpcRouting",
|
|
4242
4275
|
"optional": true,
|
|
@@ -4254,7 +4287,7 @@
|
|
|
4254
4287
|
"immutable": true,
|
|
4255
4288
|
"locationInModule": {
|
|
4256
4289
|
"filename": "lib/cluster.ts",
|
|
4257
|
-
"line":
|
|
4290
|
+
"line": 329
|
|
4258
4291
|
},
|
|
4259
4292
|
"name": "loggingProperties",
|
|
4260
4293
|
"optional": true,
|
|
@@ -4272,7 +4305,7 @@
|
|
|
4272
4305
|
"immutable": true,
|
|
4273
4306
|
"locationInModule": {
|
|
4274
4307
|
"filename": "lib/cluster.ts",
|
|
4275
|
-
"line":
|
|
4308
|
+
"line": 229
|
|
4276
4309
|
},
|
|
4277
4310
|
"name": "nodeType",
|
|
4278
4311
|
"optional": true,
|
|
@@ -4291,7 +4324,7 @@
|
|
|
4291
4324
|
"immutable": true,
|
|
4292
4325
|
"locationInModule": {
|
|
4293
4326
|
"filename": "lib/cluster.ts",
|
|
4294
|
-
"line":
|
|
4327
|
+
"line": 222
|
|
4295
4328
|
},
|
|
4296
4329
|
"name": "numberOfNodes",
|
|
4297
4330
|
"optional": true,
|
|
@@ -4309,7 +4342,7 @@
|
|
|
4309
4342
|
"immutable": true,
|
|
4310
4343
|
"locationInModule": {
|
|
4311
4344
|
"filename": "lib/cluster.ts",
|
|
4312
|
-
"line":
|
|
4345
|
+
"line": 213
|
|
4313
4346
|
},
|
|
4314
4347
|
"name": "parameterGroup",
|
|
4315
4348
|
"optional": true,
|
|
@@ -4327,7 +4360,7 @@
|
|
|
4327
4360
|
"immutable": true,
|
|
4328
4361
|
"locationInModule": {
|
|
4329
4362
|
"filename": "lib/cluster.ts",
|
|
4330
|
-
"line":
|
|
4363
|
+
"line": 243
|
|
4331
4364
|
},
|
|
4332
4365
|
"name": "port",
|
|
4333
4366
|
"optional": true,
|
|
@@ -4347,7 +4380,7 @@
|
|
|
4347
4380
|
"immutable": true,
|
|
4348
4381
|
"locationInModule": {
|
|
4349
4382
|
"filename": "lib/cluster.ts",
|
|
4350
|
-
"line":
|
|
4383
|
+
"line": 268
|
|
4351
4384
|
},
|
|
4352
4385
|
"name": "preferredMaintenanceWindow",
|
|
4353
4386
|
"optional": true,
|
|
@@ -4365,7 +4398,7 @@
|
|
|
4365
4398
|
"immutable": true,
|
|
4366
4399
|
"locationInModule": {
|
|
4367
4400
|
"filename": "lib/cluster.ts",
|
|
4368
|
-
"line":
|
|
4401
|
+
"line": 344
|
|
4369
4402
|
},
|
|
4370
4403
|
"name": "publiclyAccessible",
|
|
4371
4404
|
"optional": true,
|
|
@@ -4373,6 +4406,24 @@
|
|
|
4373
4406
|
"primitive": "boolean"
|
|
4374
4407
|
}
|
|
4375
4408
|
},
|
|
4409
|
+
{
|
|
4410
|
+
"abstract": true,
|
|
4411
|
+
"docs": {
|
|
4412
|
+
"default": "false",
|
|
4413
|
+
"stability": "experimental",
|
|
4414
|
+
"summary": "If this flag is set, the cluster will be rebooted when changes to the cluster's parameter group that require a restart to apply."
|
|
4415
|
+
},
|
|
4416
|
+
"immutable": true,
|
|
4417
|
+
"locationInModule": {
|
|
4418
|
+
"filename": "lib/cluster.ts",
|
|
4419
|
+
"line": 372
|
|
4420
|
+
},
|
|
4421
|
+
"name": "rebootForParameterChanges",
|
|
4422
|
+
"optional": true,
|
|
4423
|
+
"type": {
|
|
4424
|
+
"primitive": "boolean"
|
|
4425
|
+
}
|
|
4426
|
+
},
|
|
4376
4427
|
{
|
|
4377
4428
|
"abstract": true,
|
|
4378
4429
|
"docs": {
|
|
@@ -4383,7 +4434,7 @@
|
|
|
4383
4434
|
"immutable": true,
|
|
4384
4435
|
"locationInModule": {
|
|
4385
4436
|
"filename": "lib/cluster.ts",
|
|
4386
|
-
"line":
|
|
4437
|
+
"line": 337
|
|
4387
4438
|
},
|
|
4388
4439
|
"name": "removalPolicy",
|
|
4389
4440
|
"optional": true,
|
|
@@ -4395,14 +4446,14 @@
|
|
|
4395
4446
|
"abstract": true,
|
|
4396
4447
|
"docs": {
|
|
4397
4448
|
"default": "- No role is attached to the cluster.",
|
|
4398
|
-
"remarks": "
|
|
4449
|
+
"remarks": "The maximum number of roles to attach to a cluster is subject to a quota.",
|
|
4399
4450
|
"stability": "experimental",
|
|
4400
4451
|
"summary": "A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services."
|
|
4401
4452
|
},
|
|
4402
4453
|
"immutable": true,
|
|
4403
4454
|
"locationInModule": {
|
|
4404
4455
|
"filename": "lib/cluster.ts",
|
|
4405
|
-
"line":
|
|
4456
|
+
"line": 307
|
|
4406
4457
|
},
|
|
4407
4458
|
"name": "roles",
|
|
4408
4459
|
"optional": true,
|
|
@@ -4425,7 +4476,7 @@
|
|
|
4425
4476
|
"immutable": true,
|
|
4426
4477
|
"locationInModule": {
|
|
4427
4478
|
"filename": "lib/cluster.ts",
|
|
4428
|
-
"line":
|
|
4479
|
+
"line": 287
|
|
4429
4480
|
},
|
|
4430
4481
|
"name": "securityGroups",
|
|
4431
4482
|
"optional": true,
|
|
@@ -4448,7 +4499,7 @@
|
|
|
4448
4499
|
"immutable": true,
|
|
4449
4500
|
"locationInModule": {
|
|
4450
4501
|
"filename": "lib/cluster.ts",
|
|
4451
|
-
"line":
|
|
4502
|
+
"line": 294
|
|
4452
4503
|
},
|
|
4453
4504
|
"name": "subnetGroup",
|
|
4454
4505
|
"optional": true,
|
|
@@ -4466,7 +4517,7 @@
|
|
|
4466
4517
|
"immutable": true,
|
|
4467
4518
|
"locationInModule": {
|
|
4468
4519
|
"filename": "lib/cluster.ts",
|
|
4469
|
-
"line":
|
|
4520
|
+
"line": 280
|
|
4470
4521
|
},
|
|
4471
4522
|
"name": "vpcSubnets",
|
|
4472
4523
|
"optional": true,
|
|
@@ -4688,7 +4739,7 @@
|
|
|
4688
4739
|
"kind": "enum",
|
|
4689
4740
|
"locationInModule": {
|
|
4690
4741
|
"filename": "lib/cluster.ts",
|
|
4691
|
-
"line":
|
|
4742
|
+
"line": 63
|
|
4692
4743
|
},
|
|
4693
4744
|
"members": [
|
|
4694
4745
|
{
|
|
@@ -5085,7 +5136,7 @@
|
|
|
5085
5136
|
"kind": "interface",
|
|
5086
5137
|
"locationInModule": {
|
|
5087
5138
|
"filename": "lib/cluster.ts",
|
|
5088
|
-
"line":
|
|
5139
|
+
"line": 151
|
|
5089
5140
|
},
|
|
5090
5141
|
"name": "ICluster",
|
|
5091
5142
|
"properties": [
|
|
@@ -5101,7 +5152,7 @@
|
|
|
5101
5152
|
"immutable": true,
|
|
5102
5153
|
"locationInModule": {
|
|
5103
5154
|
"filename": "lib/cluster.ts",
|
|
5104
|
-
"line":
|
|
5155
|
+
"line": 164
|
|
5105
5156
|
},
|
|
5106
5157
|
"name": "clusterEndpoint",
|
|
5107
5158
|
"type": {
|
|
@@ -5120,7 +5171,7 @@
|
|
|
5120
5171
|
"immutable": true,
|
|
5121
5172
|
"locationInModule": {
|
|
5122
5173
|
"filename": "lib/cluster.ts",
|
|
5123
|
-
"line":
|
|
5174
|
+
"line": 157
|
|
5124
5175
|
},
|
|
5125
5176
|
"name": "clusterName",
|
|
5126
5177
|
"type": {
|
|
@@ -5456,7 +5507,7 @@
|
|
|
5456
5507
|
"kind": "interface",
|
|
5457
5508
|
"locationInModule": {
|
|
5458
5509
|
"filename": "lib/cluster.ts",
|
|
5459
|
-
"line":
|
|
5510
|
+
"line": 103
|
|
5460
5511
|
},
|
|
5461
5512
|
"name": "LoggingProperties",
|
|
5462
5513
|
"properties": [
|
|
@@ -5470,7 +5521,7 @@
|
|
|
5470
5521
|
"immutable": true,
|
|
5471
5522
|
"locationInModule": {
|
|
5472
5523
|
"filename": "lib/cluster.ts",
|
|
5473
|
-
"line":
|
|
5524
|
+
"line": 109
|
|
5474
5525
|
},
|
|
5475
5526
|
"name": "loggingBucket",
|
|
5476
5527
|
"type": {
|
|
@@ -5486,7 +5537,7 @@
|
|
|
5486
5537
|
"immutable": true,
|
|
5487
5538
|
"locationInModule": {
|
|
5488
5539
|
"filename": "lib/cluster.ts",
|
|
5489
|
-
"line":
|
|
5540
|
+
"line": 115
|
|
5490
5541
|
},
|
|
5491
5542
|
"name": "loggingKeyPrefix",
|
|
5492
5543
|
"type": {
|
|
@@ -5502,16 +5553,16 @@
|
|
|
5502
5553
|
"docs": {
|
|
5503
5554
|
"stability": "experimental",
|
|
5504
5555
|
"summary": "Username and password combination.",
|
|
5505
|
-
"example": "
|
|
5556
|
+
"example": "import * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as cdk from 'aws-cdk-lib';\ndeclare const vpc: ec2.Vpc;\n\nnew Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),\n },\n vpc,\n enhancedVpcRouting: true,\n})",
|
|
5506
5557
|
"custom": {
|
|
5507
|
-
"exampleMetadata": "
|
|
5558
|
+
"exampleMetadata": "infused"
|
|
5508
5559
|
}
|
|
5509
5560
|
},
|
|
5510
5561
|
"fqn": "@aws-cdk/aws-redshift-alpha.Login",
|
|
5511
5562
|
"kind": "interface",
|
|
5512
5563
|
"locationInModule": {
|
|
5513
5564
|
"filename": "lib/cluster.ts",
|
|
5514
|
-
"line":
|
|
5565
|
+
"line": 77
|
|
5515
5566
|
},
|
|
5516
5567
|
"name": "Login",
|
|
5517
5568
|
"properties": [
|
|
@@ -5524,7 +5575,7 @@
|
|
|
5524
5575
|
"immutable": true,
|
|
5525
5576
|
"locationInModule": {
|
|
5526
5577
|
"filename": "lib/cluster.ts",
|
|
5527
|
-
"line":
|
|
5578
|
+
"line": 81
|
|
5528
5579
|
},
|
|
5529
5580
|
"name": "masterUsername",
|
|
5530
5581
|
"type": {
|
|
@@ -5541,7 +5592,7 @@
|
|
|
5541
5592
|
"immutable": true,
|
|
5542
5593
|
"locationInModule": {
|
|
5543
5594
|
"filename": "lib/cluster.ts",
|
|
5544
|
-
"line":
|
|
5595
|
+
"line": 97
|
|
5545
5596
|
},
|
|
5546
5597
|
"name": "encryptionKey",
|
|
5547
5598
|
"optional": true,
|
|
@@ -5560,7 +5611,7 @@
|
|
|
5560
5611
|
"immutable": true,
|
|
5561
5612
|
"locationInModule": {
|
|
5562
5613
|
"filename": "lib/cluster.ts",
|
|
5563
|
-
"line":
|
|
5614
|
+
"line": 90
|
|
5564
5615
|
},
|
|
5565
5616
|
"name": "masterPassword",
|
|
5566
5617
|
"optional": true,
|
|
@@ -5581,7 +5632,7 @@
|
|
|
5581
5632
|
"kind": "enum",
|
|
5582
5633
|
"locationInModule": {
|
|
5583
5634
|
"filename": "lib/cluster.ts",
|
|
5584
|
-
"line":
|
|
5635
|
+
"line": 20
|
|
5585
5636
|
},
|
|
5586
5637
|
"members": [
|
|
5587
5638
|
{
|
|
@@ -5666,7 +5717,7 @@
|
|
|
5666
5717
|
"kind": "interface",
|
|
5667
5718
|
"locationInModule": {
|
|
5668
5719
|
"filename": "lib/cluster.ts",
|
|
5669
|
-
"line":
|
|
5720
|
+
"line": 121
|
|
5670
5721
|
},
|
|
5671
5722
|
"name": "RotationMultiUserOptions",
|
|
5672
5723
|
"properties": [
|
|
@@ -5680,7 +5731,7 @@
|
|
|
5680
5731
|
"immutable": true,
|
|
5681
5732
|
"locationInModule": {
|
|
5682
5733
|
"filename": "lib/cluster.ts",
|
|
5683
|
-
"line":
|
|
5734
|
+
"line": 136
|
|
5684
5735
|
},
|
|
5685
5736
|
"name": "secret",
|
|
5686
5737
|
"type": {
|
|
@@ -5697,7 +5748,7 @@
|
|
|
5697
5748
|
"immutable": true,
|
|
5698
5749
|
"locationInModule": {
|
|
5699
5750
|
"filename": "lib/cluster.ts",
|
|
5700
|
-
"line":
|
|
5751
|
+
"line": 144
|
|
5701
5752
|
},
|
|
5702
5753
|
"name": "automaticallyAfter",
|
|
5703
5754
|
"optional": true,
|
|
@@ -6683,6 +6734,6 @@
|
|
|
6683
6734
|
"symbolId": "lib/user:UserProps"
|
|
6684
6735
|
}
|
|
6685
6736
|
},
|
|
6686
|
-
"version": "2.
|
|
6737
|
+
"version": "2.66.0-alpha.0",
|
|
6687
6738
|
"fingerprint": "**********"
|
|
6688
6739
|
}
|