Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions awscli/examples/rds/create-tenant-database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
**To create a tenant database**

The following ``create-tenant-database`` example creates a tenant database in an RDS for Oracle CDB instance. ::

aws rds create-tenant-database \
--db-instance-identifier test-rds-oracle \
--tenant-db-name tenant2 \
--master-username tenantadmin \
--master-user-password secret99

Output::

{
"TenantDatabase": {
"TenantDatabaseCreateTime": "2026-09-12T16:12:32.429000+00:00",
"DBInstanceIdentifier": "test-rds-oracle",
"TenantDBName": "TENANT2",
"Status": "creating",
"MasterUsername": "tenantadmin",
"DbiResourceId": "db-ABCD1234EFGH5678IJKEXAMPLE",
"TenantDatabaseResourceId": "tdb-ABCD1234EFGH5678IJKL90MNOPQRST1234UVWX5678YZAEXAMPLE",
"TenantDatabaseARN": "arn:aws:rds:us-east-1:123456789012:tenant-database:tdb-abcd1234efgh5678ijkl90mnopqrst1234uvwx5678yzaexample",
"CharacterSetName": "AL32UTF8",
"NcharCharacterSetName": "AL16UTF16",
"DeletionProtection": true,
"PendingModifiedValues": {
"MasterUserPassword": "****"
},
"TagList": []
}
}

For more information, see `Adding an RDS for Oracle tenant database to your CDB instance <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-cdb-configuring.adding.pdb.html>`__ in the *Amazon RDS User Guide*.
41 changes: 41 additions & 0 deletions awscli/examples/rds/delete-db-cluster-automated-backup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
**To delete an automated backup of a DB cluster**

The following ``delete-db-cluster-automated-backup`` example deletes the automated backup for the specified DB cluster resource ID. To find the resource ID, use the ``describe-db-cluster-automated-backups`` command. ::

aws rds delete-db-cluster-automated-backup \
--db-cluster-resource-id cluster-ABCD1234EFGH5678IJKL90MNOP

Output::

{
"DBClusterAutomatedBackup": {
"Engine": "aurora-postgresql",
"DBClusterAutomatedBackupsArn": "arn:aws:rds:us-east-1:123456789012:cluster-auto-backup:cab-abcd1234efgh5678ijkl90mnopqrst5678uvwx1234yzab56cdef7890abcd1234",
"DBClusterIdentifier": "test-aurora-cluster",
"RestoreWindow": {},
"MasterUsername": "postgres",
"DbClusterResourceId": "cluster-ABCD1234EFGH5678IJKL90MNOP",
"Region": "us-east-1",
"Status": "deleted",
"IAMDatabaseAuthenticationEnabled": false,
"ClusterCreateTime": "2026-09-12T11:38:04+00:00",
"StorageEncrypted": true,
"StorageEncryptionType": "sse-kms",
"AllocatedStorage": 1,
"EngineVersion": "17.7",
"DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:test-aurora-cluster",
"BackupRetentionPeriod": 7,
"PreferredBackupWindow": "04:30-05:00",
"EngineMode": "provisioned",
"AvailabilityZones": [
"us-east-1b",
"us-east-1d",
"us-east-1c"
],
"Port": 5432,
"KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
"TagList": []
}
}

For more information, see `Deleting retained automated backups for Amazon Aurora <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.Retaining.Deleting.html>`__ in the *Amazon Aurora User Guide*.
30 changes: 30 additions & 0 deletions awscli/examples/rds/delete-tenant-database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**To delete a tenant database**

The following ``delete-tenant-database`` example deletes a tenant database from an RDS for Oracle CDB instance and takes a final snapshot of it. ::

aws rds delete-tenant-database \
--db-instance-identifier test-rds-oracle \
--tenant-db-name tenant2 \
--final-db-snapshot-identifier final-snap-test

Output::

