1. Packages
  2. Scaleway
  3. API Docs
  4. functions
  5. Namespace
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.functions.Namespace

Explore with Pulumi AI

The scaleway.functions.Namespace resource allows you to for Scaleway Serverless Functions.

Refer to the Functions namespace documentation and API documentation for more information.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.functions.Namespace("main", {
    name: "main-function-namespace",
    description: "Main function namespace",
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.functions.Namespace("main",
    name="main-function-namespace",
    description="Main function namespace")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/functions"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := functions.NewNamespace(ctx, "main", &functions.NamespaceArgs{
			Name:        pulumi.String("main-function-namespace"),
			Description: pulumi.String("Main function namespace"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Functions.Namespace("main", new()
    {
        Name = "main-function-namespace",
        Description = "Main function namespace",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.functions.Namespace;
import com.pulumi.scaleway.functions.NamespaceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var main = new Namespace("main", NamespaceArgs.builder()
            .name("main-function-namespace")
            .description("Main function namespace")
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:functions:Namespace
    properties:
      name: main-function-namespace
      description: Main function namespace
Copy

Create Namespace Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Namespace(name: string, args?: NamespaceArgs, opts?: CustomResourceOptions);
@overload
def Namespace(resource_name: str,
              args: Optional[NamespaceArgs] = None,
              opts: Optional[ResourceOptions] = None)

@overload
def Namespace(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              description: Optional[str] = None,
              environment_variables: Optional[Mapping[str, str]] = None,
              name: Optional[str] = None,
              project_id: Optional[str] = None,
              region: Optional[str] = None,
              secret_environment_variables: Optional[Mapping[str, str]] = None,
              tags: Optional[Sequence[str]] = None)
func NewNamespace(ctx *Context, name string, args *NamespaceArgs, opts ...ResourceOption) (*Namespace, error)
public Namespace(string name, NamespaceArgs? args = null, CustomResourceOptions? opts = null)
public Namespace(String name, NamespaceArgs args)
public Namespace(String name, NamespaceArgs args, CustomResourceOptions options)
type: scaleway:functions:Namespace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args NamespaceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args NamespaceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args NamespaceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args NamespaceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NamespaceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var scalewayNamespaceResource = new Scaleway.Functions.Namespace("scalewayNamespaceResource", new()
{
    Description = "string",
    EnvironmentVariables = 
    {
        { "string", "string" },
    },
    Name = "string",
    ProjectId = "string",
    Region = "string",
    SecretEnvironmentVariables = 
    {
        { "string", "string" },
    },
    Tags = new[]
    {
        "string",
    },
});
Copy
example, err := functions.NewNamespace(ctx, "scalewayNamespaceResource", &functions.NamespaceArgs{
	Description: pulumi.String("string"),
	EnvironmentVariables: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name:      pulumi.String("string"),
	ProjectId: pulumi.String("string"),
	Region:    pulumi.String("string"),
	SecretEnvironmentVariables: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var scalewayNamespaceResource = new Namespace("scalewayNamespaceResource", NamespaceArgs.builder()
    .description("string")
    .environmentVariables(Map.of("string", "string"))
    .name("string")
    .projectId("string")
    .region("string")
    .secretEnvironmentVariables(Map.of("string", "string"))
    .tags("string")
    .build());
Copy
scaleway_namespace_resource = scaleway.functions.Namespace("scalewayNamespaceResource",
    description="string",
    environment_variables={
        "string": "string",
    },
    name="string",
    project_id="string",
    region="string",
    secret_environment_variables={
        "string": "string",
    },
    tags=["string"])
Copy
const scalewayNamespaceResource = new scaleway.functions.Namespace("scalewayNamespaceResource", {
    description: "string",
    environmentVariables: {
        string: "string",
    },
    name: "string",
    projectId: "string",
    region: "string",
    secretEnvironmentVariables: {
        string: "string",
    },
    tags: ["string"],
});
Copy
type: scaleway:functions:Namespace
properties:
    description: string
    environmentVariables:
        string: string
    name: string
    projectId: string
    region: string
    secretEnvironmentVariables:
        string: string
    tags:
        - string
Copy

Namespace Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Namespace resource accepts the following input properties:

Description string
The description of the namespace.
EnvironmentVariables Dictionary<string, string>
The environment variables of the namespace.
Name Changes to this property will trigger replacement. string

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

ProjectId Changes to this property will trigger replacement. string
project_id) The unique identifier of the project that contains the namespace.
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
SecretEnvironmentVariables Dictionary<string, string>
The secret environment variables of the namespace.
Tags List<string>
List of tags ["tag1", "tag2", ...] attached to the function namespace
Description string
The description of the namespace.
EnvironmentVariables map[string]string
The environment variables of the namespace.
Name Changes to this property will trigger replacement. string

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

ProjectId Changes to this property will trigger replacement. string
project_id) The unique identifier of the project that contains the namespace.
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
SecretEnvironmentVariables map[string]string
The secret environment variables of the namespace.
Tags []string
List of tags ["tag1", "tag2", ...] attached to the function namespace
description String
The description of the namespace.
environmentVariables Map<String,String>
The environment variables of the namespace.
name Changes to this property will trigger replacement. String

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

projectId Changes to this property will trigger replacement. String
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
secretEnvironmentVariables Map<String,String>
The secret environment variables of the namespace.
tags List<String>
List of tags ["tag1", "tag2", ...] attached to the function namespace
description string
The description of the namespace.
environmentVariables {[key: string]: string}
The environment variables of the namespace.
name Changes to this property will trigger replacement. string

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

projectId Changes to this property will trigger replacement. string
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
secretEnvironmentVariables {[key: string]: string}
The secret environment variables of the namespace.
tags string[]
List of tags ["tag1", "tag2", ...] attached to the function namespace
description str
The description of the namespace.
environment_variables Mapping[str, str]
The environment variables of the namespace.
name Changes to this property will trigger replacement. str

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

project_id Changes to this property will trigger replacement. str
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. str
region). The region in which the namespace is created.
secret_environment_variables Mapping[str, str]
The secret environment variables of the namespace.
tags Sequence[str]
List of tags ["tag1", "tag2", ...] attached to the function namespace
description String
The description of the namespace.
environmentVariables Map<String>
The environment variables of the namespace.
name Changes to this property will trigger replacement. String

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

projectId Changes to this property will trigger replacement. String
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
secretEnvironmentVariables Map<String>
The secret environment variables of the namespace.
tags List<String>
List of tags ["tag1", "tag2", ...] attached to the function namespace

Outputs

All input properties are implicitly available as output properties. Additionally, the Namespace resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The Organization ID with which the namespace is associated.
RegistryEndpoint string
The registry endpoint of the namespace.
RegistryNamespaceId string
The registry namespace ID of the namespace.
Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The Organization ID with which the namespace is associated.
RegistryEndpoint string
The registry endpoint of the namespace.
RegistryNamespaceId string
The registry namespace ID of the namespace.
id String
The provider-assigned unique ID for this managed resource.
organizationId String
The Organization ID with which the namespace is associated.
registryEndpoint String
The registry endpoint of the namespace.
registryNamespaceId String
The registry namespace ID of the namespace.
id string
The provider-assigned unique ID for this managed resource.
organizationId string
The Organization ID with which the namespace is associated.
registryEndpoint string
The registry endpoint of the namespace.
registryNamespaceId string
The registry namespace ID of the namespace.
id str
The provider-assigned unique ID for this managed resource.
organization_id str
The Organization ID with which the namespace is associated.
registry_endpoint str
The registry endpoint of the namespace.
registry_namespace_id str
The registry namespace ID of the namespace.
id String
The provider-assigned unique ID for this managed resource.
organizationId String
The Organization ID with which the namespace is associated.
registryEndpoint String
The registry endpoint of the namespace.
registryNamespaceId String
The registry namespace ID of the namespace.

Look up Existing Namespace Resource

Get an existing Namespace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: NamespaceState, opts?: CustomResourceOptions): Namespace
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        environment_variables: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        organization_id: Optional[str] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None,
        registry_endpoint: Optional[str] = None,
        registry_namespace_id: Optional[str] = None,
        secret_environment_variables: Optional[Mapping[str, str]] = None,
        tags: Optional[Sequence[str]] = None) -> Namespace
func GetNamespace(ctx *Context, name string, id IDInput, state *NamespaceState, opts ...ResourceOption) (*Namespace, error)
public static Namespace Get(string name, Input<string> id, NamespaceState? state, CustomResourceOptions? opts = null)
public static Namespace get(String name, Output<String> id, NamespaceState state, CustomResourceOptions options)
resources:  _:    type: scaleway:functions:Namespace    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
The description of the namespace.
EnvironmentVariables Dictionary<string, string>
The environment variables of the namespace.
Name Changes to this property will trigger replacement. string

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

OrganizationId string
The Organization ID with which the namespace is associated.
ProjectId Changes to this property will trigger replacement. string
project_id) The unique identifier of the project that contains the namespace.
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
RegistryEndpoint string
The registry endpoint of the namespace.
RegistryNamespaceId string
The registry namespace ID of the namespace.
SecretEnvironmentVariables Dictionary<string, string>
The secret environment variables of the namespace.
Tags List<string>
List of tags ["tag1", "tag2", ...] attached to the function namespace
Description string
The description of the namespace.
EnvironmentVariables map[string]string
The environment variables of the namespace.
Name Changes to this property will trigger replacement. string

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

OrganizationId string
The Organization ID with which the namespace is associated.
ProjectId Changes to this property will trigger replacement. string
project_id) The unique identifier of the project that contains the namespace.
Region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
RegistryEndpoint string
The registry endpoint of the namespace.
RegistryNamespaceId string
The registry namespace ID of the namespace.
SecretEnvironmentVariables map[string]string
The secret environment variables of the namespace.
Tags []string
List of tags ["tag1", "tag2", ...] attached to the function namespace
description String
The description of the namespace.
environmentVariables Map<String,String>
The environment variables of the namespace.
name Changes to this property will trigger replacement. String

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

organizationId String
The Organization ID with which the namespace is associated.
projectId Changes to this property will trigger replacement. String
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
registryEndpoint String
The registry endpoint of the namespace.
registryNamespaceId String
The registry namespace ID of the namespace.
secretEnvironmentVariables Map<String,String>
The secret environment variables of the namespace.
tags List<String>
List of tags ["tag1", "tag2", ...] attached to the function namespace
description string
The description of the namespace.
environmentVariables {[key: string]: string}
The environment variables of the namespace.
name Changes to this property will trigger replacement. string

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

organizationId string
The Organization ID with which the namespace is associated.
projectId Changes to this property will trigger replacement. string
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. string
region). The region in which the namespace is created.
registryEndpoint string
The registry endpoint of the namespace.
registryNamespaceId string
The registry namespace ID of the namespace.
secretEnvironmentVariables {[key: string]: string}
The secret environment variables of the namespace.
tags string[]
List of tags ["tag1", "tag2", ...] attached to the function namespace
description str
The description of the namespace.
environment_variables Mapping[str, str]
The environment variables of the namespace.
name Changes to this property will trigger replacement. str

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

