|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: How to create, manage, and delete a Functions Namespace |
| 4 | + description: Step-by-step process for creating, managing, and deleting a Serverless Functions namespace in Scaleway. |
| 5 | +content: |
| 6 | + h1: How to create, manage, and delete a Functions Namespace |
| 7 | + paragraph: Step-by-step process for creating, managing, and deleting a Serverless Functions namespace in Scaleway. |
| 8 | +tags: functions namespace create manage delete environment variable secret |
| 9 | +dates: |
| 10 | + validation: 2024-11-14 |
| 11 | + posted: 2021-05-26 |
| 12 | +categories: |
| 13 | + - serverless |
| 14 | +--- |
| 15 | + |
| 16 | +This page shows you how to create, manage, and delete a Functions namespace using the Scaleway console. |
| 17 | + |
| 18 | +[Namespaces](/serverless/functions/concepts/#namespace) allow you to group your [functions](/serverless/functions/concepts/#function) and share environment variables, secrets and tokens between them. |
| 19 | + |
| 20 | +<Macro id="requirements" /> |
| 21 | + |
| 22 | +- A Scaleway account logged into the [console](https://console.scaleway.com) |
| 23 | +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 24 | + |
| 25 | +## Creating a Serverless Functions namespace |
| 26 | + |
| 27 | +1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays. |
| 28 | + |
| 29 | +2. Click **+ Create namespace**. If you have no existing Serverless Functions resources in your current Project, click **Create a function**. The functions namespace creation wizard displays. |
| 30 | + |
| 31 | +3. Complete the following steps in the wizard: |
| 32 | + - Enter a **name** or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes. |
| 33 | + - Enter an optional **description**. |
| 34 | + - Choose a **region**, which is the geographical location in which your namespace will be deployed. |
| 35 | + - Click **+ Add advanced options** to define any **environment variables** you want to inject into your function. For each environment variable, click **+ Add variable** and enter the key/value pair. |
| 36 | + - Set optional secret environment variables. **Secrets** are environment variables which are injected into your function and stored securely, but not displayed in the console after initial validation. Add a **key** and a **value**. |
| 37 | +4. Click **Create namespace only** to finish, or click **Create namespace and add a function** if you want to [create a function](/serverless/functions/how-to/create-a-function/) next. |
| 38 | + |
| 39 | + |
| 40 | +## Managing a Serverless Functions namespace |
| 41 | + |
| 42 | +1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays. |
| 43 | +2. Click the functions namespace you want to manage. |
| 44 | +3. Click the **Namespace settings** tab. Information about the region, registry endpoint and description of your namespace display. |
| 45 | +4. Click **+ Generate token** to create an access token for this namespace. |
| 46 | + |
| 47 | + <Message type="important"> |
| 48 | + The token key will only be available for copy once. Make sure to store it securely before leaving the page. |
| 49 | + </Message> |
| 50 | + |
| 51 | +5. Add any additional environment variables by clicking the <Icon name="edit" /> icon, **+ Add variable**, entering the key/value pair, and clicking <Icon name="validate"/>. |
| 52 | +6. Add any additional secrets by clicking the <Icon name="edit" /> icon, **+ Add secret**, entering the key/value pair, and clicking <Icon name="validate"/>. |
| 53 | + |
| 54 | +## Deleting a Serverless Functions namespace |
| 55 | + |
| 56 | +1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays. |
| 57 | + |
| 58 | +2. Click the <Icon name="more" /> icon next to the namespace you want to delete, and select **Delete** from the drop-down menu. |
| 59 | + |
| 60 | +3. Type **DELETE** in the pop-up that asks you to confirm the action, then click **Delete namespace**. |
| 61 | + |
| 62 | +<Message type="tip"> |
| 63 | + You can also delete a namespace from the **Namespace settings** tab. |
| 64 | +</Message> |
0 commit comments