Skip to main content

tcb env

Manages the lifecycle of CloudBase environments, their login policies, and environment-level API keys.

Command index​

Environment operations​

CommandPurpose
tcb env listList environments
tcb env createCreate an environment
tcb env useSet the global default environment
tcb env detailShow the resource configuration
tcb env modifyChange the package or platform edition resource states
tcb env renameRename an environment alias
tcb env renewRenew an environment
tcb env usageShow resource usage
tcb env infoShow resource metric details
tcb env deleteDestroy an environment

Login policy​

The login policy defines which login methods an environment supports (email, phone number, anonymous login, and so on) and is managed by tcb env login. To log in to a Tencent Cloud account to authorize CLI operations, see Authentication.

CommandPurpose
tcb env login getShow the login policy
tcb env login setUpdate the login policy

API Key​

API keys let server-side or client-side code access CloudBase resources by key. Available since v3.1.0.

TypeDescriptionUse caseLimit
api_keyServer-side admin credentialServer-side API calls (not yet available)Up to 5 per environment
publish_keyFrontend anonymous access credentialFrontend anonymous access to CloudBase resources1 per environment
CommandPurpose
tcb env apikey listList API keys
tcb env apikey createCreate an API key
tcb env apikey deleteDelete an API key

Region is not a separate command. Set it with the global -r/--region flag or the region field of cloudbaserc.json, see Region.

Deprecated​

CommandBehaviorReplacement
tcb env login listLists the login methods configured for the environmenttcb env login get
tcb env login createInteractively adds login methods, supporting WeChat Official Account, WeChat Open Platform, and anonymous logintcb env login set
tcb env login updateInteractively modifies existing login methodstcb env login set
tcb env domain listtcb cors list
tcb env domain createtcb cors add
tcb env domain deletetcb cors rm