更新时间:2023-11-21 GMT+08:00
分享

查询实例可变更规格

功能介绍

查询实例可变更规格。

接口约束

该接口支持如下数据库实例:

  • GeminiDB Cassandra
  • GeminiDB Mongo
  • GeminiDB Influx
  • GeminiDB Redis

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/available-flavors

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

租户在某一region下的project ID。获取方法请参见获取项目ID

instance_id

String

实例ID。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Integer

索引位置,偏移量。

  • 从第一条数据偏移offset条数据后开始查询,默认为0。
  • 取值必须为数字,且不能为负数。

limit

Integer

查询个数上限值。

  • 取值范围:1~100。
  • 不传该参数时,默认查询前100条信息。

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

instance_id

String

实例ID。

instance_name

String

实例名称。

current_flavor

ComputeFlavor object

实例当前规格信息。

optional_flavors

OptionalFlavorsInfo object

实例规格变更时可用的规格列表信息。

表5 ComputeFlavor

参数

参数类型

描述

vcpus

String

CPU核数。

ram

String

内存大小,单位为GB。

spec_code

String

规格码。

az_status

Map<String,String>

可用区状态。

region_status

String

Region状态。

表6 OptionalFlavorsInfo

参数

参数类型

描述

list

Array of ComputeFlavor object

实例规格变更时可用的规格列表。

total_count

Integer

总记录数。

请求示例

  • URI样例
    GET https://gaussdb-nosql.cn-north-4.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/094424666ef04f79a2dfbe9f5b8b31a5in06/available-flavors
  • 请求体样例

    无。

响应示例

状态码: 200

Success.
{ 
  "instance_id" : "094424666ef04f79a2dfbe9f5b8b31a5in06", 
  "instance_name" : "geminidb_instance_noreuse_0_ZKv2FSkxgoc3F8bGzsaxNg", 
  "current_flavor" : { 
    "vcpus" : "4", 
    "ram" : "16", 
    "spec_code" : "geminidb.cassandra.xlarge.4", 
    "az_status" : { 
      "az2***" : "unknown", 
      "az1***" : "normal", 
      "az3***" : "unknown" 
    }, 
    "region_status" : null 
  }, 
  "optional_flavors" : {
    "list" : [ { 
      "vcpus" : "2", 
      "ram" : "8", 
      "spec_code" : "geminidb.cassandra.large.4", 
      "az_status" : { 
        "az2***" : "unknown", 
        "az1***" : "normal", 
        "az4***" : "normal", 
        "az3***" : "unknown" 
      }, 
      "region_status" : "normal" 
    }, { 
      "vcpus" : "8", 
      "ram" : "32", 
      "spec_code" : "geminidb.cassandra.2xlarge.4", 
      "az_status" : { 
        "az2***" : "unknown", 
        "az1***" : "normal", 
        "az3***" : "unknown" 
      }, 
      "region_status" : "normal" 
    }, { 
      "vcpus" : "16", 
      "ram" : "64", 
      "spec_code" : "geminidb.cassandra.4xlarge.4", 
      "az_status" : { 
        "az2***" : "unknown", 
        "az1***" : "normal", 
        "az3***" : "unknown" 
      }, 
      "region_status" : "normal" 
    }, { 
      "vcpus" : "32", 
      "ram" : "128", 
      "spec_code" : "geminidb.cassandra.8xlarge.4", 
      "az_status" : { 
        "az2***" : "unknown", 
        "az1***" : "normal", 
        "az3***" : "unknown" 
      }, 
      "region_status" : "normal" 
    } ], 
    "total_count": 4
  }
}

状态码

请参见状态码

错误码

请参见错误码

分享:

    相关文档

    相关产品