El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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
On this page
Help Center/ GaussDB(DWS)/ API Reference/ Application Cases/ Using Postman to Call the API for Creating a Cluster

Using Postman to Call the API for Creating a Cluster

Updated on 2024-04-18 GMT+08:00

Scenario

Use Postman to create a GaussDB(DWS) cluster. This API is an asynchronous API. It takes 10 to 15 minutes to create a cluster. For details, see Calling APIs.

Preparations

  • You have registered a Huawei Cloud account and enabled Huawei Cloud services.
  • You have obtained the endpoint addresses of GaussDB(DWS) in the region you choose. For details, see Regions and Endpoints.
  • You have obtained the username, password, account name, and project ID of your Huawei Cloud account. In the upper right corner of the Huawei Cloud management console, choose My Credentials > API Credential. The username, account name, user password, and region project ID is displayed in the Projects area. For details about how to obtain the project ID, see Obtaining a Project ID.
  • You have created a VPC and obtained the VPC and subnet IDs. For details, see Virtual Private Cloud (VPC).

Procedure

  1. Configure the environment.

    NOTE:

    Download Postman (7.24.0 is recommended) and call the snapshot creation service.

  2. Obtain the token for authentication.

    1. Create a POST request on Postman, select the Body tab, and enter the username, password, account name, and project ID.
      NOTE:

      The region where the Huawei Cloud service for obtaining the token is located must be the same as the region where the called service is located. Otherwise, the calling fails.

    2. Click Send in the upper right corner to send POST https://iam.ap-southeast-1.myhuaweicloud.com/v3/auth/tokens. Obtain the value of Headers->X-Subject-Token in the command output. (The validity period of the token is 24 hours.)

  3. Call the API for creating a cluster.

    1. Create a POST request on Postman, select Headers, add the corresponding KEY and VALUE, and copy the token value to X-Auth-Token.
    2. Call the API. This service provides two APIs for creating a cluster. The region of the request URL must be the same as that of the invoked service. project_id indicates the project ID (mandatory). For details about how to obtain the project ID, see Preparations.
      • v1 API:
        POST https://{Endpoint}/v1.0/{project_id}/clusters
      • v2 API:
        POST https://{Endpoint}/v2/{project_id}/clusters
      NOTE:

      The v2 API is recommended.

    3. Click Body and add the request parameter values to the request. Parameters vary by services. For details, see the API Description.
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      {
          "cluster": {
              "flavor": "dwsx2.rt.xlarge.m6",
              "num_node": 3,
              "subnet_id": "050e154d-9954-4929-b6d3-12af7c9213ac",
              "security_group_id": "",
              "vpc_id": "050e154d-9954-4929-b6d3-12af7c9213ac",
              "db_port": 8000,
              "datastore_version": "8.1.3.320",
              "availability_zones": [
                  "cn-north-4c"
              ],
              "name": "dws1",
              "num_cn": 3,
              "db_name": "dbadmin",
              "db_password": "Passw0rd!",
              "public_ip": {
                  "public_bind_type": "auto_assign",
                  "eip_id": ""
              },
              "volume": {
                  "volume": "SSD",
                  "capacity": "100"
              }
          }
      }
      
    4. Click Send in the upper right corner to send the request. For example, enter "POST https://dws.ap-southeast-1.myhuaweicloud.com/v2/89cd04f168b84af6be287f71730fdb4b/clusters" to view the creation result.
      {
        "cluster" : {
          "id" : "7d85f602-a948-4a30-afd4-e84f47471c15"
        }
      }

FAQs

  • DWS.5207 Invalid CN instance quantity.

    In the latest version, the number of CNs in the cluster ranges from 2 to the number of cluster nodes. The maximum value is 20 and the default value is 3.

  • DWS.5240 The selected flavor does not exist.

    If you use the v2 API, enter the flavor name but not the flavor ID.

  • ECS.0319 Failed to create a cluster, and the error message "The capacity of flavor am7.xlarge.8 is not sufficient." is displayed.

    The underlying resources for the selected flavor are insufficient. Check the flavor field and select an available flavor.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback