@aws-cdk/aws-redshift-alpha 2.171.0-alpha.0 → 2.172.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.171.0",
11
+ "aws-cdk-lib": "^2.172.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -3908,7 +3908,7 @@
3908
3908
  },
3909
3909
  "name": "@aws-cdk/aws-redshift-alpha",
3910
3910
  "readme": {
3911
- "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.\nYou can specify characters to not include in generated passwords by setting `excludeCharacters` property.\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 excludeCharacters: '\"@/\\\\\\ \\'`',\n },\n vpc\n});\n```\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', 'amzn-s3-demo-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## Availability Zone Relocation\n\nBy using [relocation in Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-recovery.html), you allow Amazon Redshift to move a cluster to another Availability Zone (AZ) without any loss of data or changes to your applications.\nThis feature can be applied to both new and existing clusters.\n\nTo enable this feature, set the `availabilityZoneRelocation` property to `true`.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\n\ndeclare const vpc: ec2.IVpc;\n\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n nodeType: NodeType.RA3_XLPLUS,\n availabilityZoneRelocation: true,\n});\n```\n\n**Note**: The `availabilityZoneRelocation` property is only available for RA3 node types.\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\nYou can specify characters to not include in generated passwords by setting `excludeCharacters` property.\n\n```ts fixture=cluster\nnew User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n excludeCharacters: '\"@/\\\\\\ \\'`',\n});\n```\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\nTables greater than v2.114.1 can have their table name changed, for versions <= v2.114.1, this would not be possible.\nTherefore, changing of table names for <= v2.114.1 have been disabled.\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableName: 'oldTableName' // This value can be change for versions greater than v2.114.1\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 and their respective columns can be configured to contain comments:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', comment: 'This is a column comment' },\n { name: 'col2', dataType: 'float', comment: 'This is a another column comment' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n tableComment: 'This is a table comment',\n});\n```\n\nTable columns can be configured to use a specific compression encoding:\n\n```ts fixture=cluster\nimport { ColumnEncoding } from '@aws-cdk/aws-redshift-alpha';\n\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', encoding: ColumnEncoding.TEXT32K },\n { name: 'col2', dataType: 'float', encoding: ColumnEncoding.DELTA32K },\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nTable columns can also contain an `id` attribute, which can allow table columns to be renamed.\n\n**NOTE** To use the `id` attribute, you must also enable the `@aws-cdk/aws-redshift:columnId` feature flag.\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { id: 'col1', name: 'col1', dataType: 'varchar(4)' },\n { id: 'col2', name: 'col2', dataType: 'float' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nQuery execution duration is limited to 1 minute by default. You can change this by setting the `timeout` property.\n\nValid timeout values are between 1 seconds and 15 minutes.\n\n```ts fixture=cluster\nimport { Duration } from 'aws-cdk-lib';\n\nnew Table(this, 'Table', {\n tableColumns: [\n { id: 'col1', name: 'col1', dataType: 'varchar(4)' },\n { id: 'col2', name: 'col2', dataType: 'float' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n timeout: Duration.minutes(15),\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\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');\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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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(this, '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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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(this, '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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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\n## Multi-AZ\n\nAmazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters.\nBy using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone.\n\nTo create a Multi-AZ cluster, set the `multiAz` property to `true` when creating the cluster.\n\n```ts\ndeclare const vpc: ec2.IVpc;\n\nnew redshift.Cluster(stack, 'Cluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc, // 3 AZs are required for Multi-AZ\n nodeType: redshift.NodeType.RA3_XLPLUS, // must be RA3 node type\n clusterType: redshift.ClusterType.MULTI_NODE, // must be MULTI_NODE\n numberOfNodes: 2, // must be 2 or more\n multiAz: true,\n});\n```\n\n## Resizing\n\nAs your data warehousing needs change, it's possible to resize your Redshift cluster. If the cluster was deployed via CDK,\nit's important to resize it via CDK so the change is registered in the AWS CloudFormation template.\nThere are two types of resize operations:\n\n* Elastic resize - Number of nodes and node type can be changed, but not at the same time. Elastic resize is the default behavior,\nas it's a fast operation and typically completes in minutes. Elastic resize is only supported on clusters of the following types:\n * dc1.large (if your cluster is in a VPC)\n * dc1.8xlarge (if your cluster is in a VPC)\n * dc2.large\n * dc2.8xlarge\n * ds2.xlarge\n * ds2.8xlarge\n * ra3.xlplus\n * ra3.4xlarge\n * ra3.16xlarge\n\n* Classic resize - Number of nodes, node type, or both, can be changed. This operation takes longer to complete,\nbut is useful when the resize operation doesn't meet the criteria of an elastic resize. If you prefer classic resizing,\nyou can set the `classicResizing` flag when creating the cluster.\n\nThere are other constraints to be aware of, for example, elastic resizing does not support single-node clusters and there are\nlimits on the number of nodes you can add to a cluster. See the [AWS Redshift Documentation](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#rs-resize-tutorial) and [AWS API Documentation](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ResizeCluster.html) for more details.\n"
3911
+ "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.\nYou can specify characters to not include in generated passwords by setting `excludeCharacters` property.\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 excludeCharacters: '\"@/\\\\\\ \\'`',\n },\n vpc\n});\n```\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', 'amzn-s3-demo-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## Availability Zone Relocation\n\nBy using [relocation in Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-recovery.html), you allow Amazon Redshift to move a cluster to another Availability Zone (AZ) without any loss of data or changes to your applications.\nThis feature can be applied to both new and existing clusters.\n\nTo enable this feature, set the `availabilityZoneRelocation` property to `true`.\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\n\ndeclare const vpc: ec2.IVpc;\n\nconst cluster = new Cluster(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n nodeType: NodeType.RA3_XLPLUS,\n availabilityZoneRelocation: true,\n});\n```\n\n**Note**: The `availabilityZoneRelocation` property is only available for RA3 node types.\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\nYou can specify characters to not include in generated passwords by setting `excludeCharacters` property.\n\n```ts fixture=cluster\nnew User(this, 'User', {\n cluster: cluster,\n databaseName: 'databaseName',\n excludeCharacters: '\"@/\\\\\\ \\'`',\n});\n```\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\nTables greater than v2.114.1 can have their table name changed, for versions <= v2.114.1, this would not be possible.\nTherefore, changing of table names for <= v2.114.1 have been disabled.\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableName: 'oldTableName' // This value can be change for versions greater than v2.114.1\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 and their respective columns can be configured to contain comments:\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', comment: 'This is a column comment' },\n { name: 'col2', dataType: 'float', comment: 'This is a another column comment' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n tableComment: 'This is a table comment',\n});\n```\n\nTable columns can be configured to use a specific compression encoding:\n\n```ts fixture=cluster\nimport { ColumnEncoding } from '@aws-cdk/aws-redshift-alpha';\n\nnew Table(this, 'Table', {\n tableColumns: [\n { name: 'col1', dataType: 'varchar(4)', encoding: ColumnEncoding.TEXT32K },\n { name: 'col2', dataType: 'float', encoding: ColumnEncoding.DELTA32K },\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nTable columns can also contain an `id` attribute, which can allow table columns to be renamed.\n\n**NOTE** To use the `id` attribute, you must also enable the `@aws-cdk/aws-redshift:columnId` feature flag.\n\n```ts fixture=cluster\nnew Table(this, 'Table', {\n tableColumns: [\n { id: 'col1', name: 'col1', dataType: 'varchar(4)' },\n { id: 'col2', name: 'col2', dataType: 'float' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n});\n```\n\nQuery execution duration is limited to 1 minute by default. You can change this by setting the `timeout` property.\n\nValid timeout values are between 1 seconds and 15 minutes.\n\n```ts fixture=cluster\nimport { Duration } from 'aws-cdk-lib';\n\nnew Table(this, 'Table', {\n tableColumns: [\n { id: 'col1', name: 'col1', dataType: 'varchar(4)' },\n { id: 'col2', name: 'col2', dataType: 'float' }\n ],\n cluster: cluster,\n databaseName: 'databaseName',\n timeout: Duration.minutes(15),\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\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');\ncluster.enableRebootForParameterChanges()\n```\n\n## Resource Action\n\nYou can perform various actions on the Redshift resource by specifying the `resourceAction` property,\nincluding [pausing and resuming the cluster](https://docs.aws.amazon.com/redshift/latest/mgmt/rs-mgmt-pause-resume-cluster.html), as well as initiating [failover for Multi-AZ clusters](https://docs.aws.amazon.com/redshift/latest/mgmt/test-cluster-multi-az.html).\n\n```ts\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport { ResourceAction } from '@aws-cdk/aws-redshift-alpha';\n\ndeclare const vpc: ec2.IVpc;\n\n// Pause the cluster\nnew Cluster(this, 'PausedCluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n resourceAction: ResourceAction.PAUSE,\n});\n\n// Resume the cluster\nnew Cluster(this, 'ResumedCluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n resourceAction: ResourceAction.RESUME,\n});\n\n// Failover the cluster\nnew Cluster(this, 'FailOverCluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n // VPC must have 3 AZs for the cluster which executes failover action\n vpc,\n // Must be a multi-AZ cluster to failover\n multiAz: true,\n resourceAction: ResourceAction.FAILOVER_PRIMARY_COMPUTE,\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\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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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(this, '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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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(this, '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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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\n## Multi-AZ\n\nAmazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters.\nBy using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone.\n\nTo create a Multi-AZ cluster, set the `multiAz` property to `true` when creating the cluster.\n\n```ts\ndeclare const vpc: ec2.IVpc;\n\nnew redshift.Cluster(stack, 'Cluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc, // 3 AZs are required for Multi-AZ\n nodeType: redshift.NodeType.RA3_XLPLUS, // must be RA3 node type\n clusterType: redshift.ClusterType.MULTI_NODE, // must be MULTI_NODE\n numberOfNodes: 2, // must be 2 or more\n multiAz: true,\n});\n```\n\n## Resizing\n\nAs your data warehousing needs change, it's possible to resize your Redshift cluster. If the cluster was deployed via CDK,\nit's important to resize it via CDK so the change is registered in the AWS CloudFormation template.\nThere are two types of resize operations:\n\n* Elastic resize - Number of nodes and node type can be changed, but not at the same time. Elastic resize is the default behavior,\nas it's a fast operation and typically completes in minutes. Elastic resize is only supported on clusters of the following types:\n * dc1.large (if your cluster is in a VPC)\n * dc1.8xlarge (if your cluster is in a VPC)\n * dc2.large\n * dc2.8xlarge\n * ds2.xlarge\n * ds2.8xlarge\n * ra3.xlplus\n * ra3.4xlarge\n * ra3.16xlarge\n\n* Classic resize - Number of nodes, node type, or both, can be changed. This operation takes longer to complete,\nbut is useful when the resize operation doesn't meet the criteria of an elastic resize. If you prefer classic resizing,\nyou can set the `classicResizing` flag when creating the cluster.\n\nThere are other constraints to be aware of, for example, elastic resizing does not support single-node clusters and there are\nlimits on the number of nodes you can add to a cluster. See the [AWS Redshift Documentation](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#rs-resize-tutorial) and [AWS API Documentation](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ResizeCluster.html) for more details.\n"
3912
3912
  },
