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

Construction properties for a DatabaseSecret.

Used as props by: [DatabaseSecret](/cdk/api/v2/docs/@aws-cdk_aws-redshift-alpha.DatabaseSecret.html)

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

## 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_kms as kms } from 'aws-cdk-lib';

declare const key: kms.Key;
const databaseSecretProps: redshift_alpha.DatabaseSecretProps = {
  username: 'username',

  // the properties below are optional
  encryptionKey: key,
  excludeCharacters: 'excludeCharacters',
};
```

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_kms as kms

# key: kms.Key

database_secret_props = redshift_alpha.DatabaseSecretProps(
    username="username",

    # the properties below are optional
    encryption_key=key,
    exclude_characters="excludeCharacters"
)
```

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.kms.*;

Key key;

DatabaseSecretProps databaseSecretProps = DatabaseSecretProps.builder()
        .username("username")

        // the properties below are optional
        .encryptionKey(key)
        .excludeCharacters("excludeCharacters")
        .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.KMS;

Key key;

var databaseSecretProps = new DatabaseSecretProps {
    Username = "username",

    // the properties below are optional
    EncryptionKey = key,
    ExcludeCharacters = "excludeCharacters"
};
```

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 key Key

databaseSecretProps := &DatabaseSecretProps{
	Username: jsii.String("username"),

	// the properties below are optional
	EncryptionKey: key,
	ExcludeCharacters: jsii.String("excludeCharacters"),
}
```

## Properties

- `encryptionKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — The KMS key to use to encrypt the secret.

  **Default:** default master key

- `excludeCharacters`: string — Characters to not include in the generated password.

  **Default:** '"@/\\\ \''

- `username`: string (required) — The username.
