文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
DeleteCluster
搭配 AWS SDK 或 CLI 使用
下列程式碼範例示範如何使用 DeleteCluster
。
- AWS CLI
-
刪除空叢集
下列
delete-cluster
範例會刪除指定的空白叢集。aws ecs delete-cluster --cluster
MyCluster
輸出:
{ "cluster": { "clusterArn": "arn:aws:ecs:us-west-2:123456789012:cluster/MyCluster", "status": "INACTIVE", "clusterName": "MyCluster", "registeredContainerInstancesCount": 0, "pendingTasksCount": 0, "runningTasksCount": 0, "activeServicesCount": 0 "statistics": [], "tags": [] } }
如需詳細資訊,請參閱《Amazon ECS 開發人員指南》中的刪除叢集。
-
如需 API 詳細資訊,請參閱 AWS CLI 命令參考中的 DeleteCluster
。
-