Skip to content
v2.273.0

Experimental

@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ResourceAction Enum ​

The Amazon Redshift operation.

Example ​

ts
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import { ResourceAction } from '@aws-cdk/aws-redshift-alpha';

declare const vpc: ec2.IVpc;

// Pause the cluster
new Cluster(this, 'PausedCluster', {
  masterUser: {
    masterUsername: 'admin',
  },
  vpc,
  resourceAction: ResourceAction.PAUSE,
});

// Resume the cluster
new Cluster(this, 'ResumedCluster', {
  masterUser: {
    masterUsername: 'admin',
  },
  vpc,
  resourceAction: ResourceAction.RESUME,
});

// Failover the cluster
new Cluster(this, 'FailOverCluster', {
  masterUser: {
    masterUsername: 'admin',
  },
  // VPC must have 3 AZs for the cluster which executes failover action
  vpc,
  // Must be a multi-AZ cluster to failover
  multiAz: true,
  resourceAction: ResourceAction.FAILOVER_PRIMARY_COMPUTE,
});

Members ​

MemberDescription
PAUSE_CLUSTERPause the cluster.
RESUME_CLUSTERResume the cluster.
FAILOVER_PRIMARY_COMPUTEFailing over to the other availability zone.

Referenced by ​

  • ClusterProps.resourceActionresource_actionresourceActionResourceActionResourceAction