Namespaces provide logically isolated runtime environments for your applications. This simplifies service invocation and distributed configuration pushes. If you have different environments, such as development, testing, and production, you can use namespaces to logically isolate your applications. This helps you efficiently manage applications, start or stop them with a single click, and improve application security. This topic describes how to manage namespaces in the Serverless App Engine (SAE) console, including how to create, edit, and delete them.
Background information
SAE provides a default namespace for each region. You do not need to create one manually. If the default namespace does not meet your business requirements, you can create and manage a new namespace using the methods described in this topic.
Prerequisites
A virtual private cloud (VPC) must be created. For more information, see Create and manage a VPC.
Create a namespace
On the SAE Namespaces page, select a region from the top navigation bar and click Create Namespace.
In the Create Namespace panel, configure the parameters as described in the following table, and then click OK.
Parameter
Description
Example
Namespace Name
A custom name for the namespace.
Test
Namespace ID
The prefix is determined by the selected region and cannot be edited. For example, the prefix for the China (Shenzhen) region is
cn-shenzhen.You can customize the suffix. The namespace ID cannot be changed after the namespace is created.
demo
Description
A custom description for the namespace.
Test
VPC
Select an existing VPC. A deployment environment can be associated with only one VPC, but a VPC can be associated with multiple namespaces. After the namespace is created, you can change its associated VPC as needed.
NoteBefore changing the VPC associated with a namespace, you must first delete all applications in the current VPC.
vpc-wz9i4zexkzbqceo5n****

After a namespace is created, you can view, edit, or delete it on the Namespace page.
Edit a namespace
To edit the name or description of a namespace, find the namespace on the Namespace page and click Edit in the Actions column.
Delete a namespace
To delete a namespace, find it on the Namespace page and click Delete in the Actions column. In the dialog box that appears, click OK.
Switch the VPC
On the SAE Namespaces page, select a region in the top navigation bar. Then, click the name of the target Namespace to open the details page.
On the Basic Information page, in the Basic Information section, click the
icon to the right of VPC.In the Bind VPC panel, select a VPC from the VPC drop-down list and click OK.
After the switch is complete, you can view the updated VPC in the Basic Information section.