organization_id str
The Organization ID with which the namespace is associated.
project_id Changes to this property will trigger replacement. str
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. str
region). The region in which the namespace is created.
registry_endpoint str
The registry endpoint of the namespace.
registry_namespace_id str
The registry namespace ID of the namespace.
secret_environment_variables Mapping[str, str]
The secret environment variables of the namespace.
tags Sequence[str]
List of tags ["tag1", "tag2", ...] attached to the function namespace
description String
The description of the namespace.
environmentVariables Map<String>
The environment variables of the namespace.
name Changes to this property will trigger replacement. String

The unique name of the Functions namespace.

Important Updates to the name argument will recreate the namespace.

organizationId String
The Organization ID with which the namespace is associated.
projectId Changes to this property will trigger replacement. String
project_id) The unique identifier of the project that contains the namespace.
region Changes to this property will trigger replacement. String
region). The region in which the namespace is created.
registryEndpoint String
The registry endpoint of the namespace.
registryNamespaceId String
The registry namespace ID of the namespace.
secretEnvironmentVariables Map<String>
The secret environment variables of the namespace.
tags List<String>
List of tags ["tag1", "tag2", ...] attached to the function namespace

Import

Functions namespaces can be imported using {region}/{id}, as shown below:

bash

$ pulumi import scaleway:functions/namespace:Namespace main fr-par/11111111-1111-1111-1111-111111111111
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.