scaleway.Function
Explore with Pulumi AI
Creates and manages Scaleway Functions. For more information see the documentation.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const mainFunctionNamespace = new scaleway.FunctionNamespace("mainFunctionNamespace", {description: "Main function namespace"});
const mainFunction = new scaleway.Function("mainFunction", {
namespaceId: mainFunctionNamespace.id,
runtime: "go118",
handler: "Handle",
privacy: "private",
});
import pulumi
import pulumiverse_scaleway as scaleway
main_function_namespace = scaleway.FunctionNamespace("mainFunctionNamespace", description="Main function namespace")
main_function = scaleway.Function("mainFunction",
namespace_id=main_function_namespace.id,
runtime="go118",
handler="Handle",
privacy="private")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mainFunctionNamespace, err := scaleway.NewFunctionNamespace(ctx, "mainFunctionNamespace", &scaleway.FunctionNamespaceArgs{
Description: pulumi.String("Main function namespace"),
})
if err != nil {
return err
}
_, err = scaleway.NewFunction(ctx, "mainFunction", &scaleway.FunctionArgs{
NamespaceId: mainFunctionNamespace.ID(),
Runtime: pulumi.String("go118"),
Handler: pulumi.String("Handle"),
Privacy: pulumi.String("private"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var mainFunctionNamespace = new Scaleway.FunctionNamespace("mainFunctionNamespace", new()
{
Description = "Main function namespace",
});
var mainFunction = new Scaleway.Function("mainFunction", new()
{
NamespaceId = mainFunctionNamespace.Id,
Runtime = "go118",
Handler = "Handle",
Privacy = "private",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.FunctionNamespace;
import com.pulumi.scaleway.FunctionNamespaceArgs;
import com.pulumi.scaleway.Function;
import com.pulumi.scaleway.FunctionArgs;
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 mainFunctionNamespace = new FunctionNamespace("mainFunctionNamespace", FunctionNamespaceArgs.builder()
.description("Main function namespace")
.build());
var mainFunction = new Function("mainFunction", FunctionArgs.builder()
.namespaceId(mainFunctionNamespace.id())
.runtime("go118")
.handler("Handle")
.privacy("private")
.build());
}
}
resources:
mainFunctionNamespace:
type: scaleway:FunctionNamespace
properties:
description: Main function namespace
mainFunction:
type: scaleway:Function
properties:
namespaceId: ${mainFunctionNamespace.id}
runtime: go118
handler: Handle
privacy: private
Create Function Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);
@overload
def Function(resource_name: str,
args: FunctionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Function(resource_name: str,
opts: Optional[ResourceOptions] = None,
namespace_id: Optional[str] = None,
runtime: Optional[str] = None,
privacy: Optional[str] = None,
handler: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
memory_limit: Optional[int] = None,
min_scale: Optional[int] = None,
deploy: Optional[bool] = None,
http_option: Optional[str] = None,
environment_variables: Optional[Mapping[str, str]] = None,
max_scale: Optional[int] = None,
region: Optional[str] = None,
description: Optional[str] = None,
secret_environment_variables: Optional[Mapping[str, str]] = None,
timeout: Optional[int] = None,
zip_file: Optional[str] = None,
zip_hash: Optional[str] = None)
func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)
public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)
public Function(String name, FunctionArgs args)
public Function(String name, FunctionArgs args, CustomResourceOptions options)
type: scaleway:Function
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FunctionArgs
- 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 functionResource = new Scaleway.Function("functionResource", new()
{
NamespaceId = "string",
Runtime = "string",
Privacy = "string",
Handler = "string",
Name = "string",
ProjectId = "string",
MemoryLimit = 0,
MinScale = 0,
Deploy = false,
HttpOption = "string",
EnvironmentVariables =
{
{ "string", "string" },
},
MaxScale = 0,
Region = "string",
Description = "string",
SecretEnvironmentVariables =
{
{ "string", "string" },
},
Timeout = 0,
ZipFile = "string",
ZipHash = "string",
});
example, err := scaleway.NewFunction(ctx, "functionResource", &scaleway.FunctionArgs{
NamespaceId: pulumi.String("string"),
Runtime: pulumi.String("string"),
Privacy: pulumi.String("string"),
Handler: pulumi.String("string"),
Name: pulumi.String("string"),
ProjectId: pulumi.String("string"),
MemoryLimit: pulumi.Int(0),
MinScale: pulumi.Int(0),
Deploy: pulumi.Bool(false),
HttpOption: pulumi.String("string"),
EnvironmentVariables: pulumi.StringMap{
"string": pulumi.String("string"),
},
MaxScale: pulumi.Int(0),
Region: pulumi.String("string"),
Description: pulumi.String("string"),
SecretEnvironmentVariables: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeout: pulumi.Int(0),
ZipFile: pulumi.String("string"),
ZipHash: pulumi.String("string"),
})
var functionResource = new Function("functionResource", FunctionArgs.builder()
.namespaceId("string")
.runtime("string")
.privacy("string")
.handler("string")
.name("string")
.projectId("string")
.memoryLimit(0)
.minScale(0)
.deploy(false)
.httpOption("string")
.environmentVariables(Map.of("string", "string"))
.maxScale(0)
.region("string")
.description("string")
.secretEnvironmentVariables(Map.of("string", "string"))
.timeout(0)
.zipFile("string")
.zipHash("string")
.build());
function_resource = scaleway.Function("functionResource",
namespace_id="string",
runtime="string",
privacy="string",
handler="string",
name="string",
project_id="string",
memory_limit=0,
min_scale=0,
deploy=False,
http_option="string",
environment_variables={
"string": "string",
},
max_scale=0,
region="string",
description="string",
secret_environment_variables={
"string": "string",
},
timeout=0,
zip_file="string",
zip_hash="string")
const functionResource = new scaleway.Function("functionResource", {
namespaceId: "string",
runtime: "string",
privacy: "string",
handler: "string",
name: "string",
projectId: "string",
memoryLimit: 0,
minScale: 0,
deploy: false,
httpOption: "string",
environmentVariables: {
string: "string",
},
maxScale: 0,
region: "string",
description: "string",
secretEnvironmentVariables: {
string: "string",
},
timeout: 0,
zipFile: "string",
zipHash: "string",
});
type: scaleway:Function
properties:
deploy: false
description: string
environmentVariables:
string: string
handler: string
httpOption: string
maxScale: 0
memoryLimit: 0
minScale: 0
name: string
namespaceId: string
privacy: string
projectId: string
region: string
runtime: string
secretEnvironmentVariables:
string: string
timeout: 0
zipFile: string
zipHash: string
Function Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Function resource accepts the following input properties:
- Handler string
- Handler of the function. Depends on the runtime (function guide)
- Namespace
Id string - The namespace ID the function is associated with.
- Privacy string
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - Runtime string
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- Deploy bool
- Define if the function should be deployed, terraform will wait for function to be deployed
- Description string
- The description of the function.
- Environment
Variables Dictionary<string, string> - The environment variables of the function.
- Http
Option string - HTTP traffic configuration
- Max
Scale int - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- Memory
Limit int - Memory limit in MB for your function, defaults to 128MB
- Min
Scale int - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- Name string
The unique name of the function.
Important Updates to
name
will recreate the function.- Project
Id string project_id
) The ID of the project the namespace is associated with.- Region string
region
). The region in which the namespace should be created.- Secret
Environment Dictionary<string, string>Variables - The secret environment variables of the function.
- Timeout int
- Holds the max duration (in seconds) the function is allowed for responding to a request
- Zip
File string - Location of the zip file to upload containing your function sources
- Zip
Hash string - The hash of your source zip file, changing it will re-apply function. Can be any string
- Handler string
- Handler of the function. Depends on the runtime (function guide)
- Namespace
Id string - The namespace ID the function is associated with.
- Privacy string
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - Runtime string
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- Deploy bool
- Define if the function should be deployed, terraform will wait for function to be deployed
- Description string
- The description of the function.
- Environment
Variables map[string]string - The environment variables of the function.
- Http
Option string - HTTP traffic configuration
- Max
Scale int - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- Memory
Limit int - Memory limit in MB for your function, defaults to 128MB
- Min
Scale int - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- Name string
The unique name of the function.
Important Updates to
name
will recreate the function.- Project
Id string project_id
) The ID of the project the namespace is associated with.- Region string
region
). The region in which the namespace should be created.- Secret
Environment map[string]stringVariables - The secret environment variables of the function.
- Timeout int
- Holds the max duration (in seconds) the function is allowed for responding to a request
- Zip
File string - Location of the zip file to upload containing your function sources
- Zip
Hash string - The hash of your source zip file, changing it will re-apply function. Can be any string
- handler String
- Handler of the function. Depends on the runtime (function guide)
- namespace
Id String - The namespace ID the function is associated with.
- privacy String
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - runtime String
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- deploy Boolean
- Define if the function should be deployed, terraform will wait for function to be deployed
- description String
- The description of the function.
- environment
Variables Map<String,String> - The environment variables of the function.
- http
Option String - HTTP traffic configuration
- max
Scale Integer - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory
Limit Integer - Memory limit in MB for your function, defaults to 128MB
- min
Scale Integer - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name String
The unique name of the function.
Important Updates to
name
will recreate the function.- project
Id String project_id
) The ID of the project the namespace is associated with.- region String
region
). The region in which the namespace should be created.- secret
Environment Map<String,String>Variables - The secret environment variables of the function.
- timeout Integer
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip
File String - Location of the zip file to upload containing your function sources
- zip
Hash String - The hash of your source zip file, changing it will re-apply function. Can be any string
- handler string
- Handler of the function. Depends on the runtime (function guide)
- namespace
Id string - The namespace ID the function is associated with.
- privacy string
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - runtime string
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- deploy boolean
- Define if the function should be deployed, terraform will wait for function to be deployed
- description string
- The description of the function.
- environment
Variables {[key: string]: string} - The environment variables of the function.
- http
Option string - HTTP traffic configuration
- max
Scale number - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory
Limit number - Memory limit in MB for your function, defaults to 128MB
- min
Scale number - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name string
The unique name of the function.
Important Updates to
name
will recreate the function.- project
Id string project_id
) The ID of the project the namespace is associated with.- region string
region
). The region in which the namespace should be created.- secret
Environment {[key: string]: string}Variables - The secret environment variables of the function.
- timeout number
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip
File string - Location of the zip file to upload containing your function sources
- zip
Hash string - The hash of your source zip file, changing it will re-apply function. Can be any string
- handler str
- Handler of the function. Depends on the runtime (function guide)
- namespace_
id str - The namespace ID the function is associated with.
- privacy str
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - runtime str
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- deploy bool
- Define if the function should be deployed, terraform will wait for function to be deployed
- description str
- The description of the function.
- environment_
variables Mapping[str, str] - The environment variables of the function.
- http_
option str - HTTP traffic configuration
- max_
scale int - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory_
limit int - Memory limit in MB for your function, defaults to 128MB
- min_
scale int - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name str
The unique name of the function.
Important Updates to
name
will recreate the function.- project_
id str project_id
) The ID of the project the namespace is associated with.- region str
region
). The region in which the namespace should be created.- secret_
environment_ Mapping[str, str]variables - The secret environment variables of the function.
- timeout int
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip_
file str - Location of the zip file to upload containing your function sources
- zip_
hash str - The hash of your source zip file, changing it will re-apply function. Can be any string
- handler String
- Handler of the function. Depends on the runtime (function guide)
- namespace
Id String - The namespace ID the function is associated with.
- privacy String
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - runtime String
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- deploy Boolean
- Define if the function should be deployed, terraform will wait for function to be deployed
- description String
- The description of the function.
- environment
Variables Map<String> - The environment variables of the function.
- http
Option String - HTTP traffic configuration
- max
Scale Number - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory
Limit Number - Memory limit in MB for your function, defaults to 128MB
- min
Scale Number - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name String
The unique name of the function.
Important Updates to
name
will recreate the function.- project
Id String project_id
) The ID of the project the namespace is associated with.- region String
region
). The region in which the namespace should be created.- secret
Environment Map<String>Variables - The secret environment variables of the function.
- timeout Number
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip
File String - Location of the zip file to upload containing your function sources
- zip
Hash String - The hash of your source zip file, changing it will re-apply function. Can be any string
Outputs
All input properties are implicitly available as output properties. Additionally, the Function resource produces the following output properties:
- Cpu
Limit int - The CPU limit in mCPU for your function. More infos on resources here
- Domain
Name string - The native domain name of the function
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The organization ID the function is associated with.
- Cpu
Limit int - The CPU limit in mCPU for your function. More infos on resources here
- Domain
Name string - The native domain name of the function
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The organization ID the function is associated with.
- cpu
Limit Integer - The CPU limit in mCPU for your function. More infos on resources here
- domain
Name String - The native domain name of the function
- id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The organization ID the function is associated with.
- cpu
Limit number - The CPU limit in mCPU for your function. More infos on resources here
- domain
Name string - The native domain name of the function
- id string
- The provider-assigned unique ID for this managed resource.
- organization
Id string - The organization ID the function is associated with.
- cpu_
limit int - The CPU limit in mCPU for your function. More infos on resources here
- domain_
name str - The native domain name of the function
- id str
- The provider-assigned unique ID for this managed resource.
- organization_
id str - The organization ID the function is associated with.
- cpu
Limit Number - The CPU limit in mCPU for your function. More infos on resources here
- domain
Name String - The native domain name of the function
- id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The organization ID the function is associated with.
Look up Existing Function Resource
Get an existing Function 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?: FunctionState, opts?: CustomResourceOptions): Function
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cpu_limit: Optional[int] = None,
deploy: Optional[bool] = None,
description: Optional[str] = None,
domain_name: Optional[str] = None,
environment_variables: Optional[Mapping[str, str]] = None,
handler: Optional[str] = None,
http_option: Optional[str] = None,
max_scale: Optional[int] = None,
memory_limit: Optional[int] = None,
min_scale: Optional[int] = None,
name: Optional[str] = None,
namespace_id: Optional[str] = None,
organization_id: Optional[str] = None,
privacy: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
runtime: Optional[str] = None,
secret_environment_variables: Optional[Mapping[str, str]] = None,
timeout: Optional[int] = None,
zip_file: Optional[str] = None,
zip_hash: Optional[str] = None) -> Function
func GetFunction(ctx *Context, name string, id IDInput, state *FunctionState, opts ...ResourceOption) (*Function, error)
public static Function Get(string name, Input<string> id, FunctionState? state, CustomResourceOptions? opts = null)
public static Function get(String name, Output<String> id, FunctionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Cpu
Limit int - The CPU limit in mCPU for your function. More infos on resources here
- Deploy bool
- Define if the function should be deployed, terraform will wait for function to be deployed
- Description string
- The description of the function.
- Domain
Name string - The native domain name of the function
- Environment
Variables Dictionary<string, string> - The environment variables of the function.
- Handler string
- Handler of the function. Depends on the runtime (function guide)
- Http
Option string - HTTP traffic configuration
- Max
Scale int - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- Memory
Limit int - Memory limit in MB for your function, defaults to 128MB
- Min
Scale int - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- Name string
The unique name of the function.
Important Updates to
name
will recreate the function.- Namespace
Id string - The namespace ID the function is associated with.
- Organization
Id string - The organization ID the function is associated with.
- Privacy string
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - Project
Id string project_id
) The ID of the project the namespace is associated with.- Region string
region
). The region in which the namespace should be created.- Runtime string
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- Secret
Environment Dictionary<string, string>Variables - The secret environment variables of the function.
- Timeout int
- Holds the max duration (in seconds) the function is allowed for responding to a request
- Zip
File string - Location of the zip file to upload containing your function sources
- Zip
Hash string - The hash of your source zip file, changing it will re-apply function. Can be any string
- Cpu
Limit int - The CPU limit in mCPU for your function. More infos on resources here
- Deploy bool
- Define if the function should be deployed, terraform will wait for function to be deployed
- Description string
- The description of the function.
- Domain
Name string - The native domain name of the function
- Environment
Variables map[string]string - The environment variables of the function.
- Handler string
- Handler of the function. Depends on the runtime (function guide)
- Http
Option string - HTTP traffic configuration
- Max
Scale int - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- Memory
Limit int - Memory limit in MB for your function, defaults to 128MB
- Min
Scale int - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- Name string
The unique name of the function.
Important Updates to
name
will recreate the function.- Namespace
Id string - The namespace ID the function is associated with.
- Organization
Id string - The organization ID the function is associated with.
- Privacy string
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - Project
Id string project_id
) The ID of the project the namespace is associated with.- Region string
region
). The region in which the namespace should be created.- Runtime string
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- Secret
Environment map[string]stringVariables - The secret environment variables of the function.
- Timeout int
- Holds the max duration (in seconds) the function is allowed for responding to a request
- Zip
File string - Location of the zip file to upload containing your function sources
- Zip
Hash string - The hash of your source zip file, changing it will re-apply function. Can be any string
- cpu
Limit Integer - The CPU limit in mCPU for your function. More infos on resources here
- deploy Boolean
- Define if the function should be deployed, terraform will wait for function to be deployed
- description String
- The description of the function.
- domain
Name String - The native domain name of the function
- environment
Variables Map<String,String> - The environment variables of the function.
- handler String
- Handler of the function. Depends on the runtime (function guide)
- http
Option String - HTTP traffic configuration
- max
Scale Integer - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory
Limit Integer - Memory limit in MB for your function, defaults to 128MB
- min
Scale Integer - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name String
The unique name of the function.
Important Updates to
name
will recreate the function.- namespace
Id String - The namespace ID the function is associated with.
- organization
Id String - The organization ID the function is associated with.
- privacy String
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - project
Id String project_id
) The ID of the project the namespace is associated with.- region String
region
). The region in which the namespace should be created.- runtime String
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- secret
Environment Map<String,String>Variables - The secret environment variables of the function.
- timeout Integer
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip
File String - Location of the zip file to upload containing your function sources
- zip
Hash String - The hash of your source zip file, changing it will re-apply function. Can be any string
- cpu
Limit number - The CPU limit in mCPU for your function. More infos on resources here
- deploy boolean
- Define if the function should be deployed, terraform will wait for function to be deployed
- description string
- The description of the function.
- domain
Name string - The native domain name of the function
- environment
Variables {[key: string]: string} - The environment variables of the function.
- handler string
- Handler of the function. Depends on the runtime (function guide)
- http
Option string - HTTP traffic configuration
- max
Scale number - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory
Limit number - Memory limit in MB for your function, defaults to 128MB
- min
Scale number - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name string
The unique name of the function.
Important Updates to
name
will recreate the function.- namespace
Id string - The namespace ID the function is associated with.
- organization
Id string - The organization ID the function is associated with.
- privacy string
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - project
Id string project_id
) The ID of the project the namespace is associated with.- region string
region
). The region in which the namespace should be created.- runtime string
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- secret
Environment {[key: string]: string}Variables - The secret environment variables of the function.
- timeout number
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip
File string - Location of the zip file to upload containing your function sources
- zip
Hash string - The hash of your source zip file, changing it will re-apply function. Can be any string
- cpu_
limit int - The CPU limit in mCPU for your function. More infos on resources here
- deploy bool
- Define if the function should be deployed, terraform will wait for function to be deployed
- description str
- The description of the function.
- domain_
name str - The native domain name of the function
- environment_
variables Mapping[str, str] - The environment variables of the function.
- handler str
- Handler of the function. Depends on the runtime (function guide)
- http_
option str - HTTP traffic configuration
- max_
scale int - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory_
limit int - Memory limit in MB for your function, defaults to 128MB
- min_
scale int - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name str
The unique name of the function.
Important Updates to
name
will recreate the function.- namespace_
id str - The namespace ID the function is associated with.
- organization_
id str - The organization ID the function is associated with.
- privacy str
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - project_
id str project_id
) The ID of the project the namespace is associated with.- region str
region
). The region in which the namespace should be created.- runtime str
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- secret_
environment_ Mapping[str, str]variables - The secret environment variables of the function.
- timeout int
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip_
file str - Location of the zip file to upload containing your function sources
- zip_
hash str - The hash of your source zip file, changing it will re-apply function. Can be any string
- cpu
Limit Number - The CPU limit in mCPU for your function. More infos on resources here
- deploy Boolean
- Define if the function should be deployed, terraform will wait for function to be deployed
- description String
- The description of the function.
- domain
Name String - The native domain name of the function
- environment
Variables Map<String> - The environment variables of the function.
- handler String
- Handler of the function. Depends on the runtime (function guide)
- http
Option String - HTTP traffic configuration
- max
Scale Number - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale.
- memory
Limit Number - Memory limit in MB for your function, defaults to 128MB
- min
Scale Number - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly.
- name String
The unique name of the function.
Important Updates to
name
will recreate the function.- namespace
Id String - The namespace ID the function is associated with.
- organization
Id String - The organization ID the function is associated with.
- privacy String
- Privacy of the function. Can be either
private
orpublic
. Read more on authentication - project
Id String project_id
) The ID of the project the namespace is associated with.- region String
region
). The region in which the namespace should be created.- runtime String
- Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#get-f7de6a
- secret
Environment Map<String>Variables - The secret environment variables of the function.
- timeout Number
- Holds the max duration (in seconds) the function is allowed for responding to a request
- zip
File String - Location of the zip file to upload containing your function sources
- zip
Hash String - The hash of your source zip file, changing it will re-apply function. Can be any string
Import
Functions can be imported using the {region}/{id}
, e.g.
bash
$ pulumi import scaleway:index/function:Function main fr-par/11111111-1111-1111-1111-111111111111
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.