tag.py 453 B

123456789101112131415161718
  1. # -*- encoding:utf-8 -*-
  2. from kscore.session import get_session
  3. if __name__ == "__main__":
  4. s = get_session()
  5. client = s.create_client("tag", region_name="cn-beijing-6", use_ssl=True)
  6. print client.describe_tags()
  7. # https://docs.ksyun.com/documents/1327
  8. # 根据资源id查询tag
  9. print client.describe_tags(**{
  10. "Filter.1.Name": "resource-id",
  11. "Filter.1.Value.1": "fc175f56-d29d-497f-9f57-xxxxxxxxxxxx",
  12. })