删除集群实例
接口
delete_cluster_instance
参数
参数 | 类型 | 是否biubiu | 描述 |
---|---|---|---|
cluster_id | string | 是 | 集群标识符 |
group_name | string | 是 | 实例组名称 |
instance_id | string | 是 | 实例名称 |
返回值
delete_cluster_instance方法将返回一个 ActionResponse
对象。
例子
Python源码:
import time
import batchcompute
from batchcompute import CN_SHENZHEN as REGION
from batchcompute import Client, ClientError
ACCESS_KEY_ID = 'Your Access Key Id'
ACCESS_KEY_SECRET = 'Your Access Key Secret'
client = Client(REGION, ACCESS_KEY_ID, ACCESS_KEY_SECRET)
def delete_cluster_instance():
try:
cluster_id = 'cls-xxx'
group_name = 'group1'
instance_id = 'ins-xxx'
rsp = client.delete_cluster_instance(cluster_id, group_name, instance_id)
print rsp
except ClientError, e:
print (e.get_status_code(), e.get_code(), e.get_requestid(), e.get_msg())
if __name__ == '__main__':
delete_cluster_instance()
执行结果:
{
"Date": "Fri, 09 Nov 2018 03:23:39 GMT",
"RequestId": "CA85C95F-9915-4F35-A166-FC89D854016E",
"StatusCode": 201
}