# CfnNamespaceProps

Properties for defining a `CfnNamespace`.

Used as props by: [CfnNamespace](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_redshiftserverless.CfnNamespace.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_redshiftserverless as redshiftserverless } from 'aws-cdk-lib';

declare const namespaceResourcePolicy: any;
const cfnNamespaceProps: redshiftserverless.CfnNamespaceProps = {
  namespaceName: 'namespaceName',

  // the properties below are optional
  adminPasswordSecretKmsKeyId: 'adminPasswordSecretKmsKeyId',
  adminUsername: 'adminUsername',
  adminUserPassword: 'adminUserPassword',
  dbName: 'dbName',
  defaultIamRoleArn: 'defaultIamRoleArn',
  finalSnapshotName: 'finalSnapshotName',
  finalSnapshotRetentionPeriod: 123,
  iamRoles: ['iamRoles'],
  kmsKeyId: 'kmsKeyId',
  logExports: ['logExports'],
  manageAdminPassword: false,
  namespaceResourcePolicy: namespaceResourcePolicy,
  redshiftIdcApplicationArn: 'redshiftIdcApplicationArn',
  snapshotCopyConfigurations: [{
    destinationRegion: 'destinationRegion',

    // the properties below are optional
    destinationKmsKeyId: 'destinationKmsKeyId',
    snapshotRetentionPeriod: 123,
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_redshiftserverless as redshiftserverless

# namespace_resource_policy: Any

cfn_namespace_props = redshiftserverless.CfnNamespaceProps(
    namespace_name="namespaceName",

    # the properties below are optional
    admin_password_secret_kms_key_id="adminPasswordSecretKmsKeyId",
    admin_username="adminUsername",
    admin_user_password="adminUserPassword",
    db_name="dbName",
    default_iam_role_arn="defaultIamRoleArn",
    final_snapshot_name="finalSnapshotName",
    final_snapshot_retention_period=123,
    iam_roles=["iamRoles"],
    kms_key_id="kmsKeyId",
    log_exports=["logExports"],
    manage_admin_password=False,
    namespace_resource_policy=namespace_resource_policy,
    redshift_idc_application_arn="redshiftIdcApplicationArn",
    snapshot_copy_configurations=[redshiftserverless.CfnNamespace.SnapshotCopyConfigurationProperty(
        destination_region="destinationRegion",

        # the properties below are optional
        destination_kms_key_id="destinationKmsKeyId",
        snapshot_retention_period=123
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

Object namespaceResourcePolicy;

CfnNamespaceProps cfnNamespaceProps = CfnNamespaceProps.builder()
        .namespaceName("namespaceName")

        // the properties below are optional
        .adminPasswordSecretKmsKeyId("adminPasswordSecretKmsKeyId")
        .adminUsername("adminUsername")
        .adminUserPassword("adminUserPassword")
        .dbName("dbName")
        .defaultIamRoleArn("defaultIamRoleArn")
        .finalSnapshotName("finalSnapshotName")
        .finalSnapshotRetentionPeriod(123)
        .iamRoles(List.of("iamRoles"))
        .kmsKeyId("kmsKeyId")
        .logExports(List.of("logExports"))
        .manageAdminPassword(false)
        .namespaceResourcePolicy(namespaceResourcePolicy)
        .redshiftIdcApplicationArn("redshiftIdcApplicationArn")
        .snapshotCopyConfigurations(List.of(SnapshotCopyConfigurationProperty.builder()
                .destinationRegion("destinationRegion")

                // the properties below are optional
                .destinationKmsKeyId("destinationKmsKeyId")
                .snapshotRetentionPeriod(123)
                .build()))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.RedshiftServerless;

var namespaceResourcePolicy;

var cfnNamespaceProps = new CfnNamespaceProps {
    NamespaceName = "namespaceName",

    // the properties below are optional
    AdminPasswordSecretKmsKeyId = "adminPasswordSecretKmsKeyId",
    AdminUsername = "adminUsername",
    AdminUserPassword = "adminUserPassword",
    DbName = "dbName",
    DefaultIamRoleArn = "defaultIamRoleArn",
    FinalSnapshotName = "finalSnapshotName",
    FinalSnapshotRetentionPeriod = 123,
    IamRoles = new [] { "iamRoles" },
    KmsKeyId = "kmsKeyId",
    LogExports = new [] { "logExports" },
    ManageAdminPassword = false,
    NamespaceResourcePolicy = namespaceResourcePolicy,
    RedshiftIdcApplicationArn = "redshiftIdcApplicationArn",
    SnapshotCopyConfigurations = new [] { new SnapshotCopyConfigurationProperty {
        DestinationRegion = "destinationRegion",

        // the properties below are optional
        DestinationKmsKeyId = "destinationKmsKeyId",
        SnapshotRetentionPeriod = 123
    } },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var namespaceResourcePolicy interface{}

cfnNamespaceProps := &CfnNamespaceProps{
	NamespaceName: jsii.String("namespaceName"),

	// the properties below are optional
	AdminPasswordSecretKmsKeyId: jsii.String("adminPasswordSecretKmsKeyId"),
	AdminUsername: jsii.String("adminUsername"),
	AdminUserPassword: jsii.String("adminUserPassword"),
	DbName: jsii.String("dbName"),
	DefaultIamRoleArn: jsii.String("defaultIamRoleArn"),
	FinalSnapshotName: jsii.String("finalSnapshotName"),
	FinalSnapshotRetentionPeriod: jsii.Number(123),
	IamRoles: []interface{}{
		jsii.String("iamRoles"),
	},
	KmsKeyId: jsii.String("kmsKeyId"),
	LogExports: []*string{
		jsii.String("logExports"),
	},
	ManageAdminPassword: jsii.Boolean(false),
	NamespaceResourcePolicy: namespaceResourcePolicy,
	RedshiftIdcApplicationArn: jsii.String("redshiftIdcApplicationArn"),
	SnapshotCopyConfigurations: []interface{}{
		&SnapshotCopyConfigurationProperty{
			DestinationRegion: jsii.String("destinationRegion"),

			// the properties below are optional
			DestinationKmsKeyId: jsii.String("destinationKmsKeyId"),
			SnapshotRetentionPeriod: jsii.Number(123),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `adminPasswordSecretKmsKeyId`: string — The ID of the AWS Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret.

  You can only use this parameter if `ManageAdminPassword` is `true` .

- `adminUsername`: string — The username of the administrator for the primary database created in the namespace.

- `adminUserPassword`: string — The password of the administrator for the primary database created in the namespace.

- `dbName`: string — The name of the primary database created in the namespace.

- `defaultIamRoleArn`: string | [IRoleRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) — The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace.

- `finalSnapshotName`: string — The name of the snapshot to be created before the namespace is deleted.

- `finalSnapshotRetentionPeriod`: number — How long to retain the final snapshot.

- `iamRoles`: string | [IRoleRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html)[] — A list of IAM roles to associate with the namespace.

- `kmsKeyId`: string | [IKeyRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_kms.IKeyRef.html) — The ID of the AWS Key Management Service key used to encrypt your data.

- `logExports`: string[] — The types of logs the namespace can export.

  Available export types are `userlog` , `connectionlog` , and `useractivitylog` .

- `manageAdminPassword`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — If true, Amazon Redshift uses AWS Secrets Manager to manage the namespace's admin credentials.

  You can't use `AdminUserPassword` if `ManageAdminPassword` is true. If `ManageAdminPassword` is `false` or not set, Amazon Redshift uses `AdminUserPassword` for the admin user account's password.

- `namespaceName`: string (required) — The name of the namespace.

  Must be between 3-64 alphanumeric characters in lowercase, and it cannot be a reserved word. A list of reserved words can be found in [Reserved Words](https://docs.aws.amazon.com//redshift/latest/dg/r_pg_keywords.html) in the Amazon Redshift Database Developer Guide.

- `namespaceResourcePolicy`: any — The resource policy that will be attached to the namespace.

- `redshiftIdcApplicationArn`: string — The ARN for the Redshift application that integrates with IAM Identity Center.

- `snapshotCopyConfigurations`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnNamespace.SnapshotCopyConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_redshiftserverless.CfnNamespace.SnapshotCopyConfigurationProperty.html)[] — The snapshot copy configurations for the namespace.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The map of the key-value pairs used to tag the namespace.
