From 969992a6508183e2841716f0daffab224b936e45 Mon Sep 17 00:00:00 2001 From: Ashritha Madabhushana Date: Tue, 15 Sep 2026 21:12:25 +0530 Subject: [PATCH] Add CLI examples for RDS commands --- .../examples/rds/create-tenant-database.rst | 33 ++++++++++++ .../delete-db-cluster-automated-backup.rst | 41 ++++++++++++++ .../examples/rds/delete-tenant-database.rst | 30 +++++++++++ .../describe-db-cluster-automated-backups.rst | 46 ++++++++++++++++ .../rds/describe-db-major-engine-versions.rst | 32 +++++++++++ .../describe-db-snapshot-tenant-databases.rst | 41 ++++++++++++++ ...scribe-serverless-v2-platform-versions.rst | 27 ++++++++++ .../rds/describe-tenant-databases.rst | 30 +++++++++++ awscli/examples/rds/disable-http-endpoint.rst | 15 ++++++ awscli/examples/rds/enable-http-endpoint.rst | 15 ++++++ awscli/examples/rds/failover-db-cluster.rst | 35 ++++++++++++ .../examples/rds/failover-global-cluster.rst | 53 +++++++++++++++++++ .../examples/rds/modify-tenant-database.rst | 32 +++++++++++ awscli/examples/rds/reboot-db-cluster.rst | 32 +++++++++++ .../rds/switchover-global-cluster.rst | 52 ++++++++++++++++++ .../examples/rds/switchover-read-replica.rst | 29 ++++++++++ 16 files changed, 543 insertions(+) create mode 100644 awscli/examples/rds/create-tenant-database.rst create mode 100644 awscli/examples/rds/delete-db-cluster-automated-backup.rst create mode 100644 awscli/examples/rds/delete-tenant-database.rst create mode 100644 awscli/examples/rds/describe-db-cluster-automated-backups.rst create mode 100644 awscli/examples/rds/describe-db-major-engine-versions.rst create mode 100644 awscli/examples/rds/describe-db-snapshot-tenant-databases.rst create mode 100644 awscli/examples/rds/describe-serverless-v2-platform-versions.rst create mode 100644 awscli/examples/rds/describe-tenant-databases.rst create mode 100644 awscli/examples/rds/disable-http-endpoint.rst create mode 100644 awscli/examples/rds/enable-http-endpoint.rst create mode 100644 awscli/examples/rds/failover-db-cluster.rst create mode 100644 awscli/examples/rds/failover-global-cluster.rst create mode 100644 awscli/examples/rds/modify-tenant-database.rst create mode 100644 awscli/examples/rds/reboot-db-cluster.rst create mode 100644 awscli/examples/rds/switchover-global-cluster.rst create mode 100644 awscli/examples/rds/switchover-read-replica.rst diff --git a/awscli/examples/rds/create-tenant-database.rst b/awscli/examples/rds/create-tenant-database.rst new file mode 100644 index 000000000000..52fb831022c5 --- /dev/null +++ b/awscli/examples/rds/create-tenant-database.rst @@ -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 `__ in the *Amazon RDS User Guide*. diff --git a/awscli/examples/rds/delete-db-cluster-automated-backup.rst b/awscli/examples/rds/delete-db-cluster-automated-backup.rst new file mode 100644 index 000000000000..80178feeaa7f --- /dev/null +++ b/awscli/examples/rds/delete-db-cluster-automated-backup.rst @@ -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 `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/delete-tenant-database.rst b/awscli/examples/rds/delete-tenant-database.rst new file mode 100644 index 000000000000..c24234419c3e --- /dev/null +++ b/awscli/examples/rds/delete-tenant-database.rst @@ -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 `__ in the *Amazon RDS User Guide*. diff --git a/awscli/examples/rds/describe-db-cluster-automated-backups.rst b/awscli/examples/rds/describe-db-cluster-automated-backups.rst new file mode 100644 index 000000000000..a103ad773ba4 --- /dev/null +++ b/awscli/examples/rds/describe-db-cluster-automated-backups.rst @@ -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 `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/describe-db-major-engine-versions.rst b/awscli/examples/rds/describe-db-major-engine-versions.rst new file mode 100644 index 000000000000..2db3848957fb --- /dev/null +++ b/awscli/examples/rds/describe-db-major-engine-versions.rst @@ -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 `__ in the *Amazon RDS User Guide*. diff --git a/awscli/examples/rds/describe-db-snapshot-tenant-databases.rst b/awscli/examples/rds/describe-db-snapshot-tenant-databases.rst new file mode 100644 index 000000000000..9e448d08b821 --- /dev/null +++ b/awscli/examples/rds/describe-db-snapshot-tenant-databases.rst @@ -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 `__ in the *Amazon RDS User Guide*. diff --git a/awscli/examples/rds/describe-serverless-v2-platform-versions.rst b/awscli/examples/rds/describe-serverless-v2-platform-versions.rst new file mode 100644 index 000000000000..67058141291b --- /dev/null +++ b/awscli/examples/rds/describe-serverless-v2-platform-versions.rst @@ -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 `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/describe-tenant-databases.rst b/awscli/examples/rds/describe-tenant-databases.rst new file mode 100644 index 000000000000..66dde6bcbbdc --- /dev/null +++ b/awscli/examples/rds/describe-tenant-databases.rst @@ -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 `__ in the *Amazon RDS User Guide*. diff --git a/awscli/examples/rds/disable-http-endpoint.rst b/awscli/examples/rds/disable-http-endpoint.rst new file mode 100644 index 000000000000..250086b85e3e --- /dev/null +++ b/awscli/examples/rds/disable-http-endpoint.rst @@ -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 `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/enable-http-endpoint.rst b/awscli/examples/rds/enable-http-endpoint.rst new file mode 100644 index 000000000000..43f09eef05bc --- /dev/null +++ b/awscli/examples/rds/enable-http-endpoint.rst @@ -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 `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/failover-db-cluster.rst b/awscli/examples/rds/failover-db-cluster.rst new file mode 100644 index 000000000000..7dff7afa5762 --- /dev/null +++ b/awscli/examples/rds/failover-db-cluster.rst @@ -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 `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/failover-global-cluster.rst b/awscli/examples/rds/failover-global-cluster.rst new file mode 100644 index 000000000000..ebabed44ebaa --- /dev/null +++ b/awscli/examples/rds/failover-global-cluster.rst @@ -0,0 +1,53 @@ +**To fail over a global database** + +The following ``failover-global-cluster`` example promotes the specified secondary cluster to be the primary cluster of the global database. Run this command in the Region that hosts the secondary cluster that you're promoting. :: + + aws rds failover-global-cluster \ + --region us-east-2 \ + --global-cluster-identifier global-database \ + --target-db-cluster-identifier arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster \ + --allow-data-loss + +Output:: + + { + "GlobalCluster": { + "GlobalClusterIdentifier": "global-database", + "GlobalClusterResourceId": "cluster-f0e523bfe07aabb", + "GlobalClusterArn": "arn:aws:rds::123456789012:global-cluster:global-database", + "Status": "failing-over", + "Engine": "aurora-postgresql", + "EngineVersion": "17.7", + "EngineLifecycleSupport": "open-source-rds-extended-support-disabled", + "StorageEncrypted": true, + "StorageEncryptionType": "sse-kms", + "DeletionProtection": false, + "GlobalClusterMembers": [ + { + "DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:primary-cluster", + "Readers": [ + "arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster" + ], + "IsWriter": true, + "SynchronizationStatus": "connected" + }, + { + "DBClusterArn": "arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster", + "Readers": [], + "IsWriter": false, + "GlobalWriteForwardingStatus": "disabled", + "SynchronizationStatus": "connected" + } + ], + "Endpoint": "global-database.global-cnpexample.global.rds.amazonaws.com", + "FailoverState": { + "Status": "pending", + "FromDbClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:primary-cluster", + "ToDbClusterArn": "arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster", + "IsDataLossAllowed": true + }, + "TagList": [] + } + } + +For more information, see `Using switchover or failover in Amazon Aurora Global Database `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/modify-tenant-database.rst b/awscli/examples/rds/modify-tenant-database.rst new file mode 100644 index 000000000000..d466ec5dfae7 --- /dev/null +++ b/awscli/examples/rds/modify-tenant-database.rst @@ -0,0 +1,32 @@ +**To rename a tenant database** + +The following ``modify-tenant-database`` example renames a tenant database in an RDS for Oracle CDB instance. :: + + aws rds modify-tenant-database \ + --db-instance-identifier test-rds-oracle \ + --tenant-db-name orcl \ + --new-tenant-db-name tenant2 + +Output:: + + { + "TenantDatabase": { + "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": { + "TenantDBName": "TENANT2" + }, + "TagList": [] + } + } + +For more information, see `Modifying an RDS for Oracle tenant database `__ in the *Amazon RDS User Guide*. diff --git a/awscli/examples/rds/reboot-db-cluster.rst b/awscli/examples/rds/reboot-db-cluster.rst new file mode 100644 index 000000000000..2e5a8747847b --- /dev/null +++ b/awscli/examples/rds/reboot-db-cluster.rst @@ -0,0 +1,32 @@ +**To reboot a Multi-AZ DB cluster** + +The following ``reboot-db-cluster`` example reboots all the DB instances in the specified Multi-AZ DB cluster. Use this operation only for a non-Aurora Multi-AZ DB cluster. :: + + aws rds reboot-db-cluster \ + --db-cluster-identifier test-pg-multiaz-cluster + +Output:: + + { + "DBCluster": { + "AllocatedStorage": 20, + "AvailabilityZones": [ + "us-east-1b", + "us-east-1c", + "us-east-1f" + ], + "BackupRetentionPeriod": 7, + "DBClusterIdentifier": "test-pg-multiaz-cluster", + "DBClusterParameterGroup": "default.postgres17", + "DBSubnetGroup": "default", + "Status": "available", + "Endpoint": "test-pg-multiaz-cluster.cluster-cnpexample.us-east-1.rds.amazonaws.com", + "ReaderEndpoint": "test-pg-multiaz-cluster.cluster-ro-cnpexample.us-east-1.rds.amazonaws.com", + "MultiAZ": true, + "Engine": "postgres", + "EngineVersion": "17.5", + ...some output truncated... + } + } + +For more information, see `Rebooting a Multi-AZ DB cluster and reader DB instances for Amazon RDS `__ in the *Amazon RDS User Guide*. diff --git a/awscli/examples/rds/switchover-global-cluster.rst b/awscli/examples/rds/switchover-global-cluster.rst new file mode 100644 index 000000000000..d3fa4a0a85d7 --- /dev/null +++ b/awscli/examples/rds/switchover-global-cluster.rst @@ -0,0 +1,52 @@ +**To switch over a global database** + +The following ``switchover-global-cluster`` example promotes the specified secondary cluster to be the primary cluster of the global database. Run this command in the Region that hosts the current primary cluster. :: + + aws rds switchover-global-cluster \ + --region us-east-1 \ + --global-cluster-identifier global-database \ + --target-db-cluster-identifier arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster + +Output:: + + { + "GlobalCluster": { + "GlobalClusterIdentifier": "global-database", + "GlobalClusterResourceId": "cluster-f0e523bfe07aabb", + "GlobalClusterArn": "arn:aws:rds::123456789012:global-cluster:global-database", + "Status": "switching-over", + "Engine": "aurora-postgresql", + "EngineVersion": "17.7", + "EngineLifecycleSupport": "open-source-rds-extended-support-disabled", + "StorageEncrypted": true, + "StorageEncryptionType": "sse-kms", + "DeletionProtection": false, + "GlobalClusterMembers": [ + { + "DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:primary-cluster", + "Readers": [ + "arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster" + ], + "IsWriter": true, + "SynchronizationStatus": "connected" + }, + { + "DBClusterArn": "arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster", + "Readers": [], + "IsWriter": false, + "GlobalWriteForwardingStatus": "disabled", + "SynchronizationStatus": "connected" + } + ], + "Endpoint": "global-database.global-cnpexample.global.rds.amazonaws.com", + "FailoverState": { + "Status": "pending", + "FromDbClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:primary-cluster", + "ToDbClusterArn": "arn:aws:rds:us-east-2:123456789012:cluster:secondary-cluster", + "IsDataLossAllowed": false + }, + "TagList": [] + } + } + +For more information, see `Using switchover or failover in Amazon Aurora Global Database `__ in the *Amazon Aurora User Guide*. diff --git a/awscli/examples/rds/switchover-read-replica.rst b/awscli/examples/rds/switchover-read-replica.rst new file mode 100644 index 000000000000..4562455aed57 --- /dev/null +++ b/awscli/examples/rds/switchover-read-replica.rst @@ -0,0 +1,29 @@ +**To switch over a read replica** + +The following ``switchover-read-replica`` example promotes the specified Oracle read replica to be the new primary database. Specify the identifier of the read replica that you're promoting. :: + + aws rds switchover-read-replica \ + --db-instance-identifier rds-oracle-reader + +Output:: + + { + "DBInstance": { + "DBInstanceIdentifier": "rds-oracle-reader", + "DBInstanceStatus": "available", + "Engine": "oracle-ee", + "ReadReplicaSourceDBInstanceIdentifier": "rds-oracle-testdb", + "ReplicaMode": "open-read-only", + "StatusInfos": [ + { + "StatusType": "read replication", + "Normal": true, + "Status": "replicating" + } + ], + "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:rds-oracle-reader", + ...some output truncated... + } + } + +For more information, see `Initiating the Oracle Data Guard switchover `__ in the *Amazon RDS User Guide*.