3913
3913
  "repository": {
3914
3914
  "directory": "packages/@aws-cdk/aws-redshift-alpha",
@@ -3956,7 +3956,7 @@
3956
3956
  },
3957
3957
  "stability": "experimental",
3958
3958
  "summary": "Create a Redshift cluster a given number of nodes.",
3959
- "example": "import * 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');"
3959
+ "example": "import * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n roles: [defaultRole],\n defaultRole: defaultRole,\n});"
3960
3960
  },
3961
3961
  "fqn": "@aws-cdk/aws-redshift-alpha.Cluster",
3962
3962
  "initializer": {
@@ -3965,7 +3965,7 @@
3965
3965
  },
3966
3966
  "locationInModule": {
3967
3967
  "filename": "lib/cluster.ts",
3968
- "line": 515
3968
+ "line": 544
3969
3969
  },
3970
3970
  "parameters": [
3971
3971
  {
@@ -3994,7 +3994,7 @@
3994
3994
  "kind": "class",
3995
3995
  "locationInModule": {
3996
3996
  "filename": "lib/cluster.ts",
3997
- "line": 448
3997
+ "line": 477
3998
3998
  },
3999
3999
  "methods": [
4000
4000
  {
@@ -4004,7 +4004,7 @@
4004
4004
  },
4005
4005
  "locationInModule": {
4006
4006
  "filename": "lib/cluster.ts",
4007
- "line": 452
4007
+ "line": 481
4008
4008
  },
4009
4009
  "name": "fromClusterAttributes",
4010
4010
  "parameters": [
@@ -4042,7 +4042,7 @@
4042
4042
  },
4043
4043
  "locationInModule": {
4044
4044
  "filename": "lib/cluster.ts",
4045
- "line": 817
4045
+ "line": 850
4046
4046
  },
4047
4047
  "name": "addDefaultIamRole",
4048
4048
  "parameters": [
@@ -4064,7 +4064,7 @@
4064
4064
  },
4065
4065
  "locationInModule": {
4066
4066
  "filename": "lib/cluster.ts",
4067
- "line": 871
4067
+ "line": 904
4068
4068
  },
4069
4069
  "name": "addIamRole",
4070
4070
  "parameters": [
@@ -4086,7 +4086,7 @@
4086
4086
  },
4087
4087
  "locationInModule": {
4088
4088
  "filename": "lib/cluster.ts",
4089
- "line": 691
4089
+ "line": 724
4090
4090
  },
4091
4091
  "name": "addRotationMultiUser",
4092
4092
  "parameters": [
@@ -4116,7 +4116,7 @@
4116
4116
  },
4117
4117
  "locationInModule": {
4118
4118
  "filename": "lib/cluster.ts",
4119
- "line": 667
4119
+ "line": 700
4120
4120
  },
4121
4121
  "name": "addRotationSingleUser",
4122
4122
  "parameters": [
@@ -4144,7 +4144,7 @@
4144
4144
  },
4145
4145
  "locationInModule": {
4146
4146
  "filename": "lib/cluster.ts",
4147
- "line": 731
4147
+ "line": 764
4148
4148
  },
4149
4149
  "name": "addToParameterGroup",
4150
4150
  "parameters": [
@@ -4175,7 +4175,7 @@
4175
4175
  },
4176
4176
  "locationInModule": {
4177
4177
  "filename": "lib/cluster.ts",
4178
- "line": 435
4178
+ "line": 464
4179
4179
  },
4180
4180
  "name": "asSecretAttachmentTarget",
4181
4181
  "overrides": "aws-cdk-lib.aws_secretsmanager.ISecretAttachmentTarget",
@@ -4192,7 +4192,7 @@
4192
4192
  },
4193
4193
  "locationInModule": {
4194
4194
  "filename": "lib/cluster.ts",
4195
- "line": 750
4195
+ "line": 783
4196
4196
  },
4197
4197
  "name": "enableRebootForParameterChanges"
4198
4198
  }
@@ -4207,7 +4207,7 @@
4207
4207
  "immutable": true,
4208
4208
  "locationInModule": {
4209
4209
  "filename": "lib/cluster.ts",
4210
- "line": 473
4210
+ "line": 502
4211
4211
  },
4212
4212
  "name": "clusterEndpoint",
4213
4213
  "overrides": "@aws-cdk/aws-redshift-alpha.ICluster",
@@ -4223,7 +4223,7 @@
4223
4223
  "immutable": true,
4224
4224
  "locationInModule": {
4225
4225
  "filename": "lib/cluster.ts",
4226
- "line": 468
4226
+ "line": 497
4227
4227
  },
4228
4228
  "name": "clusterName",
4229
4229
  "overrides": "@aws-cdk/aws-redshift-alpha.ICluster",
@@ -4239,7 +4239,7 @@
4239
4239
  "immutable": true,
4240
4240
  "locationInModule": {
4241
4241
  "filename": "lib/cluster.ts",
4242
- "line": 478
4242
+ "line": 507
4243
4243
  },
4244
4244
  "name": "connections",
4245
4245
  "overrides": "aws-cdk-lib.aws_ec2.IConnectable",
@@ -4255,7 +4255,7 @@
4255
4255
  "immutable": true,
4256
4256
  "locationInModule": {
4257
4257
  "filename": "lib/cluster.ts",
4258
- "line": 483
4258
+ "line": 512
4259
4259
  },
4260
4260
  "name": "secret",
4261
4261
  "optional": true,
@@ -4270,7 +4270,7 @@
4270
4270
  },
