弹性云服务器 ECS-通过元数据获取ECS基本信息:Instance Type(EC2-兼容的API)

时间:2024-07-31 19:37:18

Instance Type(EC2-兼容的API)

用于查询弹性云服务器的规格名称。

  • URI

    /169.254.169.254/latest/meta-data/instance-type

  • 方法

    支持GET请求。

  • 示例

    Linux操作系统:

    curl http://169.254.169.254/latest/meta-data/instance-type

    Windows操作系统:

    Invoke-RestMethod http://169.254.169.254/latest/meta-data/instance-type

    s3.medium.2
support.huaweicloud.com/usermanual-ecs/ecs_03_0166.html