文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
RebootDBInstance
搭配 AWS SDK 或 CLI 使用
下列程式碼範例示範如何使用 RebootDBInstance
。
- AWS CLI
-
重新啟動資料庫執行個體
下列
reboot-db-instance
範例會啟動指定資料庫執行個體的重新啟動。aws rds reboot-db-instance \ --db-instance-identifier
test-mysql-instance
輸出:
{ "DBInstance": { "DBInstanceIdentifier": "test-mysql-instance", "DBInstanceClass": "db.t3.micro", "Engine": "mysql", "DBInstanceStatus": "rebooting", "MasterUsername": "admin", "Endpoint": { "Address": "test-mysql-instance.############.us-west-2.rds.amazonaws.com", "Port": 3306, "HostedZoneId": "Z1PVIF0EXAMPLE" }, ... output omitted... } }
如需詳細資訊,請參閱《Amazon RDS 使用者指南》中的重新啟動資料庫執行個體。
-
如需 API 詳細資訊,請參閱 AWS CLI 命令參考中的 RebootDBInstance
。
-