全部产品
Search
文档中心

:修改集群期望实例数

更新时间:Apr 12, 2018

描述

修改集群期望实例数(change_cluster_desired_vm_count)。

参数说明

所有类型的参数将被转换为包含属性信息的字典对象。

参数 类型 描述
cluster str, CreateResponse 集群的标示符

返回值说明

change_cluster_desired_vm_count方法将返回一个 ActionResponse 对象, ActionResponse仅提供了request ID和状态码两个属性。

示例

  1. try:
  2. # Init a Client object.
  3. client = ...
  4. # Refer to ClusterDescription.
  5. cluster_desc = ClusterDescription(...)
  6. cluster = client.create_cluster(cluster_desc)
  7. # Print out the cluster id.
  8. print (cluster.Id)
  9. client.change_cluster_desired_vm_count(cluster.Id, group1=3, group2=4)
  10. except ClientError, e:
  11. print (e)