Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Buying a DDM instance

Updated on 2024-08-02 GMT+08:00

Function

This API is used to buy a DDM instance.

Constraints

DDM runs in VPCs. Before you create a DDM instance, ensure that a VPC is available and a subnet and security group have been configured.

URI

POST /v1/{project_id}/instances

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

To obtain this value, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

instance

Yes

CreateInstanceDetail object

Instance information

extend_param

No

CreateInstanceExtendParam object

object

Extended parameter, which is available only when you create a yearly/monthly instance

Table 4 CreateInstanceDetail

Parameter

Mandatory

Type

Description

name

Yes

String

Name of a DDM instance, which:

  • Can include 4 to 64 characters.
  • Must start with a letter.
  • Can contain only letters, digits, underscores (_), and hyphens (-).

Minimum length: 4 characters

Maximum length: 64 characters

flavor_id

Yes

String

Class ID

node_num

Yes

Integer

Number of nodes

engine_id

Yes

String

Engine ID

enterprise_project_id

No

String

Enterprise project ID

available_zones

Yes

Array of strings

AZ code. The value cannot be empty. For details, see Regions and Endpoints.

vpc_id

Yes

String

VPC ID

security_group_id

Yes

String

Security group ID

subnet_id

Yes

String

Subnet ID

param_group_id

No

String

Parameter group ID

time_zone

No

String

UTC time zone. The default value is UTC. The value can be UTC, UTC-12:00, UTC-11:00, UTC-10:00, UTC-09:00, UTC-08:00, UTC-07:00, UTC-06:00, UTC-05:00, UTC-04:00, UTC-03:00, UTC-02:00, UTC-01:00, UTC+01:00, UTC+02:00, UTC+03:00, UTC+05:00, UTC+06:00, UTC+07:00, UTC+08:00, UTC+09:00, UTC+10:00, UTC+11:00, and UTC+12:00.

admin_user_name

No

String

Username of the administrator. The username:

  • Can include 1 to 32 characters.
  • Must start with a letter.
  • Can contain only letters, digits, and underscores (_).

admin_user_password

No

String

Password of the administrator. The password:

  • Can include 8 to 32 characters.
  • Must be a combination of uppercase letters, lowercase letters, digits, and the following special characters: ~!@#%^*-_+? Must be a strong password to improve security and prevent security risks such as brute force cracking.
Table 5 CreateInstanceExtendParam

Parameter

Mandatory

Type

Description

charge_mode

No

String

Billing mode. The value can be:

  • prePaid: indicates the yearly/monthly billing mode.
  • postPaid: indicates the pay-per-use billing mode. Default value: postPaid

Default value: postPaid

Enumerated values:

  • prePaid
  • postPaid

period_type

No

String

Subscription period. The value can be:

  • month: indicates the subscription time unit is month.
  • year: indicates the subscription time unit is year. This parameter is valid and mandatory if charge_mode is set to prePaid.

Enumerated values:

  • month
  • year

period_num

No

Integer

Subscription duration.

  • If period_type is set to month, the value ranges from 1 to 9.
  • If period_type is set to year, the value is 1. This parameter is valid and mandatory if charge_mode is set to prePaid.

is_auto_renew

No

String

Whether the instance is automatically renewed when it expires. The value can be:

  • true: The instance is automatically renewed when it expires.
  • false: The instance is not automatically renewed when it expires. This parameter is valid when charge_mode is set to prePaid. The instance is not automatically renewed by default if no value is specified. "

Enumerated values:

  • true
  • false

is_auto_pay

No

String

Whether the order is paid from the customer's account balance. The value can be:

  • true: indicates that the order is automatically paid from the customer's account balance.
  • false: indicates that the order needs to be paid manually. This parameter is available if charge_mode is set to prePaid. The order needs to be paid manually by default if no value is specified. "

Enumerated values:

  • true
  • false

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

id

String

Instance ID. This parameter is returned only when a pay-per-use instance is created.

order_id

String

Order ID. This parameter is returned only when a yearly/monthly instance is created.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Example Request

  • Creating a pay-per-use DDM instance. You are billed based on how long you use the instance by default.
    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"
      }
    }
  • Creating a yearly/monthly DDM instance. You are billed on a monthly basis. The order will be paid from your account balance and automatically renewed before the subscription expires.
    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"
      }
    }

Example Response

Status code: 200

OK

Buying a pay-per-use instance:

{
  "id": "e90bc6739a3c4666a577c3fa1524dac2in09", 
  "order_id": null 
}

Buying a yearly/monthly instance:

{
  "id" : null, 
  "order_id" : "CS1810251738L8VVD" 
}

Status code: 400

bad request

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

Status code: 500

server error

{
  "externalMessage" : "Server failure.",
  "errCode" : "DBS.200412"
}

Status Codes

Status Code

Description

200

OK

400

bad request

500

server error

Error Codes

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback