移除配置属性
名称
sco config unset - 移除配置属性
说明
sco config unset <section.property> [flags]
描述
从当前 active profile 中移除指定配置键。Region-bound 配置只会移除当前 active Region 下的值。
使用说明
- 移除
region会同时移除保存的 Region code。 zone是当前 Region 的必要配置,不能通过config unset移除;如需切换请使用sco zones use <zone>。
命令行参数
<section.property>:配置键。
命令行标志
无命令专属标志。
示例
移除默认订阅:
sco config unset subscription
移除默认资源组:
sco config unset resource_group
全局标志
以下全局标志适用于所有 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 |