GenerateCLICommand
Dynamically generates an Alibaba Cloud CLI command.
Try it now
Test
RAM authorization
Request syntax
POST /api/cli/makeCode HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| product |
string |
Yes |
The product code.
|
Ecs |
| apiVersion |
string |
Yes |
The API version. |
2014-05-26 |
| api |
string |
Yes |
The API name. |
DescribeRegions |
| regionId |
string |
No |
The region ID. |
cn-hangzhou |
apiParams
deprecated
|
object |
No |
The request parameters. |
|
|
any |
No |
The request parameters. |
{ "InstanceChargeType": "PostPaid", "ResourceType": "instance", "AcceptLanguage": "en-US" } |
|
| jsonApiParams |
string |
No |
The API input parameters in JSON format. This parameter has a lower priority than apiParams. If apiParams is specified, this parameter does not take effect. |
{ "InstanceChargeType": "PostPaid", "ResourceType": "instance", "AcceptLanguage": "en-US" } |
| aggregatePagination |
boolean |
No |
Specifies whether to enable the aggregation feature. If enabled, the CLI automatically reads full data in a paged manner and aggregates the results. Warning This option can be used only for List-type operations that support pagination.
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The request result. |
||
| cli |
string |
The CLI command. |
aliyun ecs DescribeRegions --ResourceType instance |
| requestId |
string |
The request ID. |
A707AFA8-1A4C-5B2A-A165-8436C1EA38DB |
| unifiedCli |
string |
The command in unified CLI format. |
aliyun ecs describe-regions --region cn-hangzhou |
Examples
Success response
JSON format
{
"cli": "aliyun ecs DescribeRegions --ResourceType instance",
"requestId": "A707AFA8-1A4C-5B2A-A165-8436C1EA38DB",
"unifiedCli": "aliyun ecs describe-regions --region cn-hangzhou"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParam.Product | Product name is required and cannot be null or empty. | |
| 400 | InvalidParam.ApiVersion | API version is required and cannot be null or empty. | |
| 400 | InvalidParam.ApiName | API name is required and cannot be null or empty. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.