配置管理
名称
sco config - 配置管理
说明
sco config <command> [flags]
描述
查看和编辑当前 profile 的 SCO CLI 配置。配置包含访问凭据、active Region、语言,以及按 Region 保存的订阅、资源组和可用区等默认值。
使用说明
subscription、resource_group、zone、vpc_id以及产品级默认值会按当前 active Region 保存。- 设置
resource_group时会使用当前 active Region 下的subscription校验资源组;设置aec2.resource_group等产品级资源组时,会使用对应的aec2.subscription等产品级订阅校验。 region建议使用sco regions use切换;zone建议使用sco zones use切换。
命令行
列出当前 active profile 的配置。
查看指定配置键的值。
设置指定配置键的值。
移除指定配置键。
管理多个命名 profile。
全局标志
以下全局标志适用于所有 sco 命令:
--help:查看帮助信息。--profile <profile>:指定本次命令使用的 profile。--debug:输出调试日志。--subscription <subscription>:指定本次请求使用的订阅。--resource-group <resource-group>:指定本次请求使用的资源组。--region <region>:指定本次请求使用的 Region。--color <no|auto>:设置输出颜色模式。
支持的配置键
| 配置键 | 说明 | 存储范围 |
|---|---|---|
access_key_id | AccessKey ID | profile |
access_key_secret | AccessKey Secret | profile |
accept_language | 返回内容语言,支持 zh-CN、en-US | profile |
region | 当前 active Region | profile default |
subscription | 默认订阅 | 当前 active Region |
resource_group | 默认资源组 | 当前 active Region |
zone | 当前可用区 | 当前 active Region |
vpc_id | 默认 VPC ID | 当前 active Region |
aec2.subscription | AEC2 默认订阅 | 当前 active Region |
aec2.resource_group | AEC2 默认资源组 | 当前 active Region |
ws.subscription | WS 默认订阅 | 当前 active Region |
ws.resource_group | WS 默认资源组 | 当前 active Region |
ecp.subscription | ECP 默认订阅 | 当前 active Region |
ecp.resource_group | ECP 默认资源组 | 当前 active Region |
ecp.region | ECP 默认 Region | 当前 active Region |
ecp.zone | ECP 默认可用区 | 当前 active Region |