modify_tenant_database
async
¶
modify_tenant_database(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_instance_identifier: Optional[String] = None,
tenant_db_name: Optional[String] = None,
master_user_password: Optional[SensitiveString] = None,
new_tenant_db_name: Optional[String] = None,
manage_master_user_password: Optional[BooleanOptional] = None,
rotate_master_user_password: Optional[BooleanOptional] = None,
master_user_secret_kms_key_id: Optional[String] = None,
) -> ModifyTenantDatabaseResult
Modifies an existing tenant database in a DB instance. You can change the tenant database name or the master user password. This operation is supported only for RDS for Oracle CDB instances using the multi-tenant configuration.
Parameters:
-
db_instance_identifier(Optional[String], default:None) –The identifier of the DB instance that contains the tenant database that you are modifying. This parameter isn't case-sensitive.
Constraints:
-
Must match the identifier of an existing DB instance.
-
-
tenant_db_name(Optional[String], default:None) –The user-supplied name of the tenant database that you want to modify. This parameter isn’t case-sensitive.
Constraints:
-
Must match the identifier of an existing tenant database.
-
-
master_user_password(Optional[SensitiveString], default:None) –The new password for the master user of the specified tenant database in your DB instance.
Amazon RDS operations never return the password, so this action provides a way to regain access to a tenant database user if the password is lost. This includes restoring privileges that might have been accidentally revoked.
Constraints:
-
Can include any printable ASCII character except
/,"(double quote),@,&(ampersand), and'(single quote).
Length constraints:
-
Must contain between 8 and 30 characters.
-
-
new_tenant_db_name(Optional[String], default:None) –The new name of the tenant database when renaming a tenant database. This parameter isn’t case-sensitive.
Constraints:
-
Can't be the string null or any other reserved word.
-
Can't be longer than 8 characters.
-
-
manage_master_user_password(Optional[BooleanOptional], default:None) –Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.
If the tenant database doesn't manage the master user password with Amazon Web Services Secrets Manager, you can turn on this management. In this case, you can't specify
MasterUserPassword.If the tenant database already manages the master user password with Amazon Web Services Secrets Manager, and you specify that the master user password is not managed with Amazon Web Services Secrets Manager, then you must specify
MasterUserPassword. In this case, Amazon RDS deletes the secret and uses the new password for the master user specified byMasterUserPassword.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.
-
-
rotate_master_user_password(Optional[BooleanOptional], default:None) –Specifies whether to rotate the secret managed by Amazon Web Services Secrets Manager for the master user password.
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 secret value contains the updated password.
For more information, see Password management with Amazon Web Services Secrets Manager in the Amazon RDS User Guide.
Constraints:
-
You must apply the change immediately when rotating the master user password.
-
-
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 both of the following conditions are met:
-
The tenant database doesn't manage the master user password in Amazon Web Services Secrets Manager.
If the tenant database already manages the master user password in Amazon Web Services Secrets Manager, you can't change the KMS key used to encrypt the secret.
-
You're turning on
ManageMasterUserPasswordto manage the master user password in Amazon Web Services Secrets Manager.If you're turning on
ManageMasterUserPasswordand don't specifyMasterUserSecretKmsKeyId, 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 self-managed KMS key.
The Amazon Web Services KMS key identifier is any of the following:
-
Key ARN
-
Key ID
-
Alias ARN
-
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.
A default KMS key exists 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.
-
TenantDatabaseNotFoundFault–The specified tenant database wasn't found in the DB instance.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_rds/_services/async_rds.py
12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 | |