create_tenant_database
¶
create_tenant_database(
*,
config_overrides: Optional[RDSClientConfig] = None,
db_instance_identifier: Optional[String] = None,
tenant_db_name: Optional[String] = None,
master_username: Optional[String] = None,
master_user_password: Optional[SensitiveString] = None,
character_set_name: Optional[String] = None,
nchar_character_set_name: Optional[String] = None,
manage_master_user_password: Optional[BooleanOptional] = None,
master_user_secret_kms_key_id: Optional[String] = None,
tags: Optional[TagList] = None,
) -> CreateTenantDatabaseResult
Creates a tenant database in a DB instance that uses the multi-tenant configuration. Only RDS for Oracle container database (CDB) instances are supported.
Parameters:
-
db_instance_identifier(Optional[String], default:None) –The user-supplied DB instance identifier. RDS creates your tenant database in this DB instance. This parameter isn't case-sensitive.
-
tenant_db_name(Optional[String], default:None) –The user-supplied name of the tenant database that you want to create in your DB instance. This parameter has the same constraints as
DBNameinCreateDBInstance. -
master_username(Optional[String], default:None) –The name for the master user account in your tenant database. RDS creates this user account in the tenant database and grants privileges to the master user. This parameter is case-sensitive.
Constraints:
-
Must be 1 to 16 letters, numbers, or underscores.
-
First character must be a letter.
-
Can't be a reserved word for the chosen database engine.
-
-
master_user_password(Optional[SensitiveString], default:None) –The password for the master user in your tenant database.
Constraints:
-
Must be 8 to 30 characters.
-
Can include any printable ASCII character except forward slash (
/), double quote ("), at symbol (@), ampersand (&), or single quote ('). -
Can't be specified when
ManageMasterUserPasswordis enabled.
-
-
character_set_name(Optional[String], default:None) –The character set for your tenant database. If you don't specify a value, the character set name defaults to
AL32UTF8. -
nchar_character_set_name(Optional[String], default:None) –The
NCHARvalue for the tenant database. -
manage_master_user_password(Optional[BooleanOptional], default:None) –Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.
For more information, see Password management with Amazon Web Services Secrets Manager in the Amazon RDS User Guide.
Constraints:
-
Can't manage the master user password with Amazon Web Services Secrets Manager if
MasterUserPasswordis specified.
-
-
master_user_secret_kms_key_id(Optional[String], default:None) –The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.
This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB instance.
The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
If you don't specify
MasterUserSecretKmsKeyId, then theaws/secretsmanagerKMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use theaws/secretsmanagerKMS key to encrypt the secret, and you must use a customer managed KMS key.There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.
Raises:
-
DBInstanceNotFoundFault–DBInstanceIdentifierdoesn't refer to an existing DB instance. -
InvalidDBInstanceStateFault–The DB instance isn't in a valid state.
-
KMSKeyNotAccessibleFault–An error occurred accessing an Amazon Web Services KMS key.
-
TenantDatabaseAlreadyExistsFault–You attempted to either create a tenant database that already exists or modify a tenant database to use the name of an existing tenant database.
-
TenantDatabaseQuotaExceededFault–You attempted to create more tenant databases than are permitted in your Amazon Web Services account.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_rds/_services/rds.py
3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 | |