#!/usr/bin/env python2 # -*- encoding:utf-8 -*- from kscore.session import get_session ak = '您的AK' # sk = '您的sk' # region = 'cn-beijing-6' if __name__ == "__main__": s = get_session() client = s.create_client("kec", region, ks_access_key_id=ak, ks_secret_access_key=sk, use_ssl=False) # https://docs.ksyun.com/read/latest/52/_book/oaDescribeInstances.html recv_dict = client.describe_instances() #print type(recv_dict) kec_list = recv_dict['InstancesSet'] for kec_obj in kec_list: # print kec_obj print '