create_tenant_database
async
¶
create_tenant_database(
*,
config_overrides: Optional[AsyncRDSClientConfig] = 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/async_rds.py
4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 | |