更新时间:2023-05-22 GMT+08:00
以无配置方式Account调用云服务API
KooCLI支持在命令中添加“--cli-username”,“--cli-password”和“--cli-domain”选项,以无配置方式Account调用云服务API:
hcloud EVS UpdateVolume --cli-region="ap-southeast-1" --volume_id="aed9****-****-****-****-****0e3219cf" --project_id="0dd8cb****************19b5a84546" --volume.name="ecs-abcd" --volume.description="volume test" --cli-username=s******1 --cli-password=****** --cli-domain=s******1 { "id": "aed9****-****-****-****-****0e3219cf", "links": [ { "href": "https://evs.ap-southeast-1.myhuaweicloud.com/v2/0dd8cb****************19b5a84546/volumes/aed9****-****-****-****-****0e3219cf", "rel": "self" }, { "href": "https://evs.ap-southeast-1.myhuaweicloud.com/0dd8cb****************19b5a84546/volumes/aed9****-****-****-****-****0e3219cf", "rel": "bookmark" } ], "name": "ecs-abcd", "status": "in-use", "attachments": [ { "server_id": "4f06****-****-****-****-****04dd856a", "attachment_id": "773d****-****-****-****-****e4f3b6f0", "attached_at": "2022-05-11T02:27:44.453029", "host_name": null, "volume_id": "aed9****-****-****-****-****0e3219cf", "device": "/dev/vda", "id": "aed9****-****-****-****-****0e3219cf" } ], "description": "volume test", "size": 40, "metadata": { "billing": "1", "readonly": "False", "attached_mode": "rw" }, "bootable": "true", "availability_zone": "ap-southeast-1a", "os-vol-host-attr:host": null, "source_volid": null, "snapshot_id": null, "created_at": "2022-05-11T02:27:09.279069", "volume_type": "SAS", "shareable": "false", "multiattach": false, "os-vol-tenant-attr:tenant_id": null, "os-volume-replication:extended_status": null, "volume_image_metadata": null }
为保证帐号安全,防止密码输入时被窥屏,当您使用此方式调用云服务API时,建议在命令中使用custom参数传入用户名密码。
父主题: 选项说明