Skip to content
v2.277.0

Experimental

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

ClusterSubnetGroupProps Struct ​

Properties for creating a ClusterSubnetGroup.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as redshift_alpha from '@aws-cdk/aws-redshift-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';

declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const vpc: ec2.Vpc;
const clusterSubnetGroupProps: redshift_alpha.ClusterSubnetGroupProps = {
  description: 'description',
  vpc: vpc,

  // the properties below are optional
  removalPolicy: cdk.RemovalPolicy.DESTROY,
  vpcSubnets: {
    availabilityZones: ['availabilityZones'],
    onePerAz: false,
    subnetFilters: [subnetFilter],
    subnetGroupName: 'subnetGroupName',
    subnets: [subnet],
    subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_redshift_alpha as redshift_alpha
import aws_cdk as cdk
from aws_cdk import aws_ec2 as ec2

# subnet: ec2.Subnet
# subnet_filter: ec2.SubnetFilter
# vpc: ec2.Vpc

cluster_subnet_group_props = redshift_alpha.ClusterSubnetGroupProps(
    description="description",
    vpc=vpc,

    # the properties below are optional
    removal_policy=cdk.RemovalPolicy.DESTROY,
    vpc_subnets=ec2.SubnetSelection(
        availability_zones=["availabilityZones"],
        one_per_az=False,
        subnet_filters=[subnet_filter],
        subnet_group_name="subnetGroupName",
        subnets=[subnet],
        subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.redshift.alpha.*;
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;

Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;

ClusterSubnetGroupProps clusterSubnetGroupProps = ClusterSubnetGroupProps.builder()
        .description("description")
        .vpc(vpc)

        // the properties below are optional
        .removalPolicy(RemovalPolicy.DESTROY)
        .vpcSubnets(SubnetSelection.builder()
                .availabilityZones(List.of("availabilityZones"))
                .onePerAz(false)
                .subnetFilters(List.of(subnetFilter))
                .subnetGroupName("subnetGroupName")
                .subnets(List.of(subnet))
                .subnetType(SubnetType.PRIVATE_ISOLATED)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Redshift.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Redshift.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;

Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;

var clusterSubnetGroupProps = new ClusterSubnetGroupProps {
    Description = "description",
    Vpc = vpc,

    // the properties below are optional
    RemovalPolicy = RemovalPolicy.DESTROY,
    VpcSubnets = new SubnetSelection {
        AvailabilityZones = new [] { "availabilityZones" },
        OnePerAz = false,
        SubnetFilters = new [] { subnetFilter },
        SubnetGroupName = "subnetGroupName",
        Subnets = new [] { subnet },
        SubnetType = SubnetType.PRIVATE_ISOLATED
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdkredshiftalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import redshift_alpha "github.com/aws/aws-cdk-go/awscdkredshiftalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var subnet Subnet
var subnetFilter SubnetFilter
var vpc Vpc

clusterSubnetGroupProps := &ClusterSubnetGroupProps{
	Description: jsii.String("description"),
	Vpc: vpc,

	// the properties below are optional
	RemovalPolicy: cdk.RemovalPolicy_DESTROY,
	VpcSubnets: &SubnetSelection{
		AvailabilityZones: []*string{
			jsii.String("availabilityZones"),
		},
		OnePerAz: jsii.Boolean(false),
		SubnetFilters: []SubnetFilter{
			subnetFilter,
		},
		SubnetGroupName: jsii.String("subnetGroupName"),
		Subnets: []ISubnet{
			subnet,
		},
		SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED,
	},
}

Properties ​

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*stringrequired#
Description of the subnet group.
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.RETAIN#
The removal policy to apply when the subnet group are removed from the stack or replaced during an update.
vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The VPC to place the subnet group in.
vpcSubnetsoptionalSubnetSelectionvpc_subnetsoptionalSubnetSelectionvpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelection#
Which subnets within the VPC to associate with this group.

Default: private subnets