Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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

Creating a Cluster

Updated on 2023-06-15 GMT+08:00

Function

This API is used to create a cluster.

URI

POST /v1.1/{project_id}/clusters

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

X-Language

Yes

String

Request language

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

cluster

Yes

cluster object

Cluster object. For details, see the descriptions of cluster parameters.

auto_remind

No

Boolean

Whether to enable message notification. If you enable this function, you can configure a maximum of five mobile numbers or email addresses. You will be notified of table/file migration job failures and EIP exceptions by SMS message or email.

phone_num

No

String

Mobile number for receiving notifications

email

No

String

Email address for receiving notifications

Table 4 cluster

Parameter

Mandatory

Type

Description

scheduleBootTime

No

String

Time for scheduled startup of a CDM cluster. The CDM cluster starts at this time every day.

isScheduleBootOff

No

Boolean

Whether to enable scheduled startup/shutdown. The scheduled startup/shutdown and auto shutdown functions cannot be enabled at the same time.

instances

No

Array of instance objects

Node list. For details, see the descriptions of instances parameters.

datastore

No

Datastore object

Cluster information. For details, see the descriptions of datastore parameters.

extended_properties

No

ExtendedProperties object

Extended attribute. For details, see parameters in the extended_properties field.

scheduleOffTime

No

String

Time for scheduled shutdown of a CDM cluster. The CDM cluster shuts down directly at this time every day without waiting for unfinished jobs to complete.

vpcId

No

String

VPC ID, which is used for configuring a network for the cluster.

name

No

String

Cluster name

sys_tags

No

Array of sys_tags objects

Enterprise project information. For details, see the descriptions of sys_tags parameters.

isAutoOff

No

Boolean

Whether to enable auto shutdown. The auto shutdown and scheduled startup/shutdown functions cannot be enabled at the same time. When auto shutdown is enabled, if no job is running in the cluster and no scheduled job is available, a cluster will be automatically shut down 15 minutes after it starts running, which reduces costs for you.

Table 5 instance

Parameter

Mandatory

Type

Description

availability_zone

Yes

String

AZ where a cluster is located

nics

Yes

Array of nics objects

NIC list. A maximum of two NICs are supported. For details, see the descriptions of nics parameters.

flavorRef

Yes

String

Instance flavor

  • a79fd5ae-1833-448a-88e8-3ea2b913e1f6: cdm.small with 2 vCPUs and 4 GB memory applicable to Proof of Concept (PoC) verification and development and tests
  • fb8fe666-6734-4b11-bc6c-43d11db3c745: cdm.medium with 4 vCPUs and 8 GB memory applicable to the migration of a single database table with fewer than 10 million pieces of data
  • 5ddb1071-c5d7-40e0-a874-8a032e81a697: cdm.large with 8 vCPUs and 16 GB memory applicable to the migration of a single database table with 10 million or more pieces of data
  • 6ddb1072-c5d7-40e0-a874-8a032e81a698: cdm.xlarge with 16 vCPUs and 32 GB memory applicable to the migration of terabytes of data requiring 10GE bandwidth

type

Yes

String

Node type. Currently, only cdm is available.

Table 6 nics

Parameter

Mandatory

Type

Description

securityGroupId

Yes

String

Security group ID

net-id

Yes

String

Subnet ID

Table 7 Datastore

Parameter

Mandatory

Type

Description

type

No

String

Type. Generally, the value is cdm.

version

No

String

Cluster version

Table 8 ExtendedProperties

Parameter

Mandatory

Type

Description

workSpaceId

No

String

Workspace ID

resourceId

No

String

Resource ID

trial

No

String

Whether the cluster is a trial cluster

Table 9 sys_tags

Parameter

Mandatory

Type

Description

value

Yes

String

Enterprise project ID

key

Yes

String

The value is fixed at _sys_enterprise_project_id.

Response Parameters

Status code: 202

Table 10 Response body parameters

Parameter

Type

Description

name

String

Cluster name

id

String

Cluster ID

task

Task object

Task information

datastore

Datastore object

Cluster information

instances

Array of ClusterInstance objects

Cluster node information

Table 11 Task

Parameter

Type

Description

id

String

Task ID

name

String

Task name

Table 12 Datastore

Parameter

Type

Description

type

String

Type. Generally, the value is cdm.

version

String

Cluster version

Table 13 ClusterInstance

Parameter

Type

Description

id

String

Node VM ID

name

String

Name of the VM on the node

type

String

Node type. Currently, only cdm is available.

shard_id

String

Shard ID

Example Requests

POST /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters

{
  "cluster" : {
    "scheduleBootTime" : "",
    "isScheduleBootOff" : false,
    "instances" : [ {
      "availability_zone" : "**-*****-**",
      "nics" : [ {
        "securityGroupId" : "c37852d2-2d12-41cb-af47-65c80e995c80",
        "net-id" : "2d120298-6130-44d4-a438-454912fff901"
      } ],
      "flavorRef" : "5ddb1071-c5d7-40e0-a874-8a032e81a697",
      "type" : "cdm"
    } ],
    "datastore" : {
      "type" : "cdm",
      "version" : "1.8.10"
    },
    "scheduleOffTime" : "",
    "vpcId" : "67c06084-2212-4242-bcd4-d2144c2385a9",
    "name" : "cdm-ab82",
    "sys_tags" : [ {
      "value" : "1ce45885-4033-40d2-bdde-d4dbaceb387d",
      "key" : "_sys_enterprise_project_id"
    } ],
    "isAutoOff" : false
  },
  "auto_remind" : false,
  "phone_num" : "",
  "email" : ""
}

Example Responses

Status code: 202

Accepted

{
  "id" : "befc862c-9286-46a0-a1d6-300d98b63aad",
  "name" : "cdm-4ef213",
  "task" : {
    "id" : "2c9080047f1b1185017f1ef6ad0500ac",
    "name" : "rdsCreateBackupJob"
  },
  "datastore" : {
    "type" : "cdm",
    "version" : "2.9.1.100"
  },
  "instances" : [ {
    "id" : "b2672e7d-2faf-423f-96bb-0664cd743cfd",
    "name" : "cdm-4ef213-cdm-dn-1-1",
    "type" : "cdm",
    "shard_id" : "dn-1"
  } ]
}

Status Codes

Status Code

Description

202

Accepted

400

Request error.

401

Authentication failed.

403

You do not have required permissions to perform this operation.

404

The requested resource was not found.

500

Internal service error.

503

Service unavailable.

Error Codes

See Error Codes.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback