文档首页/ 数据库安全服务 DBSS/ API参考/ API/ 运维增强管理/ 包周期购买数据库运维实例
更新时间:2025-09-10 GMT+08:00
分享

包周期购买数据库运维实例

功能介绍

包周期购买数据库运维实例

调试

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

URI

POST /v2/{project_id}/db-om/charge/period/order

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释

项目ID。可通过IAM服务[查询指定IAM用户的项目列表]接口获取。

约束限制

不涉及

取值范围

以IAM服务接口返回值为准,字符长度32-64。

默认取值

不涉及

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释

用户Token。 通过调用IAM服务查询用户Token接口获取(响应消息头中X-Subject-Token的值)。

约束限制

不涉及

取值范围

IAM服务查询用户Token接口为准

默认取值

不涉及

表3 请求Body参数

参数

是否必选

参数类型

描述

tags

Array of ResourceTagInfoBean objects

资源标签列表

asset_nums

Integer

资产数量

availability_zone

String

可用分区

charging_mode

Integer

计费模式

cloud_service_type

String

服务类型

comment

String

备注信息

composite_product_id

String

组合套餐

deploy_mode

String

实例部署方式,默认为云上

  • CLOUD: 云上

  • OUTSIDE:云外

discount_id

String

折扣ID

enterprise_project_id

String

企业项目ID

flavor_ref

String

ECS规格ID

hx_password

String

前端登录密码

image_business_type

Integer

镜像业务类型

is_auto_renew

Integer

自费续费

  • 1:自动

  • 0:不自动

name

String

实例名称

nics

Array of Nic objects

网卡信息

outside_ins_config

OutsideInsConfig object

云实例配置

period_num

Integer

订购周期数目

period_type

Integer

订购周期类型

product_infos

Array of ProductInfoBeanNew objects

产品列表

promotion_activity_id

String

促销ID

promotion_info

String

折扣信息

public_ip

PublicIp object

弹性IP

region_id

String

区域ID

security_groups

Array of SecurityGroup objects

安全组信息

subscription_num

Integer

订购数量,当前仅支持1台

vpc_id

String

VPC ID

表4 ResourceTagInfoBean

参数

是否必选

参数类型

描述

key

String

标签KEY

value

String

标签VALUE

表5 Nic

参数

是否必选

参数类型

描述

ip_address

String

IP地址,不填或空字符串为自动分配

subnet_id

String

子网ID

表6 OutsideInsConfig

参数

是否必选

参数类型

描述

master_node_ip

String

主节点IP

slave_node_ip

String

从节点IP

virtual_ip

String

虚拟IP

表7 ProductInfoBeanNew

参数

是否必选

参数类型

描述

all_resource_names

Array of strings

所有资源名称

cloud_service_type

String

云服务类型

display_id

String

显示ID

product_id

String

产品ID

product_spec_desc

String

产品规格描述

resource_name

String

资源名称

resource_spec_code

String

资源规格

resource_type

String

资源类型

表8 PublicIp

参数

是否必选

参数类型

描述

eip

EIP object

EIP信息

id

String

IP地址ID

表9 EIP

参数

是否必选

参数类型

描述

bandwidth

BandWidth object

带宽参数

ipproductid

String

IP产品ID

iptype

String

EIP类型

表10 BandWidth

参数

是否必选

参数类型

描述

chargemode

String

计费类型

productid

String

带宽对应产品ID

sharetype

String

共享类型,目前仅支持PER

size

Integer

带宽,按需1-100M,包年包月1-300M

表11 SecurityGroup

参数

是否必选

参数类型

描述

id

String

安全组ID

响应参数

状态码:200

表12 响应Body参数

参数

参数类型

描述

code

String

返回码

description

String

描述信息

order_id

String

订单ID

状态码:400

表13 响应Body参数

参数

参数类型

描述

details

Array of DbssErrorDetail objects

PDP5鉴权异常信息

encoded_authorization_message

String

PDP5鉴权异常信息

error_code

String

错误码

error_msg

String

错误信息

表14 DbssErrorDetail

参数

参数类型

描述

error_code

String

错误码

error_msg

String

PDP5错误信息

状态码:401

表15 响应Body参数

参数

参数类型

描述

details

Array of DbssErrorDetail objects

PDP5鉴权异常信息

encoded_authorization_message

String

PDP5鉴权异常信息

error_code

String

错误码

error_msg

String

错误信息

表16 DbssErrorDetail

参数

参数类型

描述

error_code

String

错误码

error_msg

String

PDP5错误信息

状态码:403

表17 响应Body参数

参数

参数类型

描述

details

Array of DbssErrorDetail objects

PDP5鉴权异常信息

encoded_authorization_message

String

PDP5鉴权异常信息

error_code

String

错误码

error_msg

String

错误信息

表18 DbssErrorDetail

参数

参数类型

描述

error_code

String

错误码

error_msg

String

PDP5错误信息

状态码:500

表19 响应Body参数

参数

参数类型

描述

details

Array of DbssErrorDetail objects

PDP5鉴权异常信息

encoded_authorization_message

String

PDP5鉴权异常信息

error_code

String

错误码

error_msg

String

错误信息

表20 DbssErrorDetail

参数

参数类型

描述

error_code

String

错误码

error_msg

String

PDP5错误信息

请求示例

/v2/{project_id}/db-om/charge/period/order

{
  "flavor_ref" : "s6.2xlarge.2",
  "name" : "DBSS-f5e1",
  "vpc_id" : "21f3dac4-f460-4173-ba5e-cb7a0d528605",
  "availability_zone" : "cn-north-7c,cn-north-7c",
  "nics" : [ {
    "subnet_id" : "cbed162e-045a-4afd-aa2b-0da11219989c"
  } ],
  "security_groups" : [ {
    "id" : "0070ec22-bae4-4df3-af3d-9f928297b3b7"
  } ],
  "cloud_service_type" : "hws.service.type.dbss",
  "charging_mode" : 0,
  "period_type" : 2,
  "period_num" : 1,
  "subscription_num" : 1,
  "is_auto_renew" : 0,
  "promotion_info" : "",
  "product_infos" : [ {
    "product_id" : "OFFI10097xxxxxxxxxxxx693761",
    "cloud_service_type" : "hws.service.type.dbss",
    "resource_type" : "hws.resource.type.dbss.opsmgmt",
    "resource_spec_code" : "dbss.opsmgmt.high",
    "product_spec_desc" : "{\"specDesc\":{\"zh-cn\":{\"主机名称\":\"DBSS-e3f5\",\"规格\":\"数据库审计运维增强版\",\"虚拟私有云\":\"VPC-IPV4-请勿开启ipv6\",\"子网\":\"subnet-ipv4\"},\"en-us\":{\"Instance Name\":\"DBSS-e3f5\",\"Edition\":\"数据库审计运维增强版\",\"VPC\":\"VPC-IPV4-请勿开启ipv6\",\"Subnet\":\"subnet-ipv4\"}}}"
  } ],
  "region_id" : "cn-north-7",
  "hx_password" : "Firelxxxxxxx123!",
  "asset_nums" : 10,
  "image_business_type" : 1,
  "public_ip" : {
    "id" : "df0d32e1-671e-482b-bafd-413fa67d3add",
    "eip" : null
  },
  "enterprise_project_id" : "0"
}

响应示例

状态码:200

OK

{
  "description" : "Success",
  "code" : "0",
  "order_id" : "CS250825171489W7N"
}

状态码

状态码

描述

200

OK

400

请求参数有误。

401

认证失败

403

未授权

500

服务端错误

错误码

请参见错误码

相关文档