import * as pulumi from "@pulumi/pulumi"; /** * ## Import * * Functions can be imported using, `{region}/{id}`, as shown below: * * bash * * ```sh * $ pulumi import scaleway:index/function:Function main fr-par/11111111-1111-1111-1111-111111111111 * ``` */ export declare class Function extends pulumi.CustomResource { /** * Get an existing Function resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: FunctionState, opts?: pulumi.CustomResourceOptions): Function; /** * Returns true if the given object is an instance of Function. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Function; /** * The CPU limit in mVCPU for your function. */ readonly cpuLimit: pulumi.Output; readonly deploy: pulumi.Output; /** * The description of the function. */ readonly description: pulumi.Output; /** * The native domain name of the function. */ readonly domainName: pulumi.Output; /** * The [environment variables](https://www.scaleway.com/en/docs/compute/functions/concepts/#environment-variables) of the function. */ readonly environmentVariables: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Handler of the function, depends on the runtime. Refer to the [dedicated documentation](https://www.scaleway.com/en/developers/api/serverless-functions/#path-functions-create-a-new-function) for the list of supported runtimes. */ readonly handler: pulumi.Output; /** * HTTP traffic configuration */ readonly httpOption: pulumi.Output; /** * The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured `maxScale` value. */ readonly maxScale: pulumi.Output; /** * The memory resources in MB to allocate to each function. Defaults to 256 MB. */ readonly memoryLimit: pulumi.Output; /** * The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a `minScale` greater than 0 will cause your function to run constantly. */ readonly minScale: pulumi.Output; /** * The unique name of the function name. */ readonly name: pulumi.Output; /** * The Functions namespace ID of the function. * * > **Important** Updating the `name` argument will recreate the function. */ readonly namespaceId: pulumi.Output; /** * The organization ID the function is associated with. */ readonly organizationId: pulumi.Output; /** * The privacy type defines the way to authenticate to your function. Please check our dedicated [section](https://www.scaleway.com/en/developers/api/serverless-functions/#protocol-9dd4c8). */ readonly privacy: pulumi.Output; /** * `projectId`) The ID of the project the functions namespace is associated with. */ readonly projectId: pulumi.Output; /** * `region`). The region in which the namespace should be created. */ readonly region: pulumi.Output; /** * Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#path-functions-get-a-function) */ readonly runtime: pulumi.Output; /** * Execution environment of the function. */ readonly sandbox: pulumi.Output; /** * The [secret environment variables](https://www.scaleway.com/en/docs/compute/functions/concepts/#secrets) of the function. */ readonly secretEnvironmentVariables: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s. */ readonly timeout: pulumi.Output; /** * Path to the zip file containing your function sources to upload. */ readonly zipFile: pulumi.Output; /** * The hash of your source zip file, changing it will re-apply function. Can be any string */ readonly zipHash: pulumi.Output; /** * Create a Function resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: FunctionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Function resources. */ export interface FunctionState { /** * The CPU limit in mVCPU for your function. */ cpuLimit?: pulumi.Input; deploy?: pulumi.Input; /** * The description of the function. */ description?: pulumi.Input; /** * The native domain name of the function. */ domainName?: pulumi.Input; /** * The [environment variables](https://www.scaleway.com/en/docs/compute/functions/concepts/#environment-variables) of the function. */ environmentVariables?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Handler of the function, depends on the runtime. Refer to the [dedicated documentation](https://www.scaleway.com/en/developers/api/serverless-functions/#path-functions-create-a-new-function) for the list of supported runtimes. */ handler?: pulumi.Input; /** * HTTP traffic configuration */ httpOption?: pulumi.Input; /** * The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured `maxScale` value. */ maxScale?: pulumi.Input; /** * The memory resources in MB to allocate to each function. Defaults to 256 MB. */ memoryLimit?: pulumi.Input; /** * The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a `minScale` greater than 0 will cause your function to run constantly. */ minScale?: pulumi.Input; /** * The unique name of the function name. */ name?: pulumi.Input; /** * The Functions namespace ID of the function. * * > **Important** Updating the `name` argument will recreate the function. */ namespaceId?: pulumi.Input; /** * The organization ID the function is associated with. */ organizationId?: pulumi.Input; /** * The privacy type defines the way to authenticate to your function. Please check our dedicated [section](https://www.scaleway.com/en/developers/api/serverless-functions/#protocol-9dd4c8). */ privacy?: pulumi.Input; /** * `projectId`) The ID of the project the functions namespace is associated with. */ projectId?: pulumi.Input; /** * `region`). The region in which the namespace should be created. */ region?: pulumi.Input; /** * Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#path-functions-get-a-function) */ runtime?: pulumi.Input; /** * Execution environment of the function. */ sandbox?: pulumi.Input; /** * The [secret environment variables](https://www.scaleway.com/en/docs/compute/functions/concepts/#secrets) of the function. */ secretEnvironmentVariables?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s. */ timeout?: pulumi.Input; /** * Path to the zip file containing your function sources to upload. */ zipFile?: pulumi.Input; /** * The hash of your source zip file, changing it will re-apply function. Can be any string */ zipHash?: pulumi.Input; } /** * The set of arguments for constructing a Function resource. */ export interface FunctionArgs { deploy?: pulumi.Input; /** * The description of the function. */ description?: pulumi.Input; /** * The [environment variables](https://www.scaleway.com/en/docs/compute/functions/concepts/#environment-variables) of the function. */ environmentVariables?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Handler of the function, depends on the runtime. Refer to the [dedicated documentation](https://www.scaleway.com/en/developers/api/serverless-functions/#path-functions-create-a-new-function) for the list of supported runtimes. */ handler: pulumi.Input; /** * HTTP traffic configuration */ httpOption?: pulumi.Input; /** * The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured `maxScale` value. */ maxScale?: pulumi.Input; /** * The memory resources in MB to allocate to each function. Defaults to 256 MB. */ memoryLimit?: pulumi.Input; /** * The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a `minScale` greater than 0 will cause your function to run constantly. */ minScale?: pulumi.Input; /** * The unique name of the function name. */ name?: pulumi.Input; /** * The Functions namespace ID of the function. * * > **Important** Updating the `name` argument will recreate the function. */ namespaceId: pulumi.Input; /** * The privacy type defines the way to authenticate to your function. Please check our dedicated [section](https://www.scaleway.com/en/developers/api/serverless-functions/#protocol-9dd4c8). */ privacy: pulumi.Input; /** * `projectId`) The ID of the project the functions namespace is associated with. */ projectId?: pulumi.Input; /** * `region`). The region in which the namespace should be created. */ region?: pulumi.Input; /** * Runtime of the function. Runtimes can be fetched using [specific route](https://www.scaleway.com/en/developers/api/serverless-functions/#path-functions-get-a-function) */ runtime: pulumi.Input; /** * Execution environment of the function. */ sandbox?: pulumi.Input; /** * The [secret environment variables](https://www.scaleway.com/en/docs/compute/functions/concepts/#secrets) of the function. */ secretEnvironmentVariables?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s. */ timeout?: pulumi.Input; /** * Path to the zip file containing your function sources to upload. */ zipFile?: pulumi.Input; /** * The hash of your source zip file, changing it will re-apply function. Can be any string */ zipHash?: pulumi.Input; }