更新时间:2024-10-12 GMT+08:00
分享

查询Flexus L实例云主机详情

功能介绍

根据云主机ID查询云主机的详细信息,包括云主机的运行状态、云主机名称、公网IP等,所用接口为ECS的“查询云服务器详情”接口。该接口支持查询云主机计费方式,以及是否被冻结。本节列举了接口使用过程中的关键信息,接口更多信息详见查询云服务器详情

Flexus L实例中云主机所使用的该API接口与ECS相同,响应参数说明、接口使用示例、返回值等信息同样适用于Flexus L实例云主机。

调试

您可以在API Explorer中调试该接口。

URI

GET /v1/{project_id}/cloudservers/{server_id}

参数说明中server_id为云主机ID,请根据查询已创建的Flexus L实例获取云主机ID。

请求示例

查询云主机ID为72a270de-665a-4f46-8d64-24ad6edccdd2的详细信息。

GET https://{endpoint}/v1/{project_id}/cloudservers/72a270de-665a-4f46-8d64-24ad6edccdd2

响应示例

{
 "server": {
  "fault": null,
  "id": "72a270de-665a-4f46-8d64-24ad6edccdd2",
  "name": "hcss_ecs_ff60",  //云主机名称
  "addresses": {            //云主机网络信息
   "4022721e-0476-41ea-91f4-1883065a68cc": [
    {
     "version": "4",
     "addr": "192.168.12.151",
     "primary": true,
     "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:74:d8:63",
     "OS-EXT-IPS:type": "fixed",
     "OS-EXT-IPS:port_id": "db18e1cd-7fea-4e8d-95b0-e31db879b8ee"
    },
    {
     "version": "4",
     "addr": "119.3.166.187",
     "primary": true,
     "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:74:d8:63",
     "OS-EXT-IPS:type": "floating",
     "OS-EXT-IPS:port_id": "db18e1cd-7fea-4e8d-95b0-e31db879b8ee"
    }
   ]
  },
  "flavor": {
   "disk": "0",
   "vcpus": "2",
   "ram": "2048",
   "id": "at7.large.1",
   "name": "at7.large.1",
   "gpus": [],
   "asic_accelerators": []
  },
  "accessIPv4": "",
  "accessIPv6": "",
  "status": "ACTIVE",
  "progress": 0,
  "hostId": "fc724a7f21982eec27a7c4d3ab33275733834e1d4316cadd2a684387",
  "updated": "2024-09-13T07:31:12Z",
  "created": "2024-09-13T07:30:25Z",
  "metadata": {
   "lockScene": "OTHER_SVC_LOCK=changeos,resize,delete,attachvolume,detachvolume,detachnics,attachnics,renewfee",
   "charging_mode": "1",
   "vpc_id": "4022721e-0476-41ea-91f4-1883065a68cc",
   "metering.productcode": "0a1438ad-a2d3-4b89-bed7-f3d261a853a8",
   "metering.product_id": "OFFI1017640863722074117",
   "lockSource": "hcss",
   "lockSourceId": "66e3e9f8b271f8319ef19e86",
   "__support_agent_list": "hss,hss-pc,ces",
   "metering.imagetype": "market",
   "metering.order_id": "CS2409131529QL4NJ",
   "image_name": "宝塔 Linux 面板 8.0.5",
   "metering.imageproductid": "OFFI890411017782276096",
   "metering.resourcespeccode": "at7.large.1.linux",
   "os_type": "Linux",
   "metering.resourcetype": "1",
   "metering.image_id": "f267d4ce-0d85-41ce-99c3-f5c4b3ca4640",
   "os_bit": "64",
   "lockCheckEndpoint": "",
   "cascaded.instance_extrainfo": "pcibridge:1,virtio_bus_count:8"
  },
  "tags": [
   "_sys_type_hcss_l"
  ],
  "description": "",
  "locked": false,
  "config_drive": "",
  "tenant_id": "067cf8aecf3845d1ad7a5d308322f13b",
  "user_id": "862856742c334c8a801460a39f1f1cfb",
  "key_name": null,
  "os-extended-volumes:volumes_attached": [
   {
    "id": "2cda750e-d6d8-4153-b4cc-e15fb22e6ea8",
    "delete_on_termination": "false",
    "device": "/dev/vda",
    "bootIndex": "0"
   }
  ],
  "OS-EXT-STS:task_state": null,
  "OS-EXT-STS:power_state": 1,
  "OS-EXT-STS:vm_state": "active",
  "OS-EXT-SRV-ATTR:host": "fc724a7f21982eec27a7c4d3ab33275733834e1d4316cadd2a684387",
  "OS-EXT-SRV-ATTR:instance_name": "instance-038ca5e0",
  "OS-EXT-SRV-ATTR:hypervisor_hostname": "fc724a7f21982eec27a7c4d3ab33275733834e1d4316cadd2a684387",
  "OS-DCF:diskConfig": "MANUAL",
  "OS-EXT-AZ:availability_zone": "cn-north-4g",
  "os:scheduler_hints": {},
  "OS-EXT-SRV-ATTR:root_device_name": "/dev/vda",
  "OS-EXT-SRV-ATTR:ramdisk_id": "",
  "enterprise_project_id": "0",
  "OS-EXT-SRV-ATTR:user_data": null,
  "OS-SRV-USG:launched_at": "2024-09-13T07:30:39.000000",
  "OS-EXT-SRV-ATTR:kernel_id": "",
  "OS-EXT-SRV-ATTR:launch_index": 0,
  "host_status": "UP",
  "OS-EXT-SRV-ATTR:reservation_id": "r-hzt0k5xi",
  "OS-EXT-SRV-ATTR:hostname": "hcss-ecs-ff60",
  "OS-SRV-USG:terminated_at": null,
  "sys_tags": [
   {
    "key": "_sys_enterprise_project_id",
    "value": "0"
   }
  ],
  "security_groups": [
   {
    "id": "b88fdd7e-fe03-4e3f-ab64-1e5e1f8de0d9",
    "name": "sg-default-smb"
   }
  ],
  "image": {
   "id": "f267d4ce-0d85-41ce-99c3-f5c4b3ca4640"
  },
  "hypervisor": null,
  "auto_terminate_time": "",
  "cpu_options": {
   "hw:cpu_threads": null
  },
  "enclave_options": {
   "enabled": false
  },
  "capacity_reservation_id": null,
  "capacity_reservation_specification": {
   "id": null,
   "preference": null
  },
  "security_options": {
   "secure_boot_enabled": null,
   "tpm_enabled": null
  },
  "spod_id": null
 }
}

相关文档