云主机

  • 云主机 > API 文档 > 实例 >查看云主机列表

    查看云主机列表

    最近更新时间: 2020-12-29 11:39:39

    请求路径

    GET /v1/vm/instance

    请求参数

    名称 类型 位置 必须 描述
    page integer query 页码。默认:1
    size integer query 分页大小,最大100。默认20
    region_id string query 实例所属的地域 ID。
    您可以调用 DescribeRegions 查看最新的七牛云地域列表。
    instance_id string query 实例 ID
    instance_name string query 实例名称
    key_pair_name string query 密钥对名称
    os_type string query 镜像的操作系统类型。
    取值范围: windows, linux
    security_group_id string query 安全组 ID
    vpc_id string query VPC ID
    cost_charge_type string query 付费方式。
    取值范围: PostPaid 按需计费 PrePaid: 预付费
    has_eip boolean query 是否有公网 IP
    eip_address string query 公网 IP
    private_ip_address string query 私有 IP
    zone_id string query 可用区 ID
    status string query 主机状态:
    • Creating : 创建中
    • Changing : 变配中
    • Running : 运行中
    • Starting : 开机中
    • Stopping : 关机中
    • Stopped : 已关机
    • Rebooting : 重启中
    • Pending : 挂起中
    • Deleted : 已删除

    返回值

    名称 类型 描述
    total integer 主机数量
    page integer 页码。默认:1
    size integer 分页大小,最大100。默认20
    request_id string 请求 I
    data []Instance 云主机列表

    Instance

    名称 类型 描述
    instance_id string 实例 ID
    instance_name string 实例名称
    host_name string 实例主机名
    instance_type string 实例资源规格
    region_id string 实例所属地域 ID
    zone_id string 实例所属可用区
    image_id string 实例运行的镜像 ID
    instance_charge_type string 实例的计费方式。可能值:
    PrePaid:预付费(包年包月 )
    PostPaid:按量付费
    serial_number string 实例序列号
    status string 实例状态
    create_time string 实例创建时间。按照ISO8601标准表示,并需要使用UTC时间,格式为yyyy-MM-ddTHH:mm:ssZ。
    expired_time string 过期时间。按照ISO8601标准表示,并需要使用UTC时间,格式为yyyy-MM-ddTHH:mm:ssZ。
    device_available boolean 实例是否还可以挂载数据盘
    security_group_ids object 实例所属安全组集合
    security_group_ids.security_group_id string[] 安全组ID
    eip_address object 弹性公网 IP 绑定信息
    eip_address.allocation_id string 弹性公网 IP 绑定的实例 ID。
    eip_address.ip_address string 弹性公网 IP。
    eip_address.bandwidth integer 弹性公网 IP 的公网带宽限速,单位为 Mbps。
    默认值:5。
    eip_address.internet_charge_type string 弹性公网 IP 的计费方式。
    PayByTraffic:按流量计费
    PayByBandwidth:按带宽计费
    eip_address.is_support_dissociate boolean 可以解绑弹性公网 IP。
    vpc_attributes object 专有网络 VPC 属性
    vpc_attributes.private_ip_address object 私网IP属性
    vpc_attributes.private_ip_address.ip_address string[] 私网IP列表
    vpc_attributes.private_ip_address.vswitch_id string 交换机 ID
    vpc_attributes.private_ip_address.vpc_id string 虚拟专有网络 ID
    vpc_attributes.private_ip_address.nat_ip_address string 云产品 IP,用于云产品之间的网络互通
    operation_locks object 实例的锁定原因
    operation_locks.lock_reason string[] 锁定类型
    financial:因欠费被锁定
    security:因安全原因被锁定
    recycling:抢占式实例的待释放锁定状态
    dedicatedhostfinancial:因为专有宿主机欠费导致 ECS 实例被锁定

    返回值示例

    {
      "data": [
        {
          "_id": "5fd97ef543c29c393942094e",
          "instance_id": "i-wz9craaaeefvgadapwemyob",
          "image_info": {
            "image_id": "ubuntu_20_04_x64_20G_alibase_20201120.vhd",
            "description": "",
            "product_code": "",
            "os_type": "linux",
            "architecture": "x86_64",
            "os_name": "Ubuntu  20.04 64位",
            "image_owner_alias": "system",
            "progress": "100%",
            "usage": "instance",
            "image_version": "",
            "status": "Available",
            "image_name": "ubuntu_20_04_x64_20G_alibase_20201120.vhd",
            "is_self_shared": "",
            "platform": "Ubuntu",
            "size": 20,
            "is_support_cloudinit": true,
            "is_support_io_optimized": true,
            "is_copied": false,
            "is_subscribed": false,
            "disk_device_mappings": {
              "disk_device_mapping": []
            },
            "snapshot_id": "",
            "min_disk_size": ""
          },
          "vlan_id": "",
          "zone_id": "cn-shenzhen-c",
          "spot_strategy": "NoSpot",
          "stopped_mode": "Not-applicable",
          "serial_number": "96fd351f-a841-47e4-9d7f-da92b9564854",
          "io_optimized": true,
          "memory": 98304,
          "cpu": 24,
          "device_available": true,
          "sale_cycle": "",
          "spot_price_limit": 0,
          "auto_release_time": "",
          "instance_name": "I-ABCD",
          "description": "",
          "resource_group_id": "",
          "os_type": "linux",
          "os_name": "Ubuntu  20.04 64位",
          "host_name": "iZwz9crqqxvpmoyqy",
          "instance_type": "ecs.cm4.6xlarge",
          "instance_type_family": "ecs.cm4",
          "status": "Running",
          "cluster_id": "",
          "recyclable": false,
          "region_id": "cn-shenzhen",
          "gpu_spec": "",
          "gpu_amount": 0,
          "vnc_passwd": "",
          "key_pair_name": "",
          "instance_charge_type": "PostPaid",
          "instance_network_type": "vpc",
          "expired_time": "2099-12-31T23:59:00+08:00",
          "network_interfaces": {
            "network_interface": [
              {
                "network_interface_id": "eni-wz9ikxo4dknoaaffeeddcd",
                "mac_address": "00:11:1e:12:38:d0",
                "primary_ip_address": "123.123.123.123"
              }
            ]
          },
          "vpc_attributes": {
            "nat_ip_address": "",
            "private_ip_address": {
              "ip_address": [
                "123.123.123.123"
              ]
            },
            "v_switch_id": "vsw-wz9m5dmumu53jjjnbox2w",
            "vpc_id": "vpc-wz9tt8ai7vg1a81ye0or2",
            "vpc_name": "portal-wxy",
            "v_switch_name": ""
          },
          "security_group_ids": {
            "security_group_id": [
              "sg-wz9c3kdvzo4mx8yj7iew"
            ],
            "security_group_name": null
          },
          "operation_locks": {
            "lock_reason": []
          },
          "inner_ip_address": {
            "ip_address": []
          },
          "eip_address": {
            "ip_address": "47.115.137.121",
            "allocation_id": "eip-wz92ul2d1s5c6bhxs2zed",
            "internet_charge_type": "PayByTraffic",
            "is_support_unassociate": true,
            "bandwidth": 1
          },
          "public_ip_address": {
            "ip_address": []
          },
          "human_spec": "高主频通用型 cm4 - 24 核 96 GB",
          "enable_assign_ipv6": false,
          "tags": null,
          "auto_renew_info": {
            "_id": "",
            "uid": 0,
            "region_id": "",
            "resource_type": "",
            "resource_id": "",
            "cost_params": null,
            "current_expire_attr": {
              "expire_time": "0001-01-01T00:00:00Z",
              "renew_op": "",
              "order_hash": "",
              "last_status": "",
              "status": "",
              "err_msg": "",
              "err_class": "",
              "notify": ""
            },
            "is_ali_release": false,
            "updated_at": "0001-01-01T00:00:00Z",
            "created_at": "0001-01-01T00:00:00Z"
          },
          "customized_expire_time": null,
          "cost_charge_type": "PostPaid",
          "cost_charge_mode": "PayByDisk",
          "updated_at": "2020-12-17T19:52:21.866+08:00",
          "created_at": "2020-12-16T11:28:53.621+08:00"
        }
      ],
      "page": 1,
      "size": 10,
      "total": 8,
      "request_id": "ScKvEXomqv7yf1EW"
    }
    
    以上内容是否对您有帮助?
  • Qvm free helper
    Close