Generates an Alibaba Cloud CLI command dynamically.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
openapiexplorer:GenerateCLICommand |
none |
*All Resource
|
None |
None |
Request syntax
POST /api/cli/makeCode HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
|
product |
string |
Yes |
The product code. You can find it in two ways:
|
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 |
| apiParamsdeprecated |
object |
No |
The request parameters. |
|
|
any |
No |
The request parameters. |
{ "InstanceChargeType": "PostPaid", "ResourceType": "instance", "AcceptLanguage": "en-US" } |
|
|
jsonApiParams |
string |
No |
The API request parameters in JSON format. This parameter has lower priority than apiParams. If you set apiParams, this parameter is ignored. |
{ "InstanceChargeType": "PostPaid", "ResourceType": "instance", "AcceptLanguage": "en-US" } |
|
aggregatePagination |
boolean |
No |
Specifies whether to enable aggregation. If enabled, the CLI automatically reads full data using pagination and aggregates the results. Warning
You can use this option only with List operations that support pagination.
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
|
cli |
string |
The CLI command. |
aliyun ecs DescribeRegions --ResourceType instance |
|
requestId |
string |
The request ID. |
A707AFA8-1A4C-5B2A-A165-8436C1EA38DB |
|
unifiedCli |
string |
The CLI command in unified CLI format. |
Examples
Success response
JSON format
{
"cli": "aliyun ecs DescribeRegions --ResourceType instance",
"requestId": "A707AFA8-1A4C-5B2A-A165-8436C1EA38DB",
"unifiedCli": ""
}
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.