> **Experimental**
>
> `@aws-cdk/aws-redshift-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# DatabaseOptions

Properties for accessing a Redshift database.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/database-options.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-redshift-alpha/lib/database-options.ts#L7)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
};
```

Golang:

```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

- `adminUser`: [ISecret](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.ISecret.html) — 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 }`.

- `cluster`: [ICluster](/cdk/api/v2/docs/@aws-cdk_aws-redshift-alpha.ICluster.html) (required) — The cluster containing the database.

- `databaseName`: string (required) — The name of the database.
