分布式数据库中间件 DDM-购买DDM实例:请求示例

时间:2024-11-04 15:28:29

请求示例

  • 创建按需付费实例,默认按照实际使用时长计费。
    POST https://{endpoint}/v1/{project_id}/instances
    
    {
      "instance" : {
        "name" : "ddm-test-001",
        "flavor_id" : "8f2e696c-a9c1-30bd-af90-25522bc67606",
        "node_num" : 4,
        "engine_id" : "2325a707-0361-8be6-dd01-13474bbac437",
        "enterprise_project_id" : "0",
        "available_zones" : [ "az1" ],
        "vpc_id" : "e1d886ec-cfe7-4cd4-b748-fc55a10b4172",
        "security_group_id" : "035b70ed-319b-4086-9fd7-62a2e8548b2e",
        "subnet_id" : "f942f970-1a02-4eee-8927-xxxxxxxx",
        "param_group_id" : "035b70ed-319b-4086-9fd7-xxxxxxxx"
      }
    }
  • 创建包周期实例,订购周期为一个月,自动从账户余额中支付,到期自动续订。
    POST https://{endpoint}/v1/{project_id}/instances
    
    {
      "instance" : {
        "name" : "ddm-test-003",
        "flavor_id" : "8f2e696c-a9c1-30bd-af90-25522bc67606",
        "node_num" : 4,
        "engine_id" : "2325a707-0361-8be6-dd01-13474bbac437",
        "enterprise_project_id" : "0",
        "available_zones" : [ "az1" ],
        "vpc_id" : "e1d886ec-cfe7-4cd4-b748-fc55a10b4172",
        "security_group_id" : "035b70ed-319b-4086-9fd7-62a2e8548b2e",
        "subnet_id" : "f942f970-1a02-4eee-8927-xxxxxxxx",
        "param_group_id" : "035b70ed-319b-4086-9fd7-xxxxxxxx"
      },
      "extend_param" : {
        "charge_mode" : "prePaid",
        "period_type" : "month",
        "period_num" : 1,
        "is_auto_renew" : "true",
        "is_auto_pay" : "true"
      }
    }
support.huaweicloud.com/api-ddm/ddm_04_0001.html