Easily Switch Between Product Types

You can click the drop-down list box to switch between different product types.

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
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
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
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
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
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 (CCI)
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
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
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
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Pre-Checking Resources

Updated on 2025-06-26 GMT+08:00

Function

This API is used to pre-check resources. Before calling this API:

URI

POST /v3/{project_id}/resource-check

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints:

N/A

Range:

The value can contain 32 characters. Only letters and digits are allowed.

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints:

N/A

Range:

N/A

Default value:

N/A

Content-Type

Yes

String

Definition:

Content type.

Constraints:

N/A

Range:

application/json

Default value:

application/json

X-Language

No

String

Definition:

Request language type.

Constraints:

N/A

Range:

  • en-us

  • zh-cn

Default value:

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Definition:

Check type.

Constraints:

N/A

Range:

  • createInstance: pre-checking resources during instance creation

  • createReadonlyNode: pre-checking resources during read replica creation

  • resizeFlavor: pre-checking resources during instance specification change

Default value:

N/A

resource

Yes

CheckResourceInfo object

Definition:

Resource information.

Constraints:

N/A

Table 4 CheckResourceInfo

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Definition:

Enterprise project ID.

Constraints:

This parameter is mandatory when action is set to createInstance.

Range:

The value can contain 32 characters. Only letters and digits are allowed.

Default value:

N/A

instance_num

No

Integer

Definition:

Number of instances.

Constraints:

This parameter is mandatory when action is set to createInstance.

Range:

N/A

Default value:

N/A

mode

No

String

Definition:

Instance type.

Constraints:

This parameter is mandatory when action is set to createInstance.

Range:

Cluster

Default value:

N/A

availability_zone_mode

No

String

Definition:

AZ type.

Constraints:

This parameter is mandatory when action is set to createInstance.

Range:

  • single: single AZ

  • multi: multiple AZs

Default value:

N/A

node_num

No

Integer

Definition:

Number of nodes.

Constraints:

This parameter is mandatory when action is set to createInstance or createReadonlyNode.

Range:

N/A

Default value:

N/A

flavor_ref

No

String

Definition:

Specification code.

Constraints:

This parameter is mandatory when action is set to createInstance or resizeFlavor.

Range:

N/A

Default value:

N/A

availability_zone

No

String

Definition:

AZ code.

Constraints:

N/A

Range:

N/A

Default value:

N/A

subnet_id

No

String

Definition:

Subnet ID.

Subnet ID. You can obtain the value with either of the following methods:

  • Method 1: Log in to the VPC console and click the target subnet on the Subnets page. You can view the subnet ID on the displayed page.

  • Method 2: Query the subnet ID through the VPC API. For details, see Querying Subnets.

Constraints:

This parameter is mandatory when action is set to createInstance.

Range:

N/A

Default value:

N/A

instance_id

No

String

Definition:

Instance ID.

Constraints:

This parameter is mandatory when action is set to createReadonlyNode or resizeFlavor.

Range:

The value can contain 36 characters with a suffix of in07. Only letters and digits are allowed.

Default value:

N/A

Response Parameters

Status code: 200

Table 5 Response body parameter

Parameter

Type

Description

result

Boolean

Definition:

Pre-check results.

Range:

  • true: The pre-check is passed.

  • false: The pre-check fails.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

  • Pre-checking resources during instance creation
    POST https://{endpoint}/v3/97b026aa9cc4417888c14c84a1ad9860/resource-check
    
    {
      "action" : "createInstance",
      "resource" : {
        "enterprise_project_id" : 0,
        "instance_num" : 1,
        "mode" : "Cluster",
        "availability_zone_mode" : "single",
        "node_num" : 2,
        "flavor_ref" : "gaussdb.mysql.xlarge.x86.4",
        "availability_zone" : "cn-southwest-244b",
        "subnet_id" : "1e9f71dd-9192-4c0d-9739-161d8dcca68c"
      }
    }
  • Pre-checking resources during read replica creation
    POST https://{endpoint}/v3/97b026aa9cc4417888c14c84a1ad9860/resource-check
    
    {
      "action" : "createReadonlyNode",
      "resource" : {
        "instance_id" : "376e0847a2224e95afcd3e607eccd544in07",
        "node_num" : 1
      }
    }
  • Pre-checking resources during instance specification change
    POST https://{endpoint}/v3/97b026aa9cc4417888c14c84a1ad9860/resource-check
    
    {
      "action" : "resizeFlavor",
      "resource" : {
        "instance_id" : "376e0847a2224e95afcd3e607eccd544in07",
        "flavor_ref" : "gaussdb.mysql.xlarge.x86.4"
      }
    }

Example Response

Status code: 200

Success.

{
  "result" : true
}

Status Code

Status Code

Description

200

Success.

400

Client error.

500

Server error.

Error Code

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