Skip to content
v2.278.0

CfnNamespaceProps Struct ​

Properties for defining a CfnNamespace.

Example ​

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
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
// 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();
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"
    } }
};
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 ​

adminPasswordSecretKmsKeyIdoptionalstringadmin_password_secret_kms_key_idoptionalstradminPasswordSecretKmsKeyIdoptionalStringAdminPasswordSecretKmsKeyIdoptionalstringAdminPasswordSecretKmsKeyIdoptional*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 .

adminUsernameoptionalstringadmin_usernameoptionalstradminUsernameoptionalStringAdminUsernameoptionalstringAdminUsernameoptional*string #
The username of the administrator for the primary database created in the namespace.
adminUserPasswordoptionalstringadmin_user_passwordoptionalstradminUserPasswordoptionalStringAdminUserPasswordoptionalstringAdminUserPasswordoptional*string #
The password of the administrator for the primary database created in the namespace.
dbNameoptionalstringdb_nameoptionalstrdbNameoptionalStringDbNameoptionalstringDbNameoptional*string #
The name of the primary database created in the namespace.
defaultIamRoleArnoptionalstring | IRoleRefdefault_iam_role_arnoptionaltyping.Union[str, IRoleRef]defaultIamRoleArnoptionalStringDefaultIamRoleArnoptionalstringDefaultIamRoleArnoptionalinterface{} #
The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace.
finalSnapshotNameoptionalstringfinal_snapshot_nameoptionalstrfinalSnapshotNameoptionalStringFinalSnapshotNameoptionalstringFinalSnapshotNameoptional*string #
The name of the snapshot to be created before the namespace is deleted.
finalSnapshotRetentionPeriodoptionalnumberfinal_snapshot_retention_periodoptionalint | floatfinalSnapshotRetentionPeriodoptionalNumberFinalSnapshotRetentionPeriodoptionaldoubleFinalSnapshotRetentionPeriodoptional*float64 #
How long to retain the final snapshot.
iamRolesoptionalstring | IRoleRef[]iam_rolesoptionaltyping.List[typing.Union[str, IRoleRef]]iamRolesoptionalList<String>IamRolesoptionalstring[]IamRolesoptional*[]interface{} #
A list of IAM roles to associate with the namespace.
kmsKeyIdoptionalstring | IKeyRefkms_key_idoptionaltyping.Union[str, IKeyRef]kmsKeyIdoptionalStringKmsKeyIdoptionalstringKmsKeyIdoptionalinterface{} #
The ID of the AWS Key Management Service key used to encrypt your data.
logExportsoptionalstring[]log_exportsoptionaltyping.List[str]logExportsoptionalList<String>LogExportsoptionalstring[]LogExportsoptional*[]*string #
The types of logs the namespace can export.

Available export types are userlog , connectionlog , and useractivitylog .

manageAdminPasswordoptionalboolean | IResolvablemanage_admin_passwordoptionaltyping.Union[bool, IResolvable]manageAdminPasswordoptionalBooleanManageAdminPasswordoptionalboolManageAdminPasswordoptionalinterface{} #
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.

namespaceNamestringnamespace_namestrnamespaceNameStringNamespaceNamestringNamespaceName*string required #
The name of the namespace.
notes

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 in the Amazon Redshift Database Developer Guide.

namespaceResourcePolicyoptionalanynamespace_resource_policyoptionalAnynamespaceResourcePolicyoptionalObjectNamespaceResourcePolicyoptionalobjectNamespaceResourcePolicyoptionalinterface{} #
The resource policy that will be attached to the namespace.
redshiftIdcApplicationArnoptionalstringredshift_idc_application_arnoptionalstrredshiftIdcApplicationArnoptionalStringRedshiftIdcApplicationArnoptionalstringRedshiftIdcApplicationArnoptional*string #
The ARN for the Redshift application that integrates with IAM Identity Center.
snapshotCopyConfigurationsoptionalIResolvable | IResolvable | CfnNamespace.SnapshotCopyConfigurationProperty[]snapshot_copy_configurationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SnapshotCopyConfigurationProperty]]]snapshotCopyConfigurationsoptionalIResolvableSnapshotCopyConfigurationsoptionalIResolvableSnapshotCopyConfigurationsoptionalinterface{} #
The snapshot copy configurations for the namespace.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The map of the key-value pairs used to tag the namespace.