← Authentication | Configuration(中文) | Usage →
CLI profiles and SSO sessions are stored in ~/.volcengine/config.json by default. The config file is written with 0600 permissions, and the config directory is created with 0700 permissions.
This document covers profile inspection, switching, updates, and deletion. Credential modes are covered in Authentication.
The config file contains:
current: current default profile name.profiles: profile map.sso-session: SSO session map.enableColor: whether colored JSON output is enabled. See Advanced Usage.
Example:
{
"current": "prod",
"profiles": {
"prod": {
"name": "prod",
"mode": "ak",
"access-key": "AK",
"secret-key": "SK",
"region": "cn-beijing"
}
},
"enableColor": false,
"sso-session": {}
}Avoid manually editing sensitive fields. Prefer CLI commands.
ve configure getWithout --profile, the command shows the current profile:
no profile name specified, show current profile: [prod]ve configure get --profile prodIf the profile does not exist, the command prints an empty profile object and does not create it.
ve configure listThe output starts with current:
*** current profile: prod ***Then each profile in the config file is printed.
ve configure profile --profile prod--profile is required. If the profile does not exist, current is not changed and an error is returned.
Switching current affects later service commands that do not specify --profile. For a single invocation, use:
ve ecs DescribeInstances --profile prodve configure set --profile prod --region cn-beijing --access-key AK --secret-key SKBehavior:
--profileis required.- If the profile does not exist, it is created with default mode
ak. - If the profile exists, only non-empty fields provided in this command are updated; omitted fields keep their previous values.
--disable-ssland--use-dual-stackare written only when explicitly provided.- Successful create or update switches current to that profile.
regionis not mandatory duringconfigure set, but API calls must be able to resolve a region.
Update region:
ve configure set --profile prod --region cn-shanghaiUpdate endpoint:
ve configure set --profile prod --endpoint ecs.cn-beijing.volcengineapi.comUse the standard endpoint resolver:
ve configure set --profile prod --endpoint-resolver standardConfigure proxy:
ve configure set --profile prod --https-proxy http://127.0.0.1:7890Enable dual-stack:
ve configure set --profile prod --use-dual-stackDisable SSL:
ve configure set --profile prod --disable-sslve configure delete --profile prod--profile is required. If the deleted profile is current, the CLI selects one remaining profile as the new current. If no profiles remain, current becomes empty.
Deleting a profile does not delete SSO sessions or the global Console Login cache directory. Console Login cache cleanup is covered in Authentication.
ve configure set --profile dev --region cn-beijing --access-key DEV_AK --secret-key DEV_SK
ve configure set --profile prod --region cn-beijing --access-key PROD_AK --secret-key PROD_SK
ve configure profile --profile dev
ve ecs DescribeInstances
ve configure profile --profile prod
ve ecs DescribeInstancesve configure profile --profile dev
ve ecs DescribeInstances --profile prodThis call uses prod only for this invocation and does not modify current.
ve ecs DescribeInstances --region cn-shanghai
ve sts GetCallerIdentity --region cn-beijing --endpoint sts.volcengineapi.com← Authentication | Configuration(中文) | Usage →