4271
4271
  "locationInModule": {
4272
4272
  "filename": "lib/cluster.ts",
4273
- "line": 506
4273
+ "line": 535
4274
4274
  },
4275
4275
  "name": "parameterGroup",
4276
4276
  "optional": true,
@@ -4297,7 +4297,7 @@
4297
4297
  "kind": "interface",
4298
4298
  "locationInModule": {
4299
4299
  "filename": "lib/cluster.ts",
4300
- "line": 184
4300
+ "line": 206
4301
4301
  },
4302
4302
  "name": "ClusterAttributes",
4303
4303
  "properties": [
@@ -4310,7 +4310,7 @@
4310
4310
  "immutable": true,
4311
4311
  "locationInModule": {
4312
4312
  "filename": "lib/cluster.ts",
4313
- "line": 200
4313
+ "line": 222
4314
4314
  },
4315
4315
  "name": "clusterEndpointAddress",
4316
4316
  "type": {
@@ -4326,7 +4326,7 @@
4326
4326
  "immutable": true,
4327
4327
  "locationInModule": {
4328
4328
  "filename": "lib/cluster.ts",
4329
- "line": 205
4329
+ "line": 227
4330
4330
  },
4331
4331
  "name": "clusterEndpointPort",
4332
4332
  "type": {
@@ -4342,7 +4342,7 @@
4342
4342
  "immutable": true,
4343
4343
  "locationInModule": {
4344
4344
  "filename": "lib/cluster.ts",
4345
- "line": 195
4345
+ "line": 217
4346
4346
  },
4347
4347
  "name": "clusterName",
4348
4348
  "type": {
@@ -4359,7 +4359,7 @@
4359
4359
  "immutable": true,
4360
4360
  "locationInModule": {
4361
4361
  "filename": "lib/cluster.ts",
4362
- "line": 190
4362
+ "line": 212
4363
4363
  },
4364
4364
  "name": "securityGroups",
4365
4365
  "optional": true,
@@ -4603,7 +4603,7 @@
4603
4603
  "docs": {
4604
4604
  "stability": "experimental",
4605
4605
  "summary": "Properties for a new database cluster.",
4606
- "example": "import * 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');",
4606
+ "example": "import * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\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(this, 'Redshift', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n roles: [defaultRole],\n defaultRole: defaultRole,\n});",
4607
4607
  "custom": {
4608
4608
  "exampleMetadata": "infused"
4609
4609
  }
@@ -4612,7 +4612,7 @@
4612
4612
  "kind": "interface",
4613
4613
  "locationInModule": {
4614
4614
  "filename": "lib/cluster.ts",
4615
- "line": 212
4615
+ "line": 234
4616
4616
  },
4617
4617
  "name": "ClusterProps",
4618
4618
  "properties": [
@@ -4625,7 +4625,7 @@
4625
4625
  "immutable": true,
4626
4626
  "locationInModule": {
4627
4627
  "filename": "lib/cluster.ts",
4628
- "line": 312
4628
+ "line": 334
4629
4629
  },
4630
4630
  "name": "masterUser",
4631
4631
  "type": {
@@ -4641,7 +4641,7 @@
4641
4641
  "immutable": true,
4642
4642
  "locationInModule": {
4643
4643
  "filename": "lib/cluster.ts",
4644
- "line": 286
4644
+ "line": 308
4645
4645
  },
4646
4646
  "name": "vpc",
4647
4647
  "type": {
@@ -4659,7 +4659,7 @@
4659
4659
  "immutable": true,
4660
4660
  "locationInModule": {
4661
4661
  "filename": "lib/cluster.ts",
4662
- "line": 410
4662
+ "line": 439
4663
4663
  },
4664
4664
  "name": "availabilityZoneRelocation",
4665
4665
  "optional": true,
@@ -4679,7 +4679,7 @@
4679
4679
  "immutable": true,
4680
4680
  "locationInModule": {
4681
4681
  "filename": "lib/cluster.ts",
4682
- "line": 370
4682
+ "line": 392
4683
4683
  },
4684
4684
  "name": "classicResizing",
4685
4685
  "optional": true,
@@ -4697,7 +4697,7 @@
4697
4697
  "immutable": true,
4698
4698
  "locationInModule": {
4699
4699
  "filename": "lib/cluster.ts",
4700
- "line": 218
4700
+ "line": 240
4701
4701
  },
4702
4702
  "name": "clusterName",
4703
4703
  "optional": true,
@@ -4715,7 +4715,7 @@
4715
4715
  "immutable": true,
4716
4716
  "locationInModule": {
4717
4717
  "filename": "lib/cluster.ts",
4718
- "line": 249
4718
+ "line": 271
4719
4719
  },
4720
4720
  "name": "clusterType",
4721
4721
  "optional": true,
@@ -4733,7 +4733,7 @@
4733
4733
  "immutable": true,
4734
4734
  "locationInModule": {
4735
4735
  "filename": "lib/cluster.ts",
4736
- "line": 335
4736
+ "line": 357
4737
4737
  },
4738
4738
  "name": "defaultDatabaseName",
4739
4739
  "optional": true,
@@ -4752,7 +4752,7 @@
4752
4752
  "immutable": true,
4753
4753
  "locationInModule": {
4754
4754
  "filename": "lib/cluster.ts",
4755
- "line": 328
4755
+ "line": 350
4756
4756
  },
4757
4757
  "name": "defaultRole",
4758
4758
  "optional": true,
@@ -4771,7 +4771,7 @@
4771
4771
  "immutable": true,
4772
4772
  "locationInModule": {
4773
4773
  "filename": "lib/cluster.ts",
4774
- "line": 379
4774
+ "line": 401
4775
4775
  },
4776
4776
  "name": "elasticIp",
4777
4777
  "optional": true,
@@ -4789,7 +4789,7 @@
4789
4789
  "immutable": true,
4790
4790
  "locationInModule": {
4791
4791
  "filename": "lib/cluster.ts",
4792
- "line": 263
4792
+ "line": 285
4793
4793
  },
4794
4794
  "name": "encrypted",
4795
4795
  "optional": true,
@@ -4807,7 +4807,7 @@
4807
4807
  "immutable": true,
4808
4808
  "locationInModule": {
4809
4809
  "filename": "lib/cluster.ts",
4810
- "line": 270
4810
+ "line": 292
4811
4811
  },
4812
4812
  "name": "encryptionKey",
4813
4813
  "optional": true,
@@ -4826,7 +4826,7 @@
4826
4826
  "immutable": true,
4827
4827
  "locationInModule": {
4828
4828
  "filename": "lib/cluster.ts",
4829
- "line": 394
4829
+ "line": 416
4830
4830
  },
4831
4831
  "name": "enhancedVpcRouting",
4832
4832
  "optional": true,
@@ -4844,7 +4844,7 @@
4844
4844
  "immutable": true,
4845
4845
  "locationInModule": {
4846
4846
  "filename": "lib/cluster.ts",
4847
- "line": 342
4847
+ "line": 364
4848
4848
  },
4849
4849
  "name": "loggingProperties",
4850
4850
  "optional": true,
@@ -4862,7 +4862,7 @@
4862
4862
  "immutable": true,
4863
4863
  "locationInModule": {
4864
4864
  "filename": "lib/cluster.ts",
4865
- "line": 401
4865
+ "line": 423
4866
4866
  },
4867
4867
  "name": "multiAz",
4868
4868
  "optional": true,
@@ -4880,7 +4880,7 @@
4880
4880
  "immutable": true,
4881
4881
  "locationInModule": {
4882
4882
  "filename": "lib/cluster.ts",
4883
- "line": 242
4883
+ "line": 264
4884
4884
  },
4885
4885
  "name": "nodeType",
4886
4886
  "optional": true,
@@ -4899,7 +4899,7 @@
4899
4899
  "immutable": true,
4900
4900
  "locationInModule": {
4901
4901
  "filename": "lib/cluster.ts",
4902
- "line": 235
4902
+ "line": 257
4903
4903
  },
4904
4904
  "name": "numberOfNodes",
4905
4905
  "optional": true,
@@ -4917,7 +4917,7 @@
4917
4917
  "immutable": true,
4918
4918
  "locationInModule": {
4919
4919
  "filename": "lib/cluster.ts",
4920
- "line": 226
4920
+ "line": 248
4921
4921
  },
4922
4922
  "name": "parameterGroup",
4923
4923
  "optional": true,
@@ -4935,7 +4935,7 @@
4935
4935
  "immutable": true,
4936
4936
  "locationInModule": {
4937
4937
  "filename": "lib/cluster.ts",
4938
- "line": 256
4938
+ "line": 278
4939
4939
  },
4940
4940
  "name": "port",
4941
4941
  "optional": true,
@@ -4955,7 +4955,7 @@
4955
4955
  "immutable": true,
4956
4956
  "locationInModule": {
4957
4957
  "filename": "lib/cluster.ts",
4958
- "line": 281
4958
+ "line": 303
4959
4959
  },
4960
4960
  "name": "preferredMaintenanceWindow",
4961
4961
  "optional": true,
@@ -4973,7 +4973,7 @@
4973
4973
  "immutable": true,
4974
4974
  "locationInModule": {
4975
4975
  "filename": "lib/cluster.ts",
4976
- "line": 357
4976
+ "line": 379
4977
4977
  },
4978
4978
  "name": "publiclyAccessible",
4979
4979
  "optional": true,
@@ -4991,7 +4991,7 @@
4991
4991
  "immutable": true,
4992
4992
  "locationInModule": {
4993
4993
  "filename": "lib/cluster.ts",
4994
- "line": 385
4994
+ "line": 407
4995
4995
  },
4996
4996
  "name": "rebootForParameterChanges",
4997
4997
  "optional": true,
@@ -5009,7 +5009,7 @@
5009
5009
  "immutable": true,
5010
5010
  "locationInModule": {
5011
5011
  "filename": "lib/cluster.ts",
5012
- "line": 350
5012
+ "line": 372
5013
5013
  },
5014
5014
  "name": "removalPolicy",
5015
5015
  "optional": true,
@@ -5017,6 +5017,24 @@
5017
5017
  "fqn": "aws-cdk-lib.RemovalPolicy"
5018
5018
  }
5019
5019
  },
5020
+ {
5021
+ "abstract": true,
5022
+ "docs": {
5023
+ "default": "- no operation",
5024
+ "stability": "experimental",
5025
+ "summary": "The Amazon Redshift operation to be performed."
5026
+ },
5027
+ "immutable": true,
5028
+ "locationInModule": {
5029
+ "filename": "lib/cluster.ts",
5030
+ "line": 430
5031
+ },
5032
+ "name": "resourceAction",
5033
+ "optional": true,
5034
+ "type": {
5035
+ "fqn": "@aws-cdk/aws-redshift-alpha.ResourceAction"
5036
+ }
5037
+ },
5020
5038
  {
5021
5039
  "abstract": true,
5022
5040
  "docs": {
@@ -5028,7 +5046,7 @@
5028
5046
  "immutable": true,
5029
5047
  "locationInModule": {
5030
5048
  "filename": "lib/cluster.ts",
5031
- "line": 320
5049
+ "line": 342
5032
5050
  },
5033
5051
  "name": "roles",
5034
5052
  "optional": true,
@@ -5051,7 +5069,7 @@
5051
5069
  "immutable": true,
5052
5070
  "locationInModule": {
5053
5071
  "filename": "lib/cluster.ts",
5054
- "line": 300
5072
+ "line": 322
5055
5073
  },
5056
5074
  "name": "securityGroups",
5057
5075
  "optional": true,
@@ -5074,7 +5092,7 @@
5074
5092
  "immutable": true,
5075
5093
  "locationInModule": {
5076
5094
  "filename": "lib/cluster.ts",
5077
- "line": 307
5095
+ "line": 329
5078
5096
  },
5079
5097
  "name": "subnetGroup",
5080
5098
  "optional": true,
@@ -5092,7 +5110,7 @@
5092
5110
  "immutable": true,
5093
5111
  "locationInModule": {
5094
5112
  "filename": "lib/cluster.ts",
5095
- "line": 293
5113
+ "line": 315
5096
5114
  },
5097
5115
  "name": "vpcSubnets",
5098
5116
  "optional": true,
@@ -5923,7 +5941,7 @@
5923
5941
  "kind": "interface",
5924
5942
  "locationInModule": {
5925
5943
  "filename": "lib/cluster.ts",
5926
- "line": 165
5944
+ "line": 187
5927
5945
  },
5928
5946
  "name": "ICluster",
5929
5947
  "properties": [
@@ -5939,7 +5957,7 @@
5939
5957
  "immutable": true,
5940
5958
  "locationInModule": {
5941
5959
  "filename": "lib/cluster.ts",
5942
- "line": 178
5960
+ "line": 200
5943
5961
  },
5944
5962
  "name": "clusterEndpoint",
5945
5963
  "type": {
@@ -5958,7 +5976,7 @@
5958
5976
  "immutable": true,
5959
5977
  "locationInModule": {
5960
5978
  "filename": "lib/cluster.ts",
5961
- "line": 171
5979
+ "line": 193
5962
5980
  },
5963
5981
  "name": "clusterName",
5964
5982
  "type": {
@@ -6294,7 +6312,7 @@
6294
6312
  "kind": "interface",
6295
6313
  "locationInModule": {
6296
6314
  "filename": "lib/cluster.ts",
6297
- "line": 119
6315
+ "line": 141
6298
6316
  },
6299
6317
  "name": "LoggingProperties",
6300
6318
  "properties": [
@@ -6308,7 +6326,7 @@
6308
6326
  "immutable": true,
6309
6327
  "locationInModule": {
6310
6328
  "filename": "lib/cluster.ts",
6311
- "line": 124
6329
+ "line": 146
6312
6330
  },
6313
6331
  "name": "loggingBucket",
6314
6332
  "type": {
@@ -6324,7 +6342,7 @@
6324
6342
  "immutable": true,
6325
6343
  "locationInModule": {
6326
6344
  "filename": "lib/cluster.ts",
6327
- "line": 129
6345
+ "line": 151
6328
6346
  },
6329
6347
  "name": "loggingKeyPrefix",
6330
6348
  "type": {
@@ -6349,7 +6367,7 @@
6349
6367
  "kind": "interface",
6350
6368
  "locationInModule": {
6351
6369
  "filename": "lib/cluster.ts",
6352
- "line": 86
6370
+ "line": 108
6353
6371
  },
6354
6372
  "name": "Login",
6355
6373
  "properties": [
@@ -6362,7 +6380,7 @@
6362
6380
  "immutable": true,
6363
6381
  "locationInModule": {
6364
6382
  "filename": "lib/cluster.ts",
6365
- "line": 90
6383
+ "line": 112
6366
6384
  },
6367
6385
  "name": "masterUsername",
6368
6386
  "type": {
@@ -6379,7 +6397,7 @@
6379
6397
  "immutable": true,
6380
6398
  "locationInModule": {
6381
6399
  "filename": "lib/cluster.ts",
6382
- "line": 106
6400
+ "line": 128
6383
6401
  },
6384
6402
  "name": "encryptionKey",
6385
6403
  "optional": true,
@@ -6397,7 +6415,7 @@
6397
6415
  "immutable": true,
6398
6416
  "locationInModule": {
6399
6417
  "filename": "lib/cluster.ts",
6400
- "line": 113
6418
+ "line": 135
6401
6419
  },
6402
6420
  "name": "excludeCharacters",
6403
6421
  "optional": true,
@@ -6416,7 +6434,7 @@
6416
6434
  "immutable": true,
6417
6435
  "locationInModule": {
6418
6436
  "filename": "lib/cluster.ts",
6419
- "line": 99
6437
+ "line": 121
6420
6438
  },
6421
6439
  "name": "masterPassword",
6422
6440
  "optional": true,
@@ -6511,6 +6529,49 @@
6511
6529
  "name": "NodeType",
6512
6530
  "symbolId": "lib/cluster:NodeType"
6513
6531
  },
6532
+ "@aws-cdk/aws-redshift-alpha.ResourceAction": {
6533
+ "assembly": "@aws-cdk/aws-redshift-alpha",
6534
+ "docs": {
6535
+ "stability": "experimental",
6536
+ "summary": "The Amazon Redshift operation.",
6537
+ "example": "import * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport { ResourceAction } from '@aws-cdk/aws-redshift-alpha';\n\ndeclare const vpc: ec2.IVpc;\n\n// Pause the cluster\nnew Cluster(this, 'PausedCluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n resourceAction: ResourceAction.PAUSE,\n});\n\n// Resume the cluster\nnew Cluster(this, 'ResumedCluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n vpc,\n resourceAction: ResourceAction.RESUME,\n});\n\n// Failover the cluster\nnew Cluster(this, 'FailOverCluster', {\n masterUser: {\n masterUsername: 'admin',\n },\n // VPC must have 3 AZs for the cluster which executes failover action\n vpc,\n // Must be a multi-AZ cluster to failover\n multiAz: true,\n resourceAction: ResourceAction.FAILOVER_PRIMARY_COMPUTE,\n});",
6538
+ "custom": {
6539
+ "exampleMetadata": "infused"
6540
+ }
6541
+ },
6542
+ "fqn": "@aws-cdk/aws-redshift-alpha.ResourceAction",
6543
+ "kind": "enum",
6544
+ "locationInModule": {
6545
+ "filename": "lib/cluster.ts",
6546
+ "line": 86
6547
+ },
6548
+ "members": [
6549
+ {
6550
+ "docs": {
6551
+ "stability": "experimental",
6552
+ "summary": "Pause the cluster."
6553
+ },
6554
+ "name": "PAUSE_CLUSTER"
6555
+ },
6556
+ {
6557
+ "docs": {
6558
+ "stability": "experimental",
6559
+ "summary": "Resume the cluster."
6560
+ },
6561
+ "name": "RESUME_CLUSTER"
6562
+ },
6563
+ {
6564
+ "docs": {
6565
+ "see": "https://docs.aws.amazon.com/redshift/latest/mgmt/test-cluster-multi-az.html",
6566
+ "stability": "experimental",
6567
+ "summary": "Failing over to the other availability zone."
6568
+ },
6569
+ "name": "FAILOVER_PRIMARY_COMPUTE"
6570
+ }
6571
+ ],
6572
+ "name": "ResourceAction",
6573
+ "symbolId": "lib/cluster:ResourceAction"
6574
+ },
6514
6575
  "@aws-cdk/aws-redshift-alpha.RotationMultiUserOptions": {
6515
6576
  "assembly": "@aws-cdk/aws-redshift-alpha",
6516
6577
  "datatype": true,
@@ -6526,7 +6587,7 @@
6526
6587
  "kind": "interface",
6527
6588
  "locationInModule": {
6528
6589
  "filename": "lib/cluster.ts",
6529
- "line": 135
6590
+ "line": 157
6530
6591
  },
6531
6592
  "name": "RotationMultiUserOptions",
6532
6593
  "properties": [
@@ -6540,7 +6601,7 @@
6540
6601
  "immutable": true,
6541
6602
  "locationInModule": {
6542
6603
  "filename": "lib/cluster.ts",
6543
- "line": 150
6604
+ "line": 172
6544
6605
  },
6545
6606
  "name": "secret",
6546
6607
  "type": {
@@ -6557,7 +6618,7 @@
6557
6618
  "immutable": true,
6558
6619
  "locationInModule": {
6559
6620
  "filename": "lib/cluster.ts",
6560
- "line": 158
6621
+ "line": 180
6561
6622
  },
6562
6623
  "name": "automaticallyAfter",
6563
6624
  "optional": true,
@@ -7580,6 +7641,6 @@
7580
7641
  "symbolId": "lib/user:UserProps"
7581
7642
  }
7582
7643
  },
7583
- "version": "2.171.0-alpha.0",
7644
+ "version": "2.172.0-alpha.0",
7584
7645
  "fingerprint": "**********"
7585
7646
  }