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
Situation Awareness
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

Show all

Help Center/ Koo Command Line Interface/ User Guide/ Options/ Generating API Input Parameter Skeleton in JSON Format

Generating API Input Parameter Skeleton in JSON Format

Updated on 2024-06-17 GMT+08:00

The skeleton option is used to generate an API input parameter skeleton in JSON format. Adding --skeleton to a command generates an API input parameter file in JSON format in the current directory. Specify parameter values, and pass them using --cli-jsonInput=${JSON file name} to call the API.

hcloud RDS CreateConfiguration --cli-region="ap-southeast-1" --skeleton
Skeleton generated in JSON format. Path: C:\cli\RDS_CreateConfiguration_cn-20231108093800.json

The JSON file contains the following content:

{
	"header": {
		"X-Language": ""
	},
	"path": {
		"project_id": ""
	},
	"body": {
		"datastore": {
			"type": "",
			"version": ""
		},
		"description": "",
		"name": "",
		"values": {
			"": ""
		}
	}
}
--------------------------------- After the skeleton is filled in, delete this line and the following parameter description: ---------------------------------
{
	"header": {
		"X-Language": {
			"Required": false,
			"ParamType": "string",
			"Usage": "Language",
			"EnumValue": [
				"zh-cn",
				"en-us"
			]
		}
	},
	"path": {
		"project_id": {
			"Required": true,
			"ParamType": "string",
			"Usage": "Project ID"
		}
	},
	"body": {
		"datastore": {
			"type": {
				"Required": true,
				"ParamType": "string",
				"Usage": "DB engine. Its value can be any of the following and is case-insensitive:\n- MySQL\n- PostgreSQL\n- SQLServer\n- MariaDB",
				"EnumValue": [
					"MySQL",
					"PostgreSQL",
					"SQLServer",
					"MariaDB"
				]
			},
			"version": {
				"Required": true,
				"ParamType": "string",
				"Usage": "DB engine version\n \n - MySQL: 5.6 and 5.7 are supported. Example value: 5.7. MySQL 8.0 is available only for users with the required permission. You can contact Huawei Cloud customer service to apply for the permission.\n \n - PostgreSQL: 9.5, 9.6, 10, and 11 are supported. Example value: 9.6.\n \n - Microsoft SQL Server: 2017 Enterprise Edition, 2017 Standard Edition, 2017 Web Edition, 2014 Standard Edition, 2014 Enterprise Edition, 2016 Standard Edition, 2016 Enterprise Edition, 2012 Enterprise Edition, 2012 Standard Edition, 2012 Web Edition, 2008 R2 Enterprise Edition, 2008 R2 Web Edition, 2014 Web Edition, and 2016 Web Edition are supported. Example value: 2014_SE.\n For example, enter 2017_SE for 2017 Standard Edition, 2017_EE for 2017 Enterprise Edition, and 2017_WEB for 2017 Web Edition."
			}
		},
		"description": {
			"Required": false,
			"ParamType": "string",
			"Usage": "Parameter template description. It contains a maximum of 256 characters except the following special characters: >!<\"&'= Its value is left blank by default."
		},
		"name": {
			"Required": true,
			"ParamType": "string",
			"Usage": "Parameter template name. It contains a maximum of 64 characters and can contain only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and periods (.)."
		},
		"values": {
			"": {
				"Required": false,
				"ParamType": "string",
				"Usage": "Parameter values defined by users based on the default parameter templates. If this parameter is not specified, no parameter value is to be changed.\n \n - key: parameter name. For example, in \"max_connections\":\"10\", the key is max_connections. If key is left blank, the parameter value is not to be changed. If key is not empty, the parameter value cannot be empty, either.\n - value: parameter value. For example, in \"max_connections\":\"10\", the value is 10."
			}
		}
	}
}
NOTICE:
  • The generated JSON file consists of two parts, divided by a line. The upper part is the API parameter skeleton required by cli-jsonInput, and the lower part is the parameter description and value requirements. Specify the parameter values in the skeleton in the upper part by referring to the parameter description.
  • After filling in the JSON file, delete the dividing line and the content in the lower part. Parameters with no value specified must be deleted.

For example, after you specify parameters in the preceding file, the file content is as follows:

{
	"path": {
		"project_id": "0dd8cb****************19b5a84546"
	},
	"body": {
		"datastore": {
			"type": "MySQL",
			"version": "5.7"
		},
		"description": "test create configuration",
		"name": "test-001",
		"values": {
			"max_connections": "10"
		}
	}
}

Put the file in the following command using --cli-jsonInput and run this command to call the API:

hcloud RDS CreateConfiguration --cli-region="ap-southeast-1" --cli-jsonInput="RDS_CreateConfiguration_cn-20231108093800.json" --dryrun
API parameters transferred for the path, query, body, formData, header, and cookies in cli-jsonInput take precedence over command transfers.
-------- The execution is eliminated in dry-run mode. Current request: --------
POST https://rds.ap-southeast-1.myhuaweicloud.com/v3/0dd8cb****************19b5a84546/configurations
Content-Type: application/json
X-Project-Id: 0dd8cb****************19b5a84546
X-Sdk-Date: 20220621T103331Z
Authorization: ****

{
  "datastore": {
    "type": "MySQL",
    "version": "5.7"
  },
  "description": "test create configuration",
  "name": "test-001",
  "values": {
    "max_connections": "10"
  }
}

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