检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
By default, the original calling result is output in JSON format: hcloud ECS NovaListServers --cli-region="ap-southeast-1" --project_id="0dd8cb****************19b5a84546" { "servers": [ { "name": "ecs-a6b4", "links": [ { "rel": "self",
cli-access-key and cli-secret-key) or temporary security credentials (temporary AK/SK and SecurityToken, that is, cli-access-key, cli-secret-key, and cli-security-token) Profile specified in the command or the default profile Cloud service agency (applicable only when KooCLI is used on an ECS
The following is an example: hcloud ECS NovaListServers --cli-region="ap-southeast-1" --project_id="0dd8cb****************19b5a84546" --cli-json-filter="servers[].
ecsAgency Authentication Assume that you have created an ECS agency. When using KooCLI on an ECS, add --cli-mode=ecsAgency in a command so that KooCLI can use the ECS agency to automatically obtain a temporary AK/SK and SecurityToken for authentication.
To use this mode, create a cloud service agency to delegate ECS to use the CLI on the IAM console, and add the agency in the Management Information > Agency area of the ECS details page. For details, see Cloud Service Delegation. Parent topic: Other
The following uses the Elastic Cloud Server (ECS) API for querying ECS details as an example to describe how to query and run a command.
--os-stop.type optional string body Specifies an ECS stop type. The default value is SOFT. [SOFT|HARD] - SOFT: normal ECS stop (default) - HARD: forcible ECS stop No parameters left empty Pass the values of os-stop.servers.
Example: hcloud ECS CreateServers --cli-region="ap-southeast-1" --cli-read-timeout=60 --cli-jsonInput=C:\cli\Ecs_CreateServers.json { "job_id": "ff808082******************ae0646", "serverIds": [ "dd86****-****-****-****-****91527651" ] } To pass API parameters
Commercial use Skipping HTTPS Request Certificate Verification 2 New feature KooCLI version: 2.4.4 You can create an IAM agency and use KooCLI on an Elastic Cloud Server (ECS) through agency authentication. Commercial use ecsAgency Delegation September 2021 No.
AK/SK Authentication Access key (permanent AK/SK) Enter a permanent AK (cli-access-key) and SK (cli-secret-key) in a command to call a cloud service API. hcloud ECS NovaListServers --cli-region="ap-southeast-1" --project_id="4ff018c3******************f31948" --cli-access-key=*****
For the I/O timeout (--cli-read-timeout), the default value is 10s. hcloud ECS DeleteServerPassword --cli-region="ap-southeast-1" --project_id="2cc60f5****************efa5019ef" --server_id="e6b99563-****-****-****-1820d4fd2a67" --cli-connect-timeout=10 --cli-read-timeout=15 You can
In the following command for querying Elastic Cloud Servers (ECSs), service is ECS, operation is NovaListServers, and the common information required for calling the API is obtained from the profile named default: hcloud ECS NovaListServers --cli-profile=default Operation A unique
When using KooCLI to run an OBS command on a delegated ECS, add the -authSource=ecsAgency parameter to the end of the command to automatically obtain temporary authentication information based on the ECS agency.
If you set this parameter to true, KooCLI will display a message asking for your confirmation. hcloud ECS NovaListServers --cli-region="ap-southeast-1" --project_id="2cc6****************6caefa5019ef" --cli-skip-secure-verify=true cli-endpoint Custom domain name.
These parameters help you poll results: hcloud ECS NovaShowServer --cli-region="ap-southeast-1" --server_id="e6b99563-xxxx-xxxx-xxxx-1820d4fd2a6" --cli-query="server.status" --cli-waiter="{\"expr\":\"server.status\",\"to\":\"ACTIVE\",\"timeout\":300}" Result polling ended. server.status
For example, to view the operation list of ECS, run hcloud ECS --help. hcloud <service> <operation> --help View details about a cloud service API. For example, to view details about the ECS API with operation ShowServer, run hcloud ECS ShowServer --help.
Options: AKSK: permanent AK/SK (access key) or temporary AK/SK and SecurityToken (security credentials). ecsAgency: Temporary authentication information is automatically obtained when you use KooCLI to call cloud service APIs on an Elastic Cloud Server (ECS).
During the command execution, you will be prompted to confirm whether to skip HTTPS certificate verification. hcloud ECS NovaListServers --cli-region="ap-southeast-1" --project_id="2cc6****************6caefa5019ef" --cli-skip-secure-verify=true Using `--cli-skip-secure-verify=true
authentication information based on the ECS agency.
For example: hcloud ECS NovaListServers --cli-profile=test --project_id="custom.projectId" When you use an encrypted custom parameter, KooCLI anonymizes the parameter value in places where the value may be displayed, for example, in the printed request URL of debugging information