{
"TenantDatabase": {
"TenantDatabaseCreateTime": "2026-09-12T16:12:32.429000+00:00",
"DBInstanceIdentifier": "test-rds-oracle",
"TenantDBName": "TENANT2",
"Status": "deleting",
"MasterUsername": "tenantadmin",
"DbiResourceId": "db-ABCD1234EFGH5678IJKEXAMPLE",
"TenantDatabaseResourceId": "tdb-ABCD1234EFGH5678IJKL90MNOPQRST1234UVWX5678YZAEXAMPLE",
"TenantDatabaseARN": "arn:aws:rds:us-east-1:123456789012:tenant-database:tdb-abcd1234efgh5678ijkl90mnopqrst1234uvwx5678yzaexample",
"CharacterSetName": "AL32UTF8",
"NcharCharacterSetName": "AL16UTF16",
"DeletionProtection": false,
"PendingModifiedValues": {},
"TagList": []
}
}

For more information, see `Deleting an RDS for Oracle tenant database from your CDB <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-cdb-configuring.deleting.pdb.html>`__ in the *Amazon RDS User Guide*.
46 changes: 46 additions & 0 deletions awscli/examples/rds/describe-db-cluster-automated-backups.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
**To describe the automated backups of a DB cluster**

The following ``describe-db-cluster-automated-backups`` example retrieves the automated backup for the specified DB cluster, including the window of time that you can restore to. ::

aws rds describe-db-cluster-automated-backups \
--db-cluster-identifier test-aurora-cluster

Output::

{
"DBClusterAutomatedBackups": [
{
"Engine": "aurora-postgresql",
"DBClusterAutomatedBackupsArn": "arn:aws:rds:us-east-1:123456789012:cluster-auto-backup:cab-abcd1234efgh5678ijkl90mnopqrst5678uvwx1234yzab56cdef7890abcd1234",
"DBClusterIdentifier": "test-aurora-cluster",
"RestoreWindow": {
"EarliestTime": "2026-09-12T11:38:22.795000+00:00",
"LatestTime": "2026-09-12T11:47:16.053000+00:00"
},
"MasterUsername": "postgres",
"DbClusterResourceId": "cluster-ABCD1234EFGH5678IJKL90MNOP",
"Region": "us-east-1",
"Status": "active",
"IAMDatabaseAuthenticationEnabled": false,
"ClusterCreateTime": "2026-09-12T11:38:04+00:00",
"StorageEncrypted": true,
"StorageEncryptionType": "sse-kms",
"AllocatedStorage": 1,
"EngineVersion": "17.7",
"DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:test-aurora-cluster",
"BackupRetentionPeriod": 7,
"PreferredBackupWindow": "04:30-05:00",
"EngineMode": "provisioned",
"AvailabilityZones": [
"us-east-1b",
"us-east-1d",
"us-east-1c"
],
"Port": 5432,
"KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
"TagList": []
}
]
}

For more information, see `Viewing retained automated backups for Amazon Aurora <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.Retaining.Viewing.html>`__ in the *Amazon Aurora User Guide*.
32 changes: 32 additions & 0 deletions awscli/examples/rds/describe-db-major-engine-versions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
**To describe the lifecycle support dates for a major engine version**

The following ``describe-db-major-engine-versions`` example retrieves the standard and extended support dates for major engine version 17 of RDS for PostgreSQL. ::

aws rds describe-db-major-engine-versions \
--engine postgres \
--major-engine-version 17

Output::

{
"DBMajorEngineVersions": [
{
"Engine": "postgres",
"MajorEngineVersion": "17",
"SupportedEngineLifecycles": [
{
"LifecycleSupportName": "open-source-rds-standard-support",
"LifecycleSupportStartDate": "2024-11-14T00:00:00+00:00",
"LifecycleSupportEndDate": "2030-02-28T23:59:59.999000+00:00"
},
{
"LifecycleSupportName": "open-source-rds-extended-support",
"LifecycleSupportStartDate": "2030-03-01T00:00:00+00:00",
"LifecycleSupportEndDate": "2033-02-28T23:59:59.999000+00:00"
}
]
}
]
}

