Documentation ¶
Overview ¶
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
The CDK Construct Library for AWS::Redshift
Index ¶
- func ClusterParameterGroup_IsConstruct(x interface{}) *bool
- func ClusterParameterGroup_IsOwnedResource(construct constructs.IConstruct) *bool
- func ClusterParameterGroup_IsResource(construct constructs.IConstruct) *bool
- func ClusterSubnetGroup_IsConstruct(x interface{}) *bool
- func ClusterSubnetGroup_IsOwnedResource(construct constructs.IConstruct) *bool
- func ClusterSubnetGroup_IsResource(construct constructs.IConstruct) *bool
- func Cluster_IsConstruct(x interface{}) *bool
- func Cluster_IsOwnedResource(construct constructs.IConstruct) *bool
- func Cluster_IsResource(construct constructs.IConstruct) *bool
- func DatabaseSecret_FromSecretAttributes(scope constructs.Construct, id *string, ...) awssecretsmanager.ISecret
- func DatabaseSecret_FromSecretCompleteArn(scope constructs.Construct, id *string, secretCompleteArn *string) awssecretsmanager.ISecret
- func DatabaseSecret_FromSecretNameV2(scope constructs.Construct, id *string, secretName *string) awssecretsmanager.ISecret
- func DatabaseSecret_FromSecretPartialArn(scope constructs.Construct, id *string, secretPartialArn *string) awssecretsmanager.ISecret
- func DatabaseSecret_IsConstruct(x interface{}) *bool
- func DatabaseSecret_IsOwnedResource(construct constructs.IConstruct) *bool
- func DatabaseSecret_IsResource(construct constructs.IConstruct) *bool
- func DatabaseSecret_IsSecret(x interface{}) *bool
- func NewClusterParameterGroup_Override(c ClusterParameterGroup, scope constructs.Construct, id *string, ...)
- func NewClusterSubnetGroup_Override(c ClusterSubnetGroup, scope constructs.Construct, id *string, ...)
- func NewCluster_Override(c Cluster, scope constructs.Construct, id *string, props *ClusterProps)
- func NewDatabaseSecret_Override(d DatabaseSecret, scope constructs.Construct, id *string, ...)
- func NewEndpoint_Override(e Endpoint, address *string, port *float64)
- func NewTable_Override(t Table, scope constructs.Construct, id *string, props *TableProps)
- func NewUser_Override(u User, scope constructs.Construct, id *string, props *UserProps)
- func Table_IsConstruct(x interface{}) *bool
- func User_IsConstruct(x interface{}) *bool
- type Cluster
- type ClusterAttributes
- type ClusterParameterGroup
- type ClusterParameterGroupProps
- type ClusterProps
- type ClusterSubnetGroup
- type ClusterSubnetGroupProps
- type ClusterType
- type Column
- type DatabaseOptions
- type DatabaseSecret
- type DatabaseSecretProps
- type Endpoint
- type ICluster
- type IClusterParameterGroup
- type IClusterSubnetGroup
- type ITable
- type IUser
- type LoggingProperties
- type Login
- type NodeType
- type RotationMultiUserOptions
- type Table
- type TableAction
- type TableAttributes
- type TableDistStyle
- type TableProps
- type TableSortStyle
- type User
- type UserAttributes
- type UserProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterParameterGroup_IsConstruct ¶
func ClusterParameterGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func ClusterParameterGroup_IsOwnedResource ¶
func ClusterParameterGroup_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func ClusterParameterGroup_IsResource ¶
func ClusterParameterGroup_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func ClusterSubnetGroup_IsConstruct ¶
func ClusterSubnetGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func ClusterSubnetGroup_IsOwnedResource ¶
func ClusterSubnetGroup_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func ClusterSubnetGroup_IsResource ¶
func ClusterSubnetGroup_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func Cluster_IsConstruct ¶
func Cluster_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Cluster_IsOwnedResource ¶
func Cluster_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func Cluster_IsResource ¶
func Cluster_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func DatabaseSecret_FromSecretAttributes ¶
func DatabaseSecret_FromSecretAttributes(scope constructs.Construct, id *string, attrs *awssecretsmanager.SecretAttributes) awssecretsmanager.ISecret
Import an existing secret into the Stack. Experimental.
func DatabaseSecret_FromSecretCompleteArn ¶
func DatabaseSecret_FromSecretCompleteArn(scope constructs.Construct, id *string, secretCompleteArn *string) awssecretsmanager.ISecret
Imports a secret by complete ARN.
The complete ARN is the ARN with the Secrets Manager-supplied suffix. Experimental.
func DatabaseSecret_FromSecretNameV2 ¶
func DatabaseSecret_FromSecretNameV2(scope constructs.Construct, id *string, secretName *string) awssecretsmanager.ISecret
Imports a secret by secret name.
A secret with this name must exist in the same account & region. Replaces the deprecated `fromSecretName`. Experimental.
func DatabaseSecret_FromSecretPartialArn ¶
func DatabaseSecret_FromSecretPartialArn(scope constructs.Construct, id *string, secretPartialArn *string) awssecretsmanager.ISecret
Imports a secret by partial ARN.
The partial ARN is the ARN without the Secrets Manager-supplied suffix. Experimental.
func DatabaseSecret_IsConstruct ¶
func DatabaseSecret_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func DatabaseSecret_IsOwnedResource ¶
func DatabaseSecret_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Experimental.
func DatabaseSecret_IsResource ¶
func DatabaseSecret_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func DatabaseSecret_IsSecret ¶
func DatabaseSecret_IsSecret(x interface{}) *bool
Return whether the given object is a Secret. Experimental.
func NewClusterParameterGroup_Override ¶
func NewClusterParameterGroup_Override(c ClusterParameterGroup, scope constructs.Construct, id *string, props *ClusterParameterGroupProps)
Experimental.
func NewClusterSubnetGroup_Override ¶
func NewClusterSubnetGroup_Override(c ClusterSubnetGroup, scope constructs.Construct, id *string, props *ClusterSubnetGroupProps)
Experimental.
func NewCluster_Override ¶
func NewCluster_Override(c Cluster, scope constructs.Construct, id *string, props *ClusterProps)
Experimental.
func NewDatabaseSecret_Override ¶
func NewDatabaseSecret_Override(d DatabaseSecret, scope constructs.Construct, id *string, props *DatabaseSecretProps)
Experimental.
func NewEndpoint_Override ¶
Experimental.
func NewTable_Override ¶
func NewTable_Override(t Table, scope constructs.Construct, id *string, props *TableProps)
Experimental.
func NewUser_Override ¶
Experimental.
func Table_IsConstruct ¶
func Table_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func User_IsConstruct ¶
func User_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
Types ¶
type Cluster ¶
type Cluster interface { awscdk.Resource ICluster // The endpoint to use for read/write operations. // Experimental. ClusterEndpoint() Endpoint // Identifier of the cluster. // Experimental. ClusterName() *string // Access to the network connections. // Experimental. Connections() awsec2.Connections // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // The cluster's parameter group. // Experimental. ParameterGroup() IClusterParameterGroup // Experimental. SetParameterGroup(val IClusterParameterGroup) // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The secret attached to this cluster. // Experimental. Secret() awssecretsmanager.ISecret // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Adds the multi user rotation to this cluster. // Experimental. AddRotationMultiUser(id *string, options *RotationMultiUserOptions) awssecretsmanager.SecretRotation // Adds the single user rotation of the master password to this cluster. // Experimental. AddRotationSingleUser(automaticallyAfter awscdk.Duration) awssecretsmanager.SecretRotation // Adds a parameter to the Clusters' parameter group. // Experimental. AddToParameterGroup(name *string, value *string) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Renders the secret attachment target specifications. // Experimental. AsSecretAttachmentTarget() *awssecretsmanager.SecretAttachmentTargetProps // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Create a Redshift cluster a given number of nodes.
Example:
// Example automatically generated from non-compiling source. May contain errors. var vpc ec2.Vpc cluster := awscdkredshiftalpha.NewCluster(this, jsii.String("Cluster"), &clusterProps{ masterUser: &login{ masterUsername: jsii.String("admin"), masterPassword: cdk.secretValue_UnsafePlainText(jsii.String("tooshort")), }, vpc: vpc, }) cluster.addToParameterGroup(jsii.String("enable_user_activity_logging"), jsii.String("true"))
Experimental.
func NewCluster ¶
func NewCluster(scope constructs.Construct, id *string, props *ClusterProps) Cluster
Experimental.
type ClusterAttributes ¶
type ClusterAttributes struct { // Cluster endpoint address. // Experimental. ClusterEndpointAddress *string `field:"required" json:"clusterEndpointAddress" yaml:"clusterEndpointAddress"` // Cluster endpoint port. // Experimental. ClusterEndpointPort *float64 `field:"required" json:"clusterEndpointPort" yaml:"clusterEndpointPort"` // Identifier for the cluster. // Experimental. ClusterName *string `field:"required" json:"clusterName" yaml:"clusterName"` // The security groups of the redshift cluster. // Experimental. SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` }
Properties that describe an existing cluster instance.
Example:
// 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 "github.com/aws/aws-cdk-go/awscdk" var securityGroup securityGroup clusterAttributes := &clusterAttributes{ clusterEndpointAddress: jsii.String("clusterEndpointAddress"), clusterEndpointPort: jsii.Number(123), clusterName: jsii.String("clusterName"), // the properties below are optional securityGroups: []iSecurityGroup{ securityGroup, }, }
Experimental.
type ClusterParameterGroup ¶
type ClusterParameterGroup interface { awscdk.Resource IClusterParameterGroup // The name of the parameter group. // Experimental. ClusterParameterGroupName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // The parameters in the parameter group. // Experimental. Parameters() *map[string]*string // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Adds a parameter to the parameter group. // Experimental. AddParameter(name *string, value *string) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
A cluster parameter group.
Example:
// 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" clusterParameterGroup := redshift_alpha.NewClusterParameterGroup(this, jsii.String("MyClusterParameterGroup"), &clusterParameterGroupProps{ parameters: map[string]*string{ "parametersKey": jsii.String("parameters"), }, // the properties below are optional description: jsii.String("description"), })
Experimental.
func NewClusterParameterGroup ¶
func NewClusterParameterGroup(scope constructs.Construct, id *string, props *ClusterParameterGroupProps) ClusterParameterGroup
Experimental.
type ClusterParameterGroupProps ¶
type ClusterParameterGroupProps struct { // The parameters in this parameter group. // Experimental. Parameters *map[string]*string `field:"required" json:"parameters" yaml:"parameters"` // Description for this parameter group. // Experimental. Description *string `field:"optional" json:"description" yaml:"description"` }
Properties for a parameter group.
Example:
// 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" clusterParameterGroupProps := &clusterParameterGroupProps{ parameters: map[string]*string{ "parametersKey": jsii.String("parameters"), }, // the properties below are optional description: jsii.String("description"), }
Experimental.
type ClusterProps ¶
type ClusterProps struct { // Username and password for the administrative user. // Experimental. MasterUser *Login `field:"required" json:"masterUser" yaml:"masterUser"` // The VPC to place the cluster in. // Experimental. Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"` // If this flag is set, the cluster resizing type will be set to classic. // // When resizing a cluster, classic resizing will always provision a new cluster and transfer the data there. // // Classic resize takes more time to complete, but it can be useful in cases where the change in node count or // the node type to migrate to doesn't fall within the bounds for elastic resize. // See: https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#elastic-resize // // Experimental. ClassicResizing *bool `field:"optional" json:"classicResizing" yaml:"classicResizing"` // An optional identifier for the cluster. // Experimental. ClusterName *string `field:"optional" json:"clusterName" yaml:"clusterName"` // Settings for the individual instances that are launched. // Experimental. ClusterType ClusterType `field:"optional" json:"clusterType" yaml:"clusterType"` // Name of a database which is automatically created inside the cluster. // Experimental. DefaultDatabaseName *string `field:"optional" json:"defaultDatabaseName" yaml:"defaultDatabaseName"` // The Elastic IP (EIP) address for the cluster. // See: https://docs.aws.amazon.com/redshift/latest/mgmt/managing-clusters-vpc.html // // Experimental. ElasticIp *string `field:"optional" json:"elasticIp" yaml:"elasticIp"` // Whether to enable encryption of data at rest in the cluster. // Experimental. Encrypted *bool `field:"optional" json:"encrypted" yaml:"encrypted"` // The KMS key to use for encryption of data at rest. // Experimental. EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // Bucket details for log files to be sent to, including prefix. // Experimental. LoggingProperties *LoggingProperties `field:"optional" json:"loggingProperties" yaml:"loggingProperties"` // The node type to be provisioned for the cluster. // Experimental. NodeType NodeType `field:"optional" json:"nodeType" yaml:"nodeType"` // Number of compute nodes in the cluster. Only specify this property for multi-node clusters. // // Value must be at least 2 and no more than 100. // Experimental. NumberOfNodes *float64 `field:"optional" json:"numberOfNodes" yaml:"numberOfNodes"` // Additional parameters to pass to the database engine https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html. // Experimental. ParameterGroup IClusterParameterGroup `field:"optional" json:"parameterGroup" yaml:"parameterGroup"` // What port to listen on. // Experimental. Port *float64 `field:"optional" json:"port" yaml:"port"` // A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). // // Example: 'Sun:23:45-Mon:00:15'. // See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance // // Experimental. PreferredMaintenanceWindow *string `field:"optional" json:"preferredMaintenanceWindow" yaml:"preferredMaintenanceWindow"` // Whether to make cluster publicly accessible. // Experimental. PubliclyAccessible *bool `field:"optional" json:"publiclyAccessible" yaml:"publiclyAccessible"` // The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update. // Experimental. RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"` // A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services. // // Specify a maximum of 10 roles. // Experimental. Roles *[]awsiam.IRole `field:"optional" json:"roles" yaml:"roles"` // Security group. // Experimental. SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // A cluster subnet group to use with this cluster. // Experimental. SubnetGroup IClusterSubnetGroup `field:"optional" json:"subnetGroup" yaml:"subnetGroup"` // Where to place the instances within the VPC. // Experimental. VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"` }
Properties for a new database cluster.
Example:
// Example automatically generated from non-compiling source. May contain errors. var vpc ec2.Vpc cluster := awscdkredshiftalpha.NewCluster(this, jsii.String("Cluster"), &clusterProps{ masterUser: &login{ masterUsername: jsii.String("admin"), masterPassword: cdk.secretValue_UnsafePlainText(jsii.String("tooshort")), }, vpc: vpc, }) cluster.addToParameterGroup(jsii.String("enable_user_activity_logging"), jsii.String("true"))
Experimental.
type ClusterSubnetGroup ¶
type ClusterSubnetGroup interface { awscdk.Resource IClusterSubnetGroup // The name of the cluster subnet group. // Experimental. ClusterSubnetGroupName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. // Experimental. ToString() *string }
Class for creating a Redshift cluster subnet group.
Example:
// 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 clusterSubnetGroup := redshift_alpha.NewClusterSubnetGroup(this, jsii.String("MyClusterSubnetGroup"), &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, }, })
Experimental.
func NewClusterSubnetGroup ¶
func NewClusterSubnetGroup(scope constructs.Construct, id *string, props *ClusterSubnetGroupProps) ClusterSubnetGroup
Experimental.
type ClusterSubnetGroupProps ¶
type ClusterSubnetGroupProps struct { // Description of the subnet group. // Experimental. Description *string `field:"required" json:"description" yaml:"description"` // The VPC to place the subnet group in. // Experimental. Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"` // The removal policy to apply when the subnet group are removed from the stack or replaced during an update. // Experimental. RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"` // Which subnets within the VPC to associate with this group. // Experimental. VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"` }
Properties for creating a ClusterSubnetGroup.
Example:
// 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, }, }
Experimental.
type ClusterType ¶
type ClusterType string
What cluster type to use.
Used by {@link ClusterProps.clusterType} Experimental.
const ( // single-node cluster, the {@link ClusterProps.numberOfNodes} parameter is not required. // Experimental. ClusterType_SINGLE_NODE ClusterType = "SINGLE_NODE" // multi-node cluster, set the amount of nodes using {@link ClusterProps.numberOfNodes} parameter. // Experimental. ClusterType_MULTI_NODE ClusterType = "MULTI_NODE" )
type Column ¶
type Column struct { // The data type of the column. // Experimental. DataType *string `field:"required" json:"dataType" yaml:"dataType"` // The name of the column. // Experimental. Name *string `field:"required" json:"name" yaml:"name"` // Boolean value that indicates whether the column is to be configured as DISTKEY. // Experimental. DistKey *bool `field:"optional" json:"distKey" yaml:"distKey"` // Boolean value that indicates whether the column is to be configured as SORTKEY. // Experimental. SortKey *bool `field:"optional" json:"sortKey" yaml:"sortKey"` }
A column in a Redshift table.
Example:
// 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" column := &column{ dataType: jsii.String("dataType"), name: jsii.String("name"), // the properties below are optional distKey: jsii.Boolean(false), sortKey: jsii.Boolean(false), }
Experimental.
type DatabaseOptions ¶
type DatabaseOptions struct { // The cluster containing the database. // Experimental. Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"` // The name of the database. // Experimental. DatabaseName *string `field:"required" json:"databaseName" yaml:"databaseName"` // The secret containing credentials to a Redshift user with administrator privileges. // // Secret JSON schema: `{ username: string; password: string }`. // Experimental. AdminUser awssecretsmanager.ISecret `field:"optional" json:"adminUser" yaml:"adminUser"` }
Properties for accessing a Redshift database.
Example:
// 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 "github.com/aws/aws-cdk-go/awscdk" var cluster cluster var secret secret databaseOptions := &databaseOptions{ cluster: cluster, databaseName: jsii.String("databaseName"), // the properties below are optional adminUser: secret, }
Experimental.
type DatabaseSecret ¶
type DatabaseSecret interface { awssecretsmanager.Secret // Provides an identifier for this secret for use in IAM policies. // // If there is a full ARN, this is just the ARN; // if we have a partial ARN -- due to either importing by secret name or partial ARN -- // then we need to add a suffix to capture the full ARN's format. // Experimental. ArnForPolicies() *string // Experimental. AutoCreatePolicy() *bool // The customer-managed encryption key that is used to encrypt this secret, if any. // // When not specified, the default // KMS key for the account and region is being used. // Experimental. EncryptionKey() awskms.IKey // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Experimental. Env() *awscdk.ResourceEnvironment // The string of the characters that are excluded in this secret when it is generated. // Experimental. ExcludeCharacters() *string // The tree node. // Experimental. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string // The ARN of the secret in AWS Secrets Manager. // // Will return the full ARN if available, otherwise a partial arn. // For secrets imported by the deprecated `fromSecretName`, it will return the `secretName`. // Experimental. SecretArn() *string // The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix. // // This is equal to `secretArn` in most cases, but is undefined when a full ARN is not available (e.g., secrets imported by name). // Experimental. SecretFullArn() *string // The name of the secret. // // For "owned" secrets, this will be the full resource name (secret name + suffix), unless the // '@aws-cdk/aws-secretsmanager:parseOwnedSecretName' feature flag is set. // Experimental. SecretName() *string // Retrieve the value of the stored secret as a `SecretValue`. // Experimental. SecretValue() awscdk.SecretValue // The stack in which this resource is defined. // Experimental. Stack() awscdk.Stack // Adds a replica region for the secret. // Experimental. AddReplicaRegion(region *string, encryptionKey awskms.IKey) // Adds a rotation schedule to the secret. // Experimental. AddRotationSchedule(id *string, options *awssecretsmanager.RotationScheduleOptions) awssecretsmanager.RotationSchedule // Adds a statement to the IAM resource policy associated with this secret. // // If this secret was created in this stack, a resource policy will be // automatically created upon the first call to `addToResourcePolicy`. If // the secret is imported, then this is a no-op. // Experimental. AddToResourcePolicy(statement awsiam.PolicyStatement) *awsiam.AddToResourcePolicyResult // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Attach a target to this secret. // // Returns: An attached secret. // Experimental. Attach(target awssecretsmanager.ISecretAttachmentTarget) awssecretsmanager.ISecret // Denies the `DeleteSecret` action to all principals within the current account. // Experimental. DenyAccountRootDelete() // Experimental. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Experimental. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Experimental. GetResourceNameAttribute(nameAttr *string) *string // Grants reading the secret value to some role. // Experimental. GrantRead(grantee awsiam.IGrantable, versionStages *[]*string) awsiam.Grant // Grants writing and updating the secret value to some role. // Experimental. GrantWrite(grantee awsiam.IGrantable) awsiam.Grant // Interpret the secret as a JSON object and return a field's value from it as a `SecretValue`. // Experimental. SecretValueFromJson(jsonField *string) awscdk.SecretValue // Returns a string representation of this construct. // Experimental. ToString() *string }
A database secret.
Example:
// 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 "github.com/aws/aws-cdk-go/awscdk" var key key databaseSecret := redshift_alpha.NewDatabaseSecret(this, jsii.String("MyDatabaseSecret"), &databaseSecretProps{ username: jsii.String("username"), // the properties below are optional encryptionKey: key, })
Experimental.
func NewDatabaseSecret ¶
func NewDatabaseSecret(scope constructs.Construct, id *string, props *DatabaseSecretProps) DatabaseSecret
Experimental.
type DatabaseSecretProps ¶
type DatabaseSecretProps struct { // The username. // Experimental. Username *string `field:"required" json:"username" yaml:"username"` // The KMS key to use to encrypt the secret. // Experimental. EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` }
Construction properties for a DatabaseSecret.
Example:
// 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 "github.com/aws/aws-cdk-go/awscdk" var key key databaseSecretProps := &databaseSecretProps{ username: jsii.String("username"), // the properties below are optional encryptionKey: key, }
Experimental.
type Endpoint ¶
type Endpoint interface { // The hostname of the endpoint. // Experimental. Hostname() *string // The port of the endpoint. // Experimental. Port() *float64 // The combination of "HOSTNAME:PORT" for this endpoint. // Experimental. SocketAddress() *string }
Connection endpoint of a redshift cluster.
Consists of a combination of hostname and port.
Example:
// 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" endpoint := redshift_alpha.NewEndpoint(jsii.String("address"), jsii.Number(123))
Experimental.
type ICluster ¶
type ICluster interface { awsec2.IConnectable awscdk.IResource awssecretsmanager.ISecretAttachmentTarget // The endpoint to use for read/write operations. // Experimental. ClusterEndpoint() Endpoint // Name of the cluster. // Experimental. ClusterName() *string }
Create a Redshift Cluster with a given number of nodes.
Implemented by {@link Cluster} via {@link ClusterBase}. Experimental.
func Cluster_FromClusterAttributes ¶
func Cluster_FromClusterAttributes(scope constructs.Construct, id *string, attrs *ClusterAttributes) ICluster
Import an existing DatabaseCluster from properties. Experimental.
type IClusterParameterGroup ¶
type IClusterParameterGroup interface { awscdk.IResource // The name of this parameter group. // Experimental. ClusterParameterGroupName() *string }
A parameter group. Experimental.
func ClusterParameterGroup_FromClusterParameterGroupName ¶
func ClusterParameterGroup_FromClusterParameterGroupName(scope constructs.Construct, id *string, clusterParameterGroupName *string) IClusterParameterGroup
Imports a parameter group. Experimental.
type IClusterSubnetGroup ¶
type IClusterSubnetGroup interface { awscdk.IResource // The name of the cluster subnet group. // Experimental. ClusterSubnetGroupName() *string }
Interface for a cluster subnet group. Experimental.
func ClusterSubnetGroup_FromClusterSubnetGroupName ¶
func ClusterSubnetGroup_FromClusterSubnetGroupName(scope constructs.Construct, id *string, clusterSubnetGroupName *string) IClusterSubnetGroup
Imports an existing subnet group by name. Experimental.
type ITable ¶
type ITable interface { constructs.IConstruct // Grant a user privilege to access this table. // Experimental. Grant(user IUser, actions ...TableAction) // The cluster where the table is located. // Experimental. Cluster() ICluster // The name of the database where the table is located. // Experimental. DatabaseName() *string // The columns of the table. // Experimental. TableColumns() *[]*Column // Name of the table. // Experimental. TableName() *string }
Represents a table in a Redshift database. Experimental.
func Table_FromTableAttributes ¶
func Table_FromTableAttributes(scope constructs.Construct, id *string, attrs *TableAttributes) ITable
Specify a Redshift table using a table name and schema that already exists. Experimental.
type IUser ¶
type IUser interface { constructs.IConstruct // Grant this user privilege to access a table. // Experimental. AddTablePrivileges(table ITable, actions ...TableAction) // The cluster where the table is located. // Experimental. Cluster() ICluster // The name of the database where the table is located. // Experimental. DatabaseName() *string // The password of the user. // Experimental. Password() awscdk.SecretValue // The name of the user. // Experimental. Username() *string }
Represents a user in a Redshift database. Experimental.
func User_FromUserAttributes ¶
func User_FromUserAttributes(scope constructs.Construct, id *string, attrs *UserAttributes) IUser
Specify a Redshift user using credentials that already exist. Experimental.
type LoggingProperties ¶
type LoggingProperties struct { // Bucket to send logs to. // // Logging information includes queries and connection attempts, for the specified Amazon Redshift cluster. // Experimental. LoggingBucket awss3.IBucket `field:"required" json:"loggingBucket" yaml:"loggingBucket"` // Prefix used for logging. // Experimental. LoggingKeyPrefix *string `field:"required" json:"loggingKeyPrefix" yaml:"loggingKeyPrefix"` }
Logging bucket and S3 prefix combination.
Example:
// Example automatically generated from non-compiling source. May contain errors. import ec2 "github.com/aws/aws-cdk-go/awscdk" import s3 "github.com/aws/aws-cdk-go/awscdk" vpc := ec2.NewVpc(this, jsii.String("Vpc")) bucket := s3.bucket.fromBucketName(stack, jsii.String("bucket"), jsii.String("logging-bucket")) cluster := awscdkredshiftalpha.NewCluster(this, jsii.String("Redshift"), &clusterProps{ masterUser: &login{ masterUsername: jsii.String("admin"), }, vpc: vpc, loggingProperties: &loggingProperties{ loggingBucket: loggingBucket, loggingKeyPrefix: jsii.String("prefix"), }, })
Experimental.
type Login ¶
type Login struct { // Username. // Experimental. MasterUsername *string `field:"required" json:"masterUsername" yaml:"masterUsername"` // KMS encryption key to encrypt the generated secret. // Experimental. EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // Password. // // Do not put passwords in your CDK code directly. // Experimental. MasterPassword awscdk.SecretValue `field:"optional" json:"masterPassword" yaml:"masterPassword"` }
Username and password combination.
Example:
user := awscdkredshiftalpha.NewUser(this, jsii.String("User"), &userProps{ cluster: cluster, databaseName: jsii.String("databaseName"), }) cluster.addRotationMultiUser(jsii.String("MultiUserRotation"), &rotationMultiUserOptions{ secret: user.secret, })
Experimental.
type NodeType ¶
type NodeType string
Possible Node Types to use in the cluster used for defining {@link ClusterProps.nodeType}. Experimental.
const ( // ds2.xlarge. // Experimental. NodeType_DS2_XLARGE NodeType = "DS2_XLARGE" // ds2.8xlarge. // Experimental. NodeType_DS2_8XLARGE NodeType = "DS2_8XLARGE" // dc1.large. // Experimental. NodeType_DC1_LARGE NodeType = "DC1_LARGE" // dc1.8xlarge. // Experimental. NodeType_DC1_8XLARGE NodeType = "DC1_8XLARGE" // dc2.large. // Experimental. NodeType_DC2_LARGE NodeType = "DC2_LARGE" // dc2.8xlarge. // Experimental. NodeType_DC2_8XLARGE NodeType = "DC2_8XLARGE" // ra3.xlplus. // Experimental. NodeType_RA3_XLPLUS NodeType = "RA3_XLPLUS" // ra3.4xlarge. // Experimental. NodeType_RA3_4XLARGE NodeType = "RA3_4XLARGE" // ra3.16xlarge. // Experimental. NodeType_RA3_16XLARGE NodeType = "RA3_16XLARGE" )
type RotationMultiUserOptions ¶
type RotationMultiUserOptions struct { // The secret to rotate. // // It must be a JSON string with the following format: // “` // { // "engine": <required: database engine>, // "host": <required: instance host name>, // "username": <required: username>, // "password": <required: password>, // "dbname": <optional: database name>, // "port": <optional: if not specified, default port will be used>, // "masterarn": <required: the arn of the master secret which will be used to create users/change passwords> // } // “`. // Experimental. Secret awssecretsmanager.ISecret `field:"required" json:"secret" yaml:"secret"` // Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation. // Experimental. AutomaticallyAfter awscdk.Duration `field:"optional" json:"automaticallyAfter" yaml:"automaticallyAfter"` }
Options to add the multi user rotation.
Example:
user := awscdkredshiftalpha.NewUser(this, jsii.String("User"), &userProps{ cluster: cluster, databaseName: jsii.String("databaseName"), }) cluster.addRotationMultiUser(jsii.String("MultiUserRotation"), &rotationMultiUserOptions{ secret: user.secret, })
Experimental.
type Table ¶
type Table interface { constructs.Construct ITable // The cluster where the table is located. // Experimental. Cluster() ICluster // The name of the database where the table is located. // Experimental. DatabaseName() *string // The tree node. // Experimental. Node() constructs.Node // The columns of the table. // Experimental. TableColumns() *[]*Column // Name of the table. // Experimental. TableName() *string // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be destroyed (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // // This resource is retained by default. // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Grant a user privilege to access this table. // Experimental. Grant(user IUser, actions ...TableAction) // Returns a string representation of this construct. // Experimental. ToString() *string }
A table in a Redshift cluster.
Example:
awscdkredshiftalpha.NewTable(this, jsii.String("Table"), &tableProps{ tableColumns: []column{ &column{ name: jsii.String("col1"), dataType: jsii.String("varchar(4)"), distKey: jsii.Boolean(true), }, &column{ name: jsii.String("col2"), dataType: jsii.String("float"), }, }, cluster: cluster, databaseName: jsii.String("databaseName"), distStyle: awscdkredshiftalpha.TableDistStyle_KEY, })
Experimental.
func NewTable ¶
func NewTable(scope constructs.Construct, id *string, props *TableProps) Table
Experimental.
type TableAction ¶
type TableAction string
An action that a Redshift user can be granted privilege to perform on a table.
Example:
databaseName := "databaseName" username := "myuser" tableName := "mytable" user := awscdkredshiftalpha.NewUser(this, jsii.String("User"), &userProps{ username: username, cluster: cluster, databaseName: databaseName, }) table := awscdkredshiftalpha.NewTable(this, jsii.String("Table"), &tableProps{ tableColumns: []column{ &column{ name: jsii.String("col1"), dataType: jsii.String("varchar(4)"), }, &column{ name: jsii.String("col2"), dataType: jsii.String("float"), }, }, cluster: cluster, databaseName: databaseName, }) table.grant(user, awscdkredshiftalpha.TableAction_INSERT)
Experimental.
const ( // Grants privilege to select data from a table or view using a SELECT statement. // Experimental. TableAction_SELECT TableAction = "SELECT" // Grants privilege to load data into a table using an INSERT statement or a COPY statement. // Experimental. TableAction_INSERT TableAction = "INSERT" // Grants privilege to update a table column using an UPDATE statement. // Experimental. TableAction_UPDATE TableAction = "UPDATE" // Grants privilege to delete a data row from a table. // Experimental. TableAction_DELETE TableAction = "DELETE" // Grants privilege to drop a table. // Experimental. TableAction_DROP TableAction = "DROP" // Grants privilege to create a foreign key constraint. // // You need to grant this privilege on both the referenced table and the referencing table; otherwise, the user can't create the constraint. // Experimental. TableAction_REFERENCES TableAction = "REFERENCES" // Grants all available privileges at once to the specified user or user group. // Experimental. TableAction_ALL TableAction = "ALL" )
type TableAttributes ¶
type TableAttributes struct { // The cluster where the table is located. // Experimental. Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"` // The name of the database where the table is located. // Experimental. DatabaseName *string `field:"required" json:"databaseName" yaml:"databaseName"` // The columns of the table. // Experimental. TableColumns *[]*Column `field:"required" json:"tableColumns" yaml:"tableColumns"` // Name of the table. // Experimental. TableName *string `field:"required" json:"tableName" yaml:"tableName"` }
A full specification of a Redshift table that can be used to import it fluently into the CDK application.
Example:
databaseName := "databaseName" username := "myuser" tableName := "mytable" user := awscdkredshiftalpha.User.fromUserAttributes(this, jsii.String("User"), &userAttributes{ username: username, password: awscdk.SecretValue.unsafePlainText(jsii.String("NOT_FOR_PRODUCTION")), cluster: cluster, databaseName: databaseName, }) table := awscdkredshiftalpha.Table.fromTableAttributes(this, jsii.String("Table"), &tableAttributes{ tableName: tableName, tableColumns: []column{ &column{ name: jsii.String("col1"), dataType: jsii.String("varchar(4)"), }, &column{ name: jsii.String("col2"), dataType: jsii.String("float"), }, }, cluster: cluster, databaseName: jsii.String("databaseName"), }) table.grant(user, awscdkredshiftalpha.TableAction_INSERT)
Experimental.
type TableDistStyle ¶
type TableDistStyle string
The data distribution style of a table.
Example:
awscdkredshiftalpha.NewTable(this, jsii.String("Table"), &tableProps{ tableColumns: []column{ &column{ name: jsii.String("col1"), dataType: jsii.String("varchar(4)"), distKey: jsii.Boolean(true), }, &column{ name: jsii.String("col2"), dataType: jsii.String("float"), }, }, cluster: cluster, databaseName: jsii.String("databaseName"), distStyle: awscdkredshiftalpha.TableDistStyle_KEY, })
Experimental.
const ( // Amazon Redshift assigns an optimal distribution style based on the table data. // Experimental. TableDistStyle_AUTO TableDistStyle = "AUTO" // The data in the table is spread evenly across the nodes in a cluster in a round-robin distribution. // Experimental. TableDistStyle_EVEN TableDistStyle = "EVEN" // The data is distributed by the values in the DISTKEY column. // Experimental. TableDistStyle_KEY TableDistStyle = "KEY" // A copy of the entire table is distributed to every node. // Experimental. TableDistStyle_ALL TableDistStyle = "ALL" )
type TableProps ¶
type TableProps struct { // The cluster containing the database. // Experimental. Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"` // The name of the database. // Experimental. DatabaseName *string `field:"required" json:"databaseName" yaml:"databaseName"` // The secret containing credentials to a Redshift user with administrator privileges. // // Secret JSON schema: `{ username: string; password: string }`. // Experimental. AdminUser awssecretsmanager.ISecret `field:"optional" json:"adminUser" yaml:"adminUser"` // The columns of the table. // Experimental. TableColumns *[]*Column `field:"required" json:"tableColumns" yaml:"tableColumns"` // The distribution style of the table. // Experimental. DistStyle TableDistStyle `field:"optional" json:"distStyle" yaml:"distStyle"` // The policy to apply when this resource is removed from the application. // Experimental. RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"` // The sort style of the table. // Experimental. SortStyle TableSortStyle `field:"optional" json:"sortStyle" yaml:"sortStyle"` // The name of the table. // Experimental. TableName *string `field:"optional" json:"tableName" yaml:"tableName"` }
Properties for configuring a Redshift table.
Example:
awscdkredshiftalpha.NewTable(this, jsii.String("Table"), &tableProps{ tableColumns: []column{ &column{ name: jsii.String("col1"), dataType: jsii.String("varchar(4)"), distKey: jsii.Boolean(true), }, &column{ name: jsii.String("col2"), dataType: jsii.String("float"), }, }, cluster: cluster, databaseName: jsii.String("databaseName"), distStyle: awscdkredshiftalpha.TableDistStyle_KEY, })
Experimental.
type TableSortStyle ¶
type TableSortStyle string
The sort style of a table.
Example:
awscdkredshiftalpha.NewTable(this, jsii.String("Table"), &tableProps{ tableColumns: []column{ &column{ name: jsii.String("col1"), dataType: jsii.String("varchar(4)"), sortKey: jsii.Boolean(true), }, &column{ name: jsii.String("col2"), dataType: jsii.String("float"), sortKey: jsii.Boolean(true), }, }, cluster: cluster, databaseName: jsii.String("databaseName"), sortStyle: awscdkredshiftalpha.TableSortStyle_COMPOUND, })
Experimental.
const ( // Amazon Redshift assigns an optimal sort key based on the table data. // Experimental. TableSortStyle_AUTO TableSortStyle = "AUTO" // Specifies that the data is sorted using a compound key made up of all of the listed columns, in the order they are listed. // Experimental. TableSortStyle_COMPOUND TableSortStyle = "COMPOUND" // Specifies that the data is sorted using an interleaved sort key. // Experimental. TableSortStyle_INTERLEAVED TableSortStyle = "INTERLEAVED" )
type User ¶
type User interface { constructs.Construct IUser // The cluster where the table is located. // Experimental. Cluster() ICluster // The name of the database where the table is located. // Experimental. DatabaseName() *string // Experimental. DatabaseProps() *DatabaseOptions // Experimental. SetDatabaseProps(val *DatabaseOptions) // The tree node. // Experimental. Node() constructs.Node // The password of the user. // Experimental. Password() awscdk.SecretValue // The Secrets Manager secret of the user. // Experimental. Secret() awssecretsmanager.ISecret // The name of the user. // Experimental. Username() *string // Grant this user privilege to access a table. // Experimental. AddTablePrivileges(table ITable, actions ...TableAction) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be destroyed (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // // This resource is destroyed by default. // Experimental. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Returns a string representation of this construct. // Experimental. ToString() *string }
A user in a Redshift cluster.
Example:
user := awscdkredshiftalpha.NewUser(this, jsii.String("User"), &userProps{ cluster: cluster, databaseName: jsii.String("databaseName"), }) cluster.addRotationMultiUser(jsii.String("MultiUserRotation"), &rotationMultiUserOptions{ secret: user.secret, })
Experimental.
type UserAttributes ¶
type UserAttributes struct { // The cluster containing the database. // Experimental. Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"` // The name of the database. // Experimental. DatabaseName *string `field:"required" json:"databaseName" yaml:"databaseName"` // The secret containing credentials to a Redshift user with administrator privileges. // // Secret JSON schema: `{ username: string; password: string }`. // Experimental. AdminUser awssecretsmanager.ISecret `field:"optional" json:"adminUser" yaml:"adminUser"` // The password of the user. // // Do not put passwords in CDK code directly. // Experimental. Password awscdk.SecretValue `field:"required" json:"password" yaml:"password"` // The name of the user. // Experimental. Username *string `field:"required" json:"username" yaml:"username"` }
A full specification of a Redshift user that can be used to import it fluently into the CDK application.
Example:
databaseName := "databaseName" username := "myuser" tableName := "mytable" user := awscdkredshiftalpha.User.fromUserAttributes(this, jsii.String("User"), &userAttributes{ username: username, password: awscdk.SecretValue.unsafePlainText(jsii.String("NOT_FOR_PRODUCTION")), cluster: cluster, databaseName: databaseName, }) table := awscdkredshiftalpha.Table.fromTableAttributes(this, jsii.String("Table"), &tableAttributes{ tableName: tableName, tableColumns: []column{ &column{ name: jsii.String("col1"), dataType: jsii.String("varchar(4)"), }, &column{ name: jsii.String("col2"), dataType: jsii.String("float"), }, }, cluster: cluster, databaseName: jsii.String("databaseName"), }) table.grant(user, awscdkredshiftalpha.TableAction_INSERT)
Experimental.
type UserProps ¶
type UserProps struct { // The cluster containing the database. // Experimental. Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"` // The name of the database. // Experimental. DatabaseName *string `field:"required" json:"databaseName" yaml:"databaseName"` // The secret containing credentials to a Redshift user with administrator privileges. // // Secret JSON schema: `{ username: string; password: string }`. // Experimental. AdminUser awssecretsmanager.ISecret `field:"optional" json:"adminUser" yaml:"adminUser"` // KMS key to encrypt the generated secret. // Experimental. EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // The policy to apply when this resource is removed from the application. // Experimental. RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"` // The name of the user. // // For valid values, see: https://docs.aws.amazon.com/redshift/latest/dg/r_names.html // Experimental. Username *string `field:"optional" json:"username" yaml:"username"` }
Properties for configuring a Redshift user.
Example:
user := awscdkredshiftalpha.NewUser(this, jsii.String("User"), &userProps{ cluster: cluster, databaseName: jsii.String("databaseName"), }) cluster.addRotationMultiUser(jsii.String("MultiUserRotation"), &rotationMultiUserOptions{ secret: user.secret, })
Experimental.
Source Files ¶
- awscdkredshiftalpha.go
- awscdkredshiftalpha_Cluster.go
- awscdkredshiftalpha_ClusterAttributes.go
- awscdkredshiftalpha_ClusterParameterGroup.go
- awscdkredshiftalpha_ClusterParameterGroupProps.go
- awscdkredshiftalpha_ClusterParameterGroup__runtime_type_checks.go
- awscdkredshiftalpha_ClusterProps.go
- awscdkredshiftalpha_ClusterSubnetGroup.go
- awscdkredshiftalpha_ClusterSubnetGroupProps.go
- awscdkredshiftalpha_ClusterSubnetGroup__runtime_type_checks.go
- awscdkredshiftalpha_ClusterType.go
- awscdkredshiftalpha_Cluster__runtime_type_checks.go
- awscdkredshiftalpha_Column.go
- awscdkredshiftalpha_DatabaseOptions.go
- awscdkredshiftalpha_DatabaseSecret.go
- awscdkredshiftalpha_DatabaseSecretProps.go
- awscdkredshiftalpha_DatabaseSecret__runtime_type_checks.go
- awscdkredshiftalpha_Endpoint.go
- awscdkredshiftalpha_Endpoint__runtime_type_checks.go
- awscdkredshiftalpha_ICluster.go
- awscdkredshiftalpha_IClusterParameterGroup.go
- awscdkredshiftalpha_IClusterSubnetGroup.go
- awscdkredshiftalpha_ICluster__runtime_type_checks.go
- awscdkredshiftalpha_ITable.go
- awscdkredshiftalpha_ITable__runtime_type_checks.go
- awscdkredshiftalpha_IUser.go
- awscdkredshiftalpha_IUser__runtime_type_checks.go
- awscdkredshiftalpha_LoggingProperties.go
- awscdkredshiftalpha_Login.go
- awscdkredshiftalpha_NodeType.go
- awscdkredshiftalpha_RotationMultiUserOptions.go
- awscdkredshiftalpha_Table.go
- awscdkredshiftalpha_TableAction.go
- awscdkredshiftalpha_TableAttributes.go
- awscdkredshiftalpha_TableDistStyle.go
- awscdkredshiftalpha_TableProps.go
- awscdkredshiftalpha_TableSortStyle.go
- awscdkredshiftalpha_Table__runtime_type_checks.go
- awscdkredshiftalpha_User.go
- awscdkredshiftalpha_UserAttributes.go
- awscdkredshiftalpha_UserProps.go
- awscdkredshiftalpha_User__runtime_type_checks.go