查询云服务器规格详情列表(废弃)
调试
您可以在API Explorer中调试该接口。
URI
GET /v2.1/{project_id}/flavors/detail
| 
       参数  | 
     
       是否必选  | 
     
       参数类型  | 
     
       描述  | 
    
|---|---|---|---|
| 
       minDisk  | 
     
       否  | 
     
       String  | 
     
       最小的硬盘规格,单位GiB,大于等于此规格的都可以查询到。  | 
    
| 
       minRam  | 
     
       否  | 
     
       String  | 
     
       最小的内存规格,单位MiB,大于等于此规格的都可以查询到。  | 
    
| 
       sort_key  | 
     
       否  | 
     
       String  | 
     
       排序字段,默认值为:flavorid。可以指定的其他key为name/ memory_mb/vcpus/root_gb/flavorid。  | 
    
| 
       sort_dir  | 
     
       否  | 
     
       String  | 
     
       升序/降序排序,默认值为:asc。可以指定的参数为asc/desc。  | 
    
请求消息
无
响应消息
响应参数如表3所示。
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        flavors  | 
      
        Array of objects  | 
      
        云服务器规格列表,详情请参见表4。  | 
     
| 
        flavors_links  | 
      
        Array of objects  | 
      
        分页查询时,查询下一页数据链接 , 详情请参见表5 flavors_links字段数据结构说明。  | 
     
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        id  | 
      
        String  | 
      
        云服务器规格ID。  | 
     
| 
        name  | 
      
        String  | 
      
        云服务器规格名称。  | 
     
| 
        vcpus  | 
      
        Integer  | 
      
        云服务器规格对应的CPU核数。  | 
     
| 
        ram  | 
      
        Integer  | 
      
        云服务器规格对应的内存大小,单位为MiB。  | 
     
| 
        disk  | 
      
        Integer  | 
      
        云服务器规格对应要求系统盘大小。 当前未使用该参数,缺省值为0。  | 
     
| 
        swap  | 
      
        String  | 
      
        云服务器规格对应要求的交换分区大小。 当前未使用该参数,缺省值为""。  | 
     
| 
        OS-FLV-EXT-DATA:ephemeral  | 
      
        Integer  | 
      
        扩展属性,临时盘大小。 当前未使用该参数,缺省值为0。  | 
     
| 
        OS-FLV-DISABLED:disabled  | 
      
        Boolean  | 
      
        扩展属性,该云服务器规格是否禁用。 当前未使用该参数,缺省值为false。  | 
     
| 
        rxtx_factor  | 
      
        Float  | 
      
        云服务器可使用网络带宽与网络硬件带宽的比例。 当前未使用该参数,缺省值为1.0。  | 
     
| 
        os-flavor-access:is_public  | 
      
        Boolean  | 
      
        扩展属性,flavor是否给所有租户使用。 
 缺省值为true。  | 
     
| 
        links  | 
      
        Array of objects  | 
      
        规格相关快捷链接地址,详情请参见表5。  | 
     
请求示例
查询云服务器规格信息列表。
GET https://{endpoint}/v2.1/743b4c0428d94531b9f2add666642e6b/flavors/detail
 响应示例
{
    "flavors": [
        {
            "name": "c3.2xlarge.2",
            "links": [
                {
                    "href": "https://compute.region.example.com/v2.1/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2",
                    "rel": "self"
                },
                {
                    "href": "https://compute.region.example.com/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2",
                    "rel": "bookmark"
                }
            ],
            "ram": 16384,
            "OS-FLV-DISABLED:disabled": false,
            "vcpus": 8,
            "swap": "",
            "os-flavor-access:is_public": true,
            "rxtx_factor": 1,
            "OS-FLV-EXT-DATA:ephemeral": 0,
            "disk": 0,
            "id": "c3.2xlarge.2"
        },
        {
            "name": "c3.2xlarge.4",
            "links": [
                {
                    "href": "https://compute.region.example.com/v2.1/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.4",
                    "rel": "self"
                },
                {
                    "href": "https://compute.region.example.com/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.4",
                    "rel": "bookmark"
                }
            ],
            "ram": 32768,
            "OS-FLV-DISABLED:disabled": false,
            "vcpus": 8,
            "swap": "",
            "os-flavor-access:is_public": true,
            "rxtx_factor": 1,
            "OS-FLV-EXT-DATA:ephemeral": 0,
            "disk": 0,
            "id": "c3.2xlarge.4"
        }
    ]
}
 返回值
请参考通用请求返回值。
  
    