@aws-cdk/aws-redshift-alpha 2.36.0-alpha.0 → 2.38.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 CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "aws-cdk-lib": "^2.36.0",
11
+ "aws-cdk-lib": "^2.38.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -3045,7 +3045,7 @@
3045
3045
  },
3046
3046
  "name": "@aws-cdk/aws-redshift-alpha",
3047
3047
  "readme": {
3048
- "markdown": "# Amazon Redshift Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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## 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\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## 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\ndeclare const vpc: ec2.Vpc;\n\nnew Cluster(stack, '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\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"
3048
+ "markdown": "# Amazon Redshift Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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(stack, '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\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## 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\ndeclare const vpc: ec2.Vpc;\n\nnew Cluster(stack, '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\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"
3049
3049
  },
3050
3050
  "repository": {
3051
3051
  "directory": "packages/individual-packages/aws-redshift",
@@ -3102,7 +3102,7 @@
3102
3102
  },
3103
3103
  "locationInModule": {
3104
3104
  "filename": "lib/cluster.ts",
3105
- "line": 435
3105
+ "line": 445
3106
3106
  },
3107
3107
  "parameters": [
3108
3108
  {
@@ -3131,7 +3131,7 @@
3131
3131
  "kind": "class",
3132
3132
  "locationInModule": {
3133
3133
  "filename": "lib/cluster.ts",
3134
- "line": 384
3134
+ "line": 394
3135
3135
  },
3136
3136
  "methods": [
3137
3137
  {
@@ -3141,7 +3141,7 @@
3141
3141
  },
3142
3142
  "locationInModule": {
3143
3143
  "filename": "lib/cluster.ts",
3144
- "line": 388
3144
+ "line": 398
3145
3145
  },
3146
3146
  "name": "fromClusterAttributes",
3147
3147
  "parameters": [
@@ -3178,7 +3178,7 @@
3178
3178
  },
3179
3179
  "locationInModule": {
3180
3180
  "filename": "lib/cluster.ts",
3181
- "line": 562
3181
+ "line": 589
3182
3182
  },
3183
3183
  "name": "addRotationMultiUser",
3184
3184
  "parameters": [
@@ -3208,7 +3208,7 @@
3208
3208
  },
3209
3209
  "locationInModule": {
3210
3210
  "filename": "lib/cluster.ts",
3211
- "line": 538
3211
+ "line": 565
3212
3212
  },
3213
3213
  "name": "addRotationSingleUser",
3214
3214
  "parameters": [
@@ -3236,7 +3236,7 @@
3236
3236
  },
3237
3237
  "locationInModule": {
3238
3238
  "filename": "lib/cluster.ts",
3239
- "line": 371
3239
+ "line": 381
3240
3240
  },
3241
3241
  "name": "asSecretAttachmentTarget",
3242
3242
  "overrides": "aws-cdk-lib.aws_secretsmanager.ISecretAttachmentTarget",
@@ -3257,7 +3257,7 @@
3257
3257
  "immutable": true,
3258
3258
  "locationInModule": {
3259
3259
  "filename": "lib/cluster.ts",
3260
- "line": 410
3260
+ "line": 420
3261
3261
  },
3262
3262
  "name": "clusterEndpoint",
3263
3263
  "overrides": "@aws-cdk/aws-redshift-alpha.ICluster",
@@ -3273,7 +3273,7 @@
3273
3273
  "immutable": true,
3274
3274
  "locationInModule": {
3275
3275
  "filename": "lib/cluster.ts",
3276
- "line": 405
3276
+ "line": 415
3277
3277
  },
3278
3278
  "name": "clusterName",
3279
3279
  "overrides": "@aws-cdk/aws-redshift-alpha.ICluster",
@@ -3289,7 +3289,7 @@
3289
3289
  "immutable": true,
3290
3290
  "locationInModule": {
3291
3291
  "filename": "lib/cluster.ts",
3292
- "line": 415
3292
+ "line": 425
3293
3293
  },
3294
3294
  "name": "connections",
3295
3295
  "overrides": "aws-cdk-lib.aws_ec2.IConnectable",
@@ -3305,7 +3305,7 @@
3305
3305
  "immutable": true,
3306
3306
  "locationInModule": {
3307
3307
  "filename": "lib/cluster.ts",
3308
- "line": 420
3308
+ "line": 430
3309
3309
  },
3310
3310
  "name": "secret",
3311
3311
  "optional": true,
@@ -3331,7 +3331,7 @@
3331
3331
  "kind": "interface",
3332
3332
  "locationInModule": {
3333
3333
  "filename": "lib/cluster.ts",
3334
- "line": 150
3334
+ "line": 168
3335
3335
  },
3336
3336
  "name": "ClusterAttributes",
3337
3337
  "properties": [
@@ -3344,7 +3344,7 @@
3344
3344
  "immutable": true,
3345
3345
  "locationInModule": {
3346
3346
  "filename": "lib/cluster.ts",
3347
- "line": 166
3347
+ "line": 184
3348
3348
  },
3349
3349
  "name": "clusterEndpointAddress",
3350
3350
  "type": {
@@ -3360,7 +3360,7 @@
3360
3360
  "immutable": true,
3361
3361
  "locationInModule": {
3362
3362
  "filename": "lib/cluster.ts",
3363
- "line": 171
3363
+ "line": 189
3364
3364
  },
3365
3365
  "name": "clusterEndpointPort",
3366
3366
  "type": {
@@ -3376,7 +3376,7 @@
3376
3376
  "immutable": true,
3377
3377
  "locationInModule": {
3378
3378
  "filename": "lib/cluster.ts",
3379
- "line": 161
3379
+ "line": 179
3380
3380
  },
3381
3381
  "name": "clusterName",
3382
3382
  "type": {
@@ -3393,7 +3393,7 @@
3393
3393
  "immutable": true,
3394
3394
  "locationInModule": {
3395
3395
  "filename": "lib/cluster.ts",
3396
- "line": 156
3396
+ "line": 174
3397
3397
  },
3398
3398
  "name": "securityGroups",
3399
3399
  "optional": true,
@@ -3595,7 +3595,7 @@
3595
3595
  "kind": "interface",
3596
3596
  "locationInModule": {
3597
3597
  "filename": "lib/cluster.ts",
3598
- "line": 178
3598
+ "line": 196
3599
3599
  },
3600
3600
  "name": "ClusterProps",
3601
3601
  "properties": [
@@ -3608,7 +3608,7 @@
3608
3608
  "immutable": true,
3609
3609
  "locationInModule": {
3610
3610
  "filename": "lib/cluster.ts",
3611
- "line": 279
3611
+ "line": 297
3612
3612
  },
3613
3613
  "name": "masterUser",
3614
3614
  "type": {
@@ -3624,7 +3624,7 @@
3624
3624
  "immutable": true,
3625
3625
  "locationInModule": {
3626
3626
  "filename": "lib/cluster.ts",
3627
- "line": 253
3627
+ "line": 271
3628
3628
  },
3629
3629
  "name": "vpc",
3630
3630
  "type": {
@@ -3643,7 +3643,7 @@
3643
3643
  "immutable": true,
3644
3644
  "locationInModule": {
3645
3645
  "filename": "lib/cluster.ts",
3646
- "line": 337
3646
+ "line": 347
3647
3647
  },
3648
3648
  "name": "classicResizing",
3649
3649
  "optional": true,
@@ -3661,7 +3661,7 @@
3661
3661
  "immutable": true,
3662
3662
  "locationInModule": {
3663
3663
  "filename": "lib/cluster.ts",
3664
- "line": 185
3664
+ "line": 203
3665
3665
  },
3666
3666
  "name": "clusterName",
3667
3667
  "optional": true,
@@ -3679,7 +3679,7 @@
3679
3679
  "immutable": true,
3680
3680
  "locationInModule": {
3681
3681
  "filename": "lib/cluster.ts",
3682
- "line": 216
3682
+ "line": 234
3683
3683
  },
3684
3684
  "name": "clusterType",
3685
3685
  "optional": true,
@@ -3697,7 +3697,7 @@
3697
3697
  "immutable": true,
3698
3698
  "locationInModule": {
3699
3699
  "filename": "lib/cluster.ts",
3700
- "line": 294
3700
+ "line": 312
3701
3701
  },
3702
3702
  "name": "defaultDatabaseName",
3703
3703
  "optional": true,
@@ -3716,7 +3716,7 @@
3716
3716
  "immutable": true,
3717
3717
  "locationInModule": {
3718
3718
  "filename": "lib/cluster.ts",
3719
- "line": 346
3719
+ "line": 356
3720
3720
  },
3721
3721
  "name": "elasticIp",
3722
3722
  "optional": true,
@@ -3734,7 +3734,7 @@
3734
3734
  "immutable": true,
3735
3735
  "locationInModule": {
3736
3736
  "filename": "lib/cluster.ts",
3737
- "line": 230
3737
+ "line": 248
3738
3738
  },
3739
3739
  "name": "encrypted",
3740
3740
  "optional": true,
@@ -3752,7 +3752,7 @@
3752
3752
  "immutable": true,
3753
3753
  "locationInModule": {
3754
3754
  "filename": "lib/cluster.ts",
3755
- "line": 237
3755
+ "line": 255
3756
3756
  },
3757
3757
  "name": "encryptionKey",
3758
3758
  "optional": true,
@@ -3763,38 +3763,19 @@
3763
3763
  {
3764
3764
  "abstract": true,
3765
3765
  "docs": {
3766
- "default": "- No Logs",
3767
- "remarks": "Logging information includes queries and connection attempts, for the specified Amazon Redshift cluster.",
3768
- "stability": "experimental",
3769
- "summary": "Bucket to send logs to."
3770
- },
3771
- "immutable": true,
3772
- "locationInModule": {
3773
- "filename": "lib/cluster.ts",
3774
- "line": 302
3775
- },
3776
- "name": "loggingBucket",
3777
- "optional": true,
3778
- "type": {
3779
- "fqn": "aws-cdk-lib.aws_s3.IBucket"
3780
- }
3781
- },
3782
- {
3783
- "abstract": true,
3784
- "docs": {
3785
- "default": "- no prefix",
3766
+ "default": "- No logging bucket is used",
3786
3767
  "stability": "experimental",
3787
- "summary": "Prefix used for logging."
3768
+ "summary": "Bucket details for log files to be sent to, including prefix."
3788
3769
  },
3789
3770
  "immutable": true,
3790
3771
  "locationInModule": {
3791
3772
  "filename": "lib/cluster.ts",
3792
- "line": 309
3773
+ "line": 319
3793
3774
  },
3794
- "name": "loggingKeyPrefix",
3775
+ "name": "loggingProperties",
3795
3776
  "optional": true,
3796
3777
  "type": {
3797
- "primitive": "string"
3778
+ "fqn": "@aws-cdk/aws-redshift-alpha.LoggingProperties"
3798
3779
  }
3799
3780
  },
3800
3781
  {
@@ -3807,7 +3788,7 @@
3807
3788
  "immutable": true,
3808
3789
  "locationInModule": {
3809
3790
  "filename": "lib/cluster.ts",
3810
- "line": 209
3791
+ "line": 227
3811
3792
  },
3812
3793
  "name": "nodeType",
3813
3794
  "optional": true,
@@ -3826,7 +3807,7 @@
3826
3807
  "immutable": true,
3827
3808
  "locationInModule": {
3828
3809
  "filename": "lib/cluster.ts",
3829
- "line": 202
3810
+ "line": 220
3830
3811
  },
3831
3812
  "name": "numberOfNodes",
3832
3813
  "optional": true,
@@ -3844,7 +3825,7 @@
3844
3825
  "immutable": true,
3845
3826
  "locationInModule": {
3846
3827
  "filename": "lib/cluster.ts",
3847
- "line": 193
3828
+ "line": 211
3848
3829
  },
3849
3830
  "name": "parameterGroup",
3850
3831
  "optional": true,
@@ -3862,7 +3843,7 @@
3862
3843
  "immutable": true,
3863
3844
  "locationInModule": {
3864
3845
  "filename": "lib/cluster.ts",
3865
- "line": 223
3846
+ "line": 241
3866
3847
  },
3867
3848
  "name": "port",
3868
3849
  "optional": true,
@@ -3882,7 +3863,7 @@
3882
3863
  "immutable": true,
3883
3864
  "locationInModule": {
3884
3865
  "filename": "lib/cluster.ts",
3885
- "line": 248
3866
+ "line": 266
3886
3867
  },
3887
3868
  "name": "preferredMaintenanceWindow",
3888
3869
  "optional": true,
@@ -3900,7 +3881,7 @@
3900
3881
  "immutable": true,
3901
3882
  "locationInModule": {
3902
3883
  "filename": "lib/cluster.ts",
3903
- "line": 324
3884
+ "line": 334
3904
3885
  },
3905
3886
  "name": "publiclyAccessible",
3906
3887
  "optional": true,
@@ -3918,7 +3899,7 @@
3918
3899
  "immutable": true,
3919
3900
  "locationInModule": {
3920
3901
  "filename": "lib/cluster.ts",
3921
- "line": 317
3902
+ "line": 327
3922
3903
  },
3923
3904
  "name": "removalPolicy",
3924
3905
  "optional": true,
@@ -3937,7 +3918,7 @@
3937
3918
  "immutable": true,
3938
3919
  "locationInModule": {
3939
3920
  "filename": "lib/cluster.ts",
3940
- "line": 287
3921
+ "line": 305
3941
3922
  },
3942
3923
  "name": "roles",
3943
3924
  "optional": true,
@@ -3960,7 +3941,7 @@
3960
3941
  "immutable": true,
3961
3942
  "locationInModule": {
3962
3943
  "filename": "lib/cluster.ts",
3963
- "line": 267
3944
+ "line": 285
3964
3945
  },
3965
3946
  "name": "securityGroups",
3966
3947
  "optional": true,
@@ -3983,7 +3964,7 @@
3983
3964
  "immutable": true,
3984
3965
  "locationInModule": {
3985
3966
  "filename": "lib/cluster.ts",
3986
- "line": 274
3967
+ "line": 292
3987
3968
  },
3988
3969
  "name": "subnetGroup",
3989
3970
  "optional": true,
@@ -4001,7 +3982,7 @@
4001
3982
  "immutable": true,
4002
3983
  "locationInModule": {
4003
3984
  "filename": "lib/cluster.ts",
4004
- "line": 260
3985
+ "line": 278
4005
3986
  },
4006
3987
  "name": "vpcSubnets",
4007
3988
  "optional": true,
@@ -4619,7 +4600,7 @@
4619
4600
  "kind": "interface",
4620
4601
  "locationInModule": {
4621
4602
  "filename": "lib/cluster.ts",
4622
- "line": 131
4603
+ "line": 149
4623
4604
  },
4624
4605
  "name": "ICluster",
4625
4606
  "properties": [
@@ -4635,7 +4616,7 @@
4635
4616
  "immutable": true,
4636
4617
  "locationInModule": {
4637
4618
  "filename": "lib/cluster.ts",
4638
- "line": 144
4619
+ "line": 162
4639
4620
  },
4640
4621
  "name": "clusterEndpoint",
4641
4622
  "type": {
@@ -4654,7 +4635,7 @@
4654
4635
  "immutable": true,
4655
4636
  "locationInModule": {
4656
4637
  "filename": "lib/cluster.ts",
4657
- "line": 137
4638
+ "line": 155
4658
4639
  },
4659
4640
  "name": "clusterName",
4660
4641
  "type": {
@@ -4975,6 +4956,61 @@
4975
4956
  ],
4976
4957
  "symbolId": "lib/user:IUser"
4977
4958
  },
4959
+ "@aws-cdk/aws-redshift-alpha.LoggingProperties": {
4960
+ "assembly": "@aws-cdk/aws-redshift-alpha",
4961
+ "datatype": true,
4962
+ "docs": {
4963
+ "custom": {
4964
+ "exampleMetadata": "infused"
4965
+ },
4966
+ "example": "import * 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(stack, '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});",
4967
+ "stability": "experimental",
4968
+ "summary": "Logging bucket and S3 prefix combination."
4969
+ },
4970
+ "fqn": "@aws-cdk/aws-redshift-alpha.LoggingProperties",
4971
+ "kind": "interface",
4972
+ "locationInModule": {
4973
+ "filename": "lib/cluster.ts",
4974
+ "line": 101
4975
+ },
4976
+ "name": "LoggingProperties",
4977
+ "properties": [
4978
+ {
4979
+ "abstract": true,
4980
+ "docs": {
4981
+ "remarks": "Logging information includes queries and connection attempts, for the specified Amazon Redshift cluster.",
4982
+ "stability": "experimental",
4983
+ "summary": "Bucket to send logs to."
4984
+ },
4985
+ "immutable": true,
4986
+ "locationInModule": {
4987
+ "filename": "lib/cluster.ts",
4988
+ "line": 107
4989
+ },
4990
+ "name": "loggingBucket",
4991
+ "type": {
4992
+ "fqn": "aws-cdk-lib.aws_s3.IBucket"
4993
+ }
4994
+ },
4995
+ {
4996
+ "abstract": true,
4997
+ "docs": {
4998
+ "stability": "experimental",
4999
+ "summary": "Prefix used for logging."
5000
+ },
5001
+ "immutable": true,
5002
+ "locationInModule": {
5003
+ "filename": "lib/cluster.ts",
5004
+ "line": 113
5005
+ },
5006
+ "name": "loggingKeyPrefix",
5007
+ "type": {
5008
+ "primitive": "string"
5009
+ }
5010
+ }
5011
+ ],
5012
+ "symbolId": "lib/cluster:LoggingProperties"
5013
+ },
4978
5014
  "@aws-cdk/aws-redshift-alpha.Login": {
4979
5015
  "assembly": "@aws-cdk/aws-redshift-alpha",
4980
5016
  "datatype": true,
@@ -5145,7 +5181,7 @@
5145
5181
  "kind": "interface",
5146
5182
  "locationInModule": {
5147
5183
  "filename": "lib/cluster.ts",
5148
- "line": 101
5184
+ "line": 119
5149
5185
  },
5150
5186
  "name": "RotationMultiUserOptions",
5151
5187
  "properties": [
@@ -5159,7 +5195,7 @@
5159
5195
  "immutable": true,
5160
5196
  "locationInModule": {
5161
5197
  "filename": "lib/cluster.ts",
5162
- "line": 116
5198
+ "line": 134
5163
5199
  },
5164
5200
  "name": "secret",
5165
5201
  "type": {
@@ -5176,7 +5212,7 @@
5176
5212
  "immutable": true,
5177
5213
  "locationInModule": {
5178
5214
  "filename": "lib/cluster.ts",
5179
- "line": 124
5215
+ "line": 142
5180
5216
  },
5181
5217
  "name": "automaticallyAfter",
5182
5218
  "optional": true,
@@ -6144,6 +6180,6 @@
6144
6180
  "symbolId": "lib/user:UserProps"
6145
6181
  }
6146
6182
  },
6147
- "version": "2.36.0-alpha.0",
6183
+ "version": "2.38.0-alpha.0",
6148
6184
  "fingerprint": "**********"
6149
6185
  }