# 设置 cvm 产品默认使用版本:2017-03-12tccli configure set cvm.version 2017-03-12# 在实时使用时指定版本号。tccli cvm help --version 2017-03-12tccli cvm DescribeZones help --version 2017-03-12tccli cvm DescribeZones --version 2017-03-12
# 设置cvm产品默认 endpointtccli configure set cvm.endpoint cvm.ap-guangzhou.tencentcloudapi.com# 调用时实时指定。tccli cvm DescribeZones --endpoint cvm.ap-guangzhou.tencentcloudapi.com
[root@VM_180_248_centos ~]# tccli cvm DescribeZones{"TotalCount": 4,"ZoneSet": [{"ZoneState": "AVAILABLE","ZoneId": "100001","Zone": "ap-guangzhou-1","ZoneName": "广州一区"},{"ZoneState": "AVAILABLE","ZoneId": "100002","Zone": "ap-guangzhou-2","ZoneName": "广州二区"},{"ZoneState": "AVAILABLE","ZoneId": "100003","Zone": "ap-guangzhou-3","ZoneName": "广州三区"},{"ZoneState": "AVAILABLE","ZoneId": "100004","Zone": "ap-guangzhou-4","ZoneName": "广州四区"}],"RequestId": "4fd313a6-155f-4c7a-bf86-898c02fcae02"}
[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter TotalCount4
[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter ZoneSet[0]{"ZoneState": "AVAILABLE","ZoneId": "100001","Zone": "ap-guangzhou-1","ZoneName": "广州一区"}
[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter ZoneSet[*].ZoneName[ "广州一区","广州二区","广州三区","广州四区"]
[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter 'ZoneSet[*].{name:ZoneName, id:ZoneId}'[{"name": "广州一区","id": "100001"},{"name": "广州二区","id": "100002"},{"name": "广州三区","id": "100003"},{"name": "广州四区","id": "100004"}]
本页内容是否解决了您的问题?