For more information, see `Viewing support dates for engine versions in Amazon RDS Extended Support <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support-viewing-support-dates.html>`__ in the *Amazon RDS User Guide*.
41 changes: 41 additions & 0 deletions awscli/examples/rds/describe-db-snapshot-tenant-databases.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
**To describe the tenant databases in a DB snapshot**

The following ``describe-db-snapshot-tenant-databases`` example retrieves the details of the tenant databases contained in a snapshot of an RDS for Oracle CDB instance. ::

aws rds describe-db-snapshot-tenant-databases \
--db-snapshot-identifier final-snap-test

Output::

{
"DBSnapshotTenantDatabases": [
{
"DBSnapshotIdentifier": "final-snap-test",
"DBInstanceIdentifier": "test-rds-oracle",
"DbiResourceId": "db-ABCD1234EFGH5678IJKEXAMPLE",
"EngineName": "oracle-se2-cdb",
"SnapshotType": "manual",
"TenantDBName": "ORCL",
"MasterUsername": "admin",
"TenantDatabaseResourceId": "tdb-QRST5678UVWX1234YZAB90CDEFGHIJ5678KLMN1234OPQEXAMPLE",
"CharacterSetName": "AL16UTF16",
"DBSnapshotTenantDatabaseARN": "arn:aws:rds:us-east-1:123456789012:snapshot-tenant-database:final-snap-test:tdb-qrst5678uvwx1234yzab90cdefghij5678klmn1234opqexample",
"TagList": []
},
{
"DBSnapshotIdentifier": "final-snap-test",
"DBInstanceIdentifier": "test-rds-oracle",
"DbiResourceId": "db-ABCD1234EFGH5678IJKEXAMPLE",
"EngineName": "oracle-se2-cdb",
"SnapshotType": "manual",
"TenantDBName": "TENANT2",
"MasterUsername": "tenantadmin",
"TenantDatabaseResourceId": "tdb-ABCD1234EFGH5678IJKL90MNOPQRST1234UVWX5678YZAEXAMPLE",
"CharacterSetName": "AL16UTF16",
"DBSnapshotTenantDatabaseARN": "arn:aws:rds:us-east-1:123456789012:snapshot-tenant-database:final-snap-test:tdb-abcd1234efgh5678ijkl90mnopqrst1234uvwx5678yzaexample",
"TagList": []
}
]
}

For more information, see `Restoring to a DB instance <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromSnapshot.html>`__ in the *Amazon RDS User Guide*.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
**To describe an Aurora Serverless v2 platform version**

The following ``describe-serverless-v2-platform-versions`` example retrieves the details of platform version 3 for Aurora PostgreSQL. ::

aws rds describe-serverless-v2-platform-versions \
--engine aurora-postgresql \
--serverless-v2-platform-version 3

Output::

{
"ServerlessV2PlatformVersions": [
{
"ServerlessV2PlatformVersion": "3",
"ServerlessV2PlatformVersionDescription": "Version 3 offering scaling up to 256 ACUs, and performance improvement up to 30% compared to version 2",
"Engine": "aurora-postgresql",
"ServerlessV2FeaturesSupport": {
"MinCapacity": 0.0,
"MaxCapacity": 256.0
},
"Status": "enabled",
"IsDefault": false
}
]
}

For more information, see `Checking the default platform version <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2-administration.html#aurora-serverless-v2-checking-default-platform-version>`__ in the *Amazon Aurora User Guide*.
30 changes: 30 additions & 0 deletions awscli/examples/rds/describe-tenant-databases.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**To describe the tenant databases in a DB instance**

The following ``describe-tenant-databases`` example retrieves the details of the tenant databases in an RDS for Oracle CDB instance. ::

