文档数据库服务 DDS-创建实例:响应消息

时间:2025-01-26 10:44:52

响应消息

  • 参数说明
    表9 参数说明

    名称

    参数类型

    是否必选

    描述

    id

    String

    实例ID。

    name

    String

    实例名称,与请求参数相同。

    datastore

    Object

    数据库信息,与请求参数相同。详情请参见表10

    created

    String

    创建时间为本地时间,格式为“yyyy-mm-dd hh:mm:ss”。

    status

    String

    实例状态,取值为“creating”。

    region

    String

    区域ID,与请求参数相同。

    availability_zone

    String

    可用区ID,与请求参数相同。

    vpc_id

    String

    虚拟私有云ID,与请求参数相同。

    subnet_id

    String

    子网的网络ID,与请求参数相同。

    security_group_id

    String

    安全组ID列表,与请求参数相同。

    port

    Integer

    数据库访问端口。

    disk_encryption_id

    String

    磁盘加密的密钥ID,与请求参数相同。

    mode

    String

    实例类型,与请求参数相同。

    configurations

    Array of objects

    参数组配置信息。

    详情请参见表11

    flavor

    Array of objects

    实例规格详情,与请求参数相同。详情请参见表12

    backup_strategy

    Object

    高级备份策略,与请求参数相同。详情请参见表13

    enterprise_project_id

    String

    企业项目ID。取值为“0”,表示为default企业项目。

    ssl_option

    String

    SSL开关选项,与请求参数相同。

    dss_pool_id

    String

    Dec用户专属存储ID,与请求参数相同。

    job_id

    String

    创建实例的工作流ID。

    tags

    Array of objects

    标签列表,与请求参数相同。

    详情请参见表14

    order_id

    String

    创建实例的订单ID,仅创建包年包月实例时返回该参数。

    charge_info

    Object

    付费方式信息,与请求参数相同。

    详情请参见表15

    表10 datastore字段数据结构说明

    名称

    参数类型

    是否必选

    描述

    type

    String

    数据库版本类型。取值为“DDS-Community”。

    version

    String

    数据库版本。支持5.0、4.4、4.2、4.0、3.4版本,取值为“5.0”、“4.4”、“4.2”、“4.0”、“3.4”。

    storage_engine

    String

    存储引擎。支持WiredTiger/RocksDB存储引擎。

    • 数据库版本为4.2及以上时,存储引擎为RocksDB,取值为“rocksDB”。
    • 数据库版本为4.0和3.4时,存储引擎为WiredTiger,取值为“wiredTiger”。
    表11 Configurations字段数据结构说明

    参数

    参数类型

    是否必选

    描述

    type

    String

    节点类型。取值:

    • 集群实例包含mongos、shard和config节点,各节点下该参数取值分别为“mongos”、“shard”和“config”。
    • 副本集实例下该参数取值为“replica”。

    枚举值:

    • mongos
    • shard
    • config
    • replica

    configuration_id

    String

    参数组id。获取参数值请参见表4

    表12 flavor字段数据结构说明

    名称

    参数类型

    是否必选

    描述

    type

    String

    节点类型。

    num

    String

    节点数量或组数量。

    storage

    String

    磁盘类型。

    size

    String

    磁盘大小。

    spec_code

    String

    资源规格编码。

    表13 backup_strategy字段数据结构说明

    名称

    参数类型

    是否必选

    描述

    start_time

    String

    备份时间段。自动备份将在该时间段内触发。

    keep_days

    String

    指定已生成的备份文件可以保存的天数。

    表14 tags字段数据结构说明

    名称

    参数类型

    是否必选

    描述

    key

    String

    标签键。最大长度36个unicode字符。

    key不能为空,不能为空字符串,不能重复。

    字符集:A-Z,a-z , 0-9,‘-’,‘_’,UNICODE字符(\u4E00-\u9FFF)。

    value

    String

    标签值。最大长度43个unicode字符。 可以为空字符串。

    字符集:A-Z,a-z , 0-9,‘.’,‘-’,‘_’,UNICODE字符(\u4E00-\u9FFF)。

    表15 charge_info字段数据结构说明

    参数

    参数类型

    是否必选

    描述

    charge_mode

    String

    计费模式。 取值范围:

    • prePaid:预付费,即包年/包月。
    • postPaid:后付费,即按需付费。

    period_type

    String

    订购周期类型。 “charge_mode”为“prePaid”时生效,且为必选值。 取值范围:

    • month:包月。
    • year:包年。

    period_num

    Integer

    “charge_mode”为“prePaid”时生效,且为必选值,指定订购的时间。 取值范围:

    • 当“period_type”为“month”时,取值为1~9。
    • 当“period_type”为“year”时,取值为1~3

    is_auto_renew

    Boolean

    创建包周期实例时可指定,表示是否自动续订,续订的周期和原周期相同,且续订时会自动支付。 取值范围:

    • true,表示自动续订。
    • false,表示不自动续订,默认为该方式。

    is_auto_pay

    Boolean

    创建包周期实例时可指定,表示是否自动从账户中支付,该字段不影响自动续订的支付方式。 取值范围:

    • true,表示自动从账户中支付。
    • false,表示手动从账户中支付,默认为该支付方式。

响应示例中参数“region”和“availability_zone”的值为示例值。

  • 响应示例

    集群实例:

    {  "id": "39b6a1a278844ac48119d86512e0000bin02",  "name": "test-cluster-01",  "datastore": {    "type": "DDS-Community",    "version": "3.4",    "storage_engine": "wiredTiger"  },  "created": "2019-01-16 09:34:36",  "status": "creating",  "region": "aaa",  "availability_zone": "az1xahz",  "vpc_id": "490a4a08-ef4b-44c5-94be-3051ef9e4fce",  "subnet_id": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f",  "security_group_id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5",  "disk_encryption_id": "2gfdsh-844a-4023-a776-fc5c5fb71fb4",  "mode": "Sharding",  "configurations": [    {      "type": "mongos",      "configuration_id": "acb288dbd1174f26a8960b45591bd98apr02"    },    {      "type": "shard",      "configuration_id": "5bca546f0be64b038124ef9cedd1bfa1pr02"    },    {      "type": "config",      "configuration_id": "4d123b3ba8294921802b11bf4d8c5735pr02"    }  ],  "flavor": [    {      "type": "mongos",      "num": 2,      "spec_code": "dds.mongodb.c6.medium.4.mongos"    },    {      "type": "shard",      "num": 2,      "storage": "ULTRAHIGH",      "spec_code": "dds.mongodb.c6.medium.4.shard",      "size": 20    },    {      "type": "config",      "num": 1,      "storage": "ULTRAHIGH",      "spec_code": "dds.mongodb.c6.large.2.config",      "size": 20    }  ],  "backup_strategy": {    "start_time": "08:15-09:15",    "keep_days": "8"  },  "enterprise_project_id": "",  "ssl_option": "1",  "dss_pool_id": "f5f84ed7-6f19-4bd4-99d7-b450ad6cc4dd",  "job_id": "c010abd0-48cf-4fa8-8cbc-090f093eaa2f",  "tags": [    {      "key": "dds001",      "value": "dds001"    }  ]}
support.huaweicloud.com/api-dds/dds_api_0020.html