数据 | 描述 | 引入版本 |
instance-id | 实例 ID | 1.0 |
instance-name | 实例名称 | 1.0 |
uuid | 实例 ID | 1.0 |
local-ipv4 | 实例内网 IP | 1.0 |
public-ipv4 | 实例公网 IP | 1.0 |
mac | 实例 eth0 设备 mac 地址 | 1.0 |
placement/region | 实例所在地域信息 | 2017-09-19 更新 |
placement/zone | 实例所在可用区信息 | 2017-09-19 更新 |
network/interfaces/macs/${mac}/mac | 实例网络接口设备地址 | 1.0 |
network/interfaces/macs/${mac}/primary-local-ipv4 | 实例网络接口主内网 IP 地址 | 1.0 |
network/interfaces/macs/${mac}/public-ipv4s | 实例网络接口公网 IP 地址 | 1.0 |
network/interfaces/macs/${mac}/vpc-id | 实例网络接口 VPC 网络 ID | 2017-09-19 更新 |
network/interfaces/macs/${mac}/subnet-id | 实例网络接口子网 ID | 2017-09-19 更新 |
network/interfaces/macs/${mac}/local-ipv4s/${local-ipv4}/gateway | 实例网络接口网关地址 | 1.0 |
network/interfaces/macs/${mac}/local-ipv4s/${local-ipv4}/local-ipv4 | 实例网络接口内网 IP 地址 | 1.0 |
network/interfaces/macs/${mac}/local-ipv4s/${local-ipv4}/public-ipv4 | 实例网络接口公网 IP 地址 | 1.0 |
network/interfaces/macs/${mac}/local-ipv4s/${local-ipv4}/public-ipv4-mode | 实例网络接口公网网络模式 | 1.0 |
network/interfaces/macs/${mac}/local-ipv4s/${local-ipv4}/subnet-mask | 实例网络接口子网掩码 | 1.0 |
payment/charge-type | 实例计费类型 | 2017-09-19 更新 |
payment/create-time | 实例创建时间 | 2017-09-19 更新 |
payment/termination-time | 实例销毁时间 | 2017-09-19 更新 |
app-id | 实例所属用户 AppId | 2017-09-19 更新 |
as-group-id | 实例所在弹性伸缩组 ID | 2017-09-19 更新 |
spot/termination-time | 竞价实例销毁时间 | 2017-09-19 更新 |
instance/instance-type | 实例规格 | 2017-09-19 更新 |
instance/image-id | 实例镜像 ID | 2017-09-19 更新 |
instance/security-group | 实例绑定安全组信息 | 2017-09-19 更新 |
instance/bandwidth-limit-egress | 实例内网出方向带宽限制,单位Kbit/s | 2019-09-29 更新 |
instance/bandwidth-limit-ingress | 实例内网入方向带宽限制,单位Kbit/s | 2019-09-29 更新 |
cam/security-credentials/${role-name} | 实例 CAM 角色策略所生成的临时凭证。只有在实例绑定了 CAM 角色后,您才能获取临时凭证。其中 ${role-name} 参数需要替换为实例 CAM 角色的名称。如果未指定,将返回404。 | 2019-12-11 更新 |
volumes | 实例存储 | 1.0 |
${mac}
和 ${local-ipv4}
字段分别表示实例指定网络接口的设备地址和内网 IP 地址。http://metadata.tencentyun.com/latest/meta-data/
curl http://metadata.tencentyun.com/latest/meta-data/
[qcloud-user]# curl http://metadata.tencentyun.com/1.02017-09-19latestmeta-data
/
结尾的单词表示目录,不以/
结尾的单词表示访问数据。具体访问数据含义请参考前文实例 metadata 分类。[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/instance-idinstance-namelocal-ipv4macnetwork/placement/public-ipv4uuid
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/placement/regionap-guangzhou[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/placement/zoneap-guangzhou-3
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/local-ipv410.104.13.59
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/public-ipv4139.199.11.29
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/instance-idins-3g445roi
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/uuidcfac763a-7094-446b-a8a9-b995e638471a
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/mac52:54:00:BF:B3:51
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/local-ipv4s/macvpc-idsubnet-idowner-idprimary-local-ipv4public-ipv4slocal-ipv4s/
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/vpc-idvpc-ja82n9op[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/subnet-idsubnet-ja82n9op
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/local-ipv4s/10.104.13.59/
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/local-ipv4s/10.104.13.59gatewaylocal-ipv4public-ipv4public-ipv4-modesubnet-mask
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/local-ipv4s/10.104.13.59/gateway10.15.1.1
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/local-ipv4s/10.104.13.59/public-ipv4-modeNAT
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/local-ipv4s/10.104.13.59/public-ipv4139.199.11.29
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/network/interfaces/macs/52:54:00:BF:B3:51/local-ipv4s/10.104.13.59/subnet-mask255.255.192.0
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/payment/charge-typePOSTPAID_BY_HOUR
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/payment/create-time2018-09-18 11:27:33
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/spot/termination-time2018-08-18 12:05:33
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/app-id123456789
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/cam/security-credentials/CVMas{"TmpSecretId": "************************************","TmpSecretKey": "********************************","ExpiredTime": 1615590047,"Expiration": "2021-03-12T23:00:47Z","Token": "******","Code": "Success"}
[qcloud-user]# curl http://metadata.tencentyun.com/latest/meta-data/volumesdisk-xxxxxxxx/
[qcloud-user]# curl http://metadata.tencentyun.com/latest/user-data179, client, shanghai
本页内容是否解决了您的问题?