Experimental
@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
DatabaseOptions Struct
Properties for accessing a Redshift database.
| Stability | Experimental |
|---|---|
| Source | lib/database-options.ts |
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 { aws_secretsmanager as secretsmanager } from 'aws-cdk-lib';
declare const cluster: redshift_alpha.Cluster;
declare const secret: secretsmanager.Secret;
const databaseOptions: redshift_alpha.DatabaseOptions = {
cluster: cluster,
databaseName: 'databaseName',
// the properties below are optional
adminUser: secret,
};
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
from aws_cdk import aws_secretsmanager as secretsmanager
# cluster: redshift_alpha.Cluster
# secret: secretsmanager.Secret
database_options = redshift_alpha.DatabaseOptions(
cluster=cluster,
database_name="databaseName",
# the properties below are optional
admin_user=secret
)
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.services.secretsmanager.*;
Cluster cluster;
Secret secret;
DatabaseOptions databaseOptions = DatabaseOptions.builder()
.cluster(cluster)
.databaseName("databaseName")
// the properties below are optional
.adminUser(secret)
.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.AWS.SecretsManager;
Cluster cluster;
Secret secret;
var databaseOptions = new DatabaseOptions {
Cluster = cluster,
DatabaseName = "databaseName",
// the properties below are optional
AdminUser = secret
};
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 "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,
}
Properties
adminUseroptionalISecretadmin_useroptionalISecretadminUseroptionalISecretAdminUseroptionalISecretAdminUseroptionalISecret #The secret containing credentials to a Redshift user with administrator privileges.
Default: the admin secret is taken from the cluster
Secret JSON schema: { username: string; password: string }.
The cluster containing the database.
databaseNamestringdatabase_namestrdatabaseNameStringDatabaseNamestringDatabaseName*string required #The name of the database.