aws rds describe-tenant-databases \
--db-instance-identifier test-rds-oracle

Output::

{
"TenantDatabases": [
{
"TenantDatabaseCreateTime": "2026-09-12T16:02:18.011000+00:00",
"DBInstanceIdentifier": "test-rds-oracle",
"TenantDBName": "ORCL",
"Status": "available",
"MasterUsername": "admin",
"DbiResourceId": "db-ABCD1234EFGH5678IJKEXAMPLE",
"TenantDatabaseResourceId": "tdb-QRST5678UVWX1234YZAB90CDEFGHIJ5678KLMN1234OPQEXAMPLE",
"TenantDatabaseARN": "arn:aws:rds:us-east-1:123456789012:tenant-database:tdb-qrst5678uvwx1234yzab90cdefghij5678klmn1234opqexample",
"CharacterSetName": "AL32UTF8",
"NcharCharacterSetName": "AL16UTF16",
"DeletionProtection": false,
"PendingModifiedValues": {},
"TagList": []
}
]
}

For more information, see `Viewing tenant database details <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-cdb-configuring.describing.pdb.html>`__ in the *Amazon RDS User Guide*.
15 changes: 15 additions & 0 deletions awscli/examples/rds/disable-http-endpoint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**To disable the RDS Data API for a DB cluster**

The following ``disable-http-endpoint`` example disables the RDS Data API for the specified Aurora DB cluster. ::

aws rds disable-http-endpoint \
--resource-arn arn:aws:rds:us-east-1:123456789012:cluster:test-aurora-pg-cluster

Output::

{
"ResourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:test-aurora-pg-cluster",
"HttpEndpointEnabled": false
}

For more information, see `Enabling or disabling RDS Data API on an existing database <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.enabling.html#data-api.enabling.modifying>`__ in the *Amazon Aurora User Guide*.
15 changes: 15 additions & 0 deletions awscli/examples/rds/enable-http-endpoint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**To enable the RDS Data API for a DB cluster**

The following ``enable-http-endpoint`` example enables the RDS Data API for the specified Aurora DB cluster. ::

aws rds enable-http-endpoint \
--resource-arn arn:aws:rds:us-east-1:123456789012:cluster:test-aurora-pg-cluster

Output::

{
"ResourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:test-aurora-pg-cluster",
"HttpEndpointEnabled": true
}

For more information, see `Enabling the Amazon RDS Data API <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.enabling.html>`__ in the *Amazon Aurora User Guide*.
35 changes: 35 additions & 0 deletions awscli/examples/rds/failover-db-cluster.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
**To force a failover for a DB cluster**

The following ``failover-db-cluster`` example promotes the specified Aurora Replica to be the primary DB instance, or writer, of the DB cluster. ::

aws rds failover-db-cluster \
--db-cluster-identifier test-aurora-cluster-failover \
--target-db-instance-identifier test-aurora-cluster-failover-instance-1-reader

Output::

{
"DBCluster": {
"AllocatedStorage": 1,
"AvailabilityZones": [
"us-east-1d",
"us-east-1c",
"us-east-1a"
],
"BackupRetentionPeriod": 7,
"DBClusterIdentifier": "test-aurora-cluster-failover",
"DBClusterParameterGroup": "default.aurora-postgresql17",
"DBSubnetGroup": "default",
"Status": "available",
"Endpoint": "test-aurora-cluster-failover.cluster-cnpexample.us-east-1.rds.amazonaws.com",
"ReaderEndpoint": "test-aurora-cluster-failover.cluster-ro-cnpexample.us-east-1.rds.amazonaws.com",
"MultiAZ": true,
"Engine": "aurora-postgresql",
"EngineVersion": "17.7",
"Port": 5432,
"MasterUsername": "postgres",
...some output truncated...
}
}

For more information, see `Failing over an Amazon Aurora DB cluster <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-failover.html>`__ in the *Amazon Aurora User Guide*.
Loading