enum ResourceAction
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Redshift.Alpha.ResourceAction |
Go | github.com/aws/aws-cdk-go/awscdkredshiftalpha/v2#ResourceAction |
Java | software.amazon.awscdk.services.redshift.alpha.ResourceAction |
Python | aws_cdk.aws_redshift_alpha.ResourceAction |
TypeScript (source) | @aws-cdk/aws-redshift-alpha 禄 ResourceAction |
The Amazon Redshift operation.
Example
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
Name | Description |
---|---|
PAUSE_CLUSTER | Pause the cluster. |
RESUME_CLUSTER | Resume the cluster. |
FAILOVER_PRIMARY_COMPUTE | Failing over to the other availability zone. |
PAUSE_CLUSTER
Pause the cluster.
RESUME_CLUSTER
Resume the cluster.
FAILOVER_PRIMARY_COMPUTE
Failing over to the other availability zone.
See also: https://docs.aws.amazon.com/redshift/latest/mgmt/test-cluster-multi-az.html