2
0

createimage.py 468 B

12345678910111213141516
  1. # -*- encoding:utf-8 -*-
  2. from kscore.session import get_session
  3. if __name__ == "__main__":
  4. s = get_session()
  5. client = s.create_client("kec", "cn-shanghai-2", use_ssl=True)
  6. print client.describe_instances()
  7. client.create_image(InstanceId='ce09c927-12f1-44bc-8a73-30d0b2d275a5',Name='tm-04-25')
  8. # client.create_user(UserName="test22", RealName=u"刘一辰")
  9. # client.update_user(UserName="test22",)
  10. # client.delete_user(UserName="test22")