import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A function consists of function code and function configuration. It is the basic unit for scheduling and running function code. * * ## Import * * ```sh * $ pulumi import volcenginecc:vefaas/function:Function example "function_id" * ``` */ 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; /** * Asynchronous task configuration */ readonly asyncTaskConfig: pulumi.Output; /** * Code package size (MB). */ readonly codeSize: pulumi.Output; /** * Code package size limit. SourceType=zip, CodeSizeLimit=15MB. SourceType=tos, CodeSizeLimit=256MB. */ readonly codeSizeLimit: pulumi.Output; /** * Custom startup command for the instance (currently only supported in native/v1 runtime) */ readonly command: pulumi.Output; /** * Function CPU billing policy. When creating a microservice application type function, this field must be set to always, meaning at least one instance is running. Other function types do not support this field */ readonly cpuStrategy: pulumi.Output; /** * Function creation time */ readonly creationTime: pulumi.Output; /** * Dependency installation task status. */ readonly dependencyInstallStatus: pulumi.Output; /** * Function description. Up to 1000 Unicode characters */ readonly description: pulumi.Output; /** * Whether to enable application monitoring */ readonly enableApmplus: pulumi.Output; /** * Enable function dependency installation. true: Enabled. The function installs dependencies after creation. false: Disabled. The function does not automatically install dependencies. */ readonly enableDependencyInstall: pulumi.Output; readonly envs: pulumi.Output; /** * Exclusive mode switch. true: disables multi-concurrency per instance, i.e., exclusive mode where a single instance can only handle one request at a time. false (default): enables multi-concurrency per instance, i.e., non-exclusive mode where a single instance can handle multiple requests at the same time. You can set the maximum concurrent requests per instance using MaxConcurrency. */ readonly exclusiveMode: pulumi.Output; /** * Function ID */ readonly functionId: pulumi.Output; /** * Function initialization timeout configuration */ readonly initializerSec: pulumi.Output; /** * Instance type of the function instance. Null value: CPU instance. Non-null value: GPU instance. */ readonly instanceType: pulumi.Output; /** * Function update time. */ readonly lastUpdateTime: pulumi.Output; /** * Maximum concurrency per instance. Effective when ExclusiveMode = false. Range: 1–1000 */ readonly maxConcurrency: pulumi.Output; /** * Maximum memory per instance, unit: MiB. Range: 512–4096, in increments of 512. Default: 1024 */ readonly memoryMb: pulumi.Output; /** * Function name. Function names must be unique within the same account. Function names support uppercase and lowercase English letters, numbers, hyphens (-), and underscores (_), with a length limit of 4–64 characters. */ readonly name: pulumi.Output; /** * NAS file storage mount configuration */ readonly nasStorage: pulumi.Output; /** * Function owner (Account Id). */ readonly owner: pulumi.Output; /** * Custom listening port for the instance (currently only supported in native/v1 runtime) */ readonly port: pulumi.Output; /** * Project name associated with the function */ readonly projectName: pulumi.Output; /** * Request timeout. Unit: seconds. Range: 1–900. Default: 30. */ readonly requestTimeout: pulumi.Output; /** * IAM role bound to the function instance */ readonly role: pulumi.Output; /** * Function runtime. Values: golang/v1, native/v1, nativejava8/v1, node14/v1, node20/v1, nodeprime14/v1, python3.12/v1, python3.8/v1, python3.9/v1. */ readonly runtime: pulumi.Output; /** * Code source. Values: zip: Base64-encoded binary ZIP file; tos: string in the format bucket*name:object*key; image: image address in the format host/namespace/repo:tag */ readonly source: pulumi.Output; /** * Image repository access configuration. */ readonly sourceAccessConfig: pulumi.Output; /** * Code source type. Values: tos: object storage (TOS); zip: local compressed file; image: image repository (CR), supports Basic and Enterprise editions */ readonly sourceType: pulumi.Output; readonly tags: pulumi.Output; /** * TLS configuration for Log Service */ readonly tlsConfig: pulumi.Output; /** * TOS object storage mount configuration */ readonly tosMountConfig: pulumi.Output; /** * Number of triggers for this function. */ readonly triggersCount: pulumi.Output; /** * Private network VPC configuration. */ readonly vpcConfig: 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 { /** * Asynchronous task configuration */ asyncTaskConfig?: pulumi.Input; /** * Code package size (MB). */ codeSize?: pulumi.Input; /** * Code package size limit. SourceType=zip, CodeSizeLimit=15MB. SourceType=tos, CodeSizeLimit=256MB. */ codeSizeLimit?: pulumi.Input; /** * Custom startup command for the instance (currently only supported in native/v1 runtime) */ command?: pulumi.Input; /** * Function CPU billing policy. When creating a microservice application type function, this field must be set to always, meaning at least one instance is running. Other function types do not support this field */ cpuStrategy?: pulumi.Input; /** * Function creation time */ creationTime?: pulumi.Input; /** * Dependency installation task status. */ dependencyInstallStatus?: pulumi.Input; /** * Function description. Up to 1000 Unicode characters */ description?: pulumi.Input; /** * Whether to enable application monitoring */ enableApmplus?: pulumi.Input; /** * Enable function dependency installation. true: Enabled. The function installs dependencies after creation. false: Disabled. The function does not automatically install dependencies. */ enableDependencyInstall?: pulumi.Input; envs?: pulumi.Input[]>; /** * Exclusive mode switch. true: disables multi-concurrency per instance, i.e., exclusive mode where a single instance can only handle one request at a time. false (default): enables multi-concurrency per instance, i.e., non-exclusive mode where a single instance can handle multiple requests at the same time. You can set the maximum concurrent requests per instance using MaxConcurrency. */ exclusiveMode?: pulumi.Input; /** * Function ID */ functionId?: pulumi.Input; /** * Function initialization timeout configuration */ initializerSec?: pulumi.Input; /** * Instance type of the function instance. Null value: CPU instance. Non-null value: GPU instance. */ instanceType?: pulumi.Input; /** * Function update time. */ lastUpdateTime?: pulumi.Input; /** * Maximum concurrency per instance. Effective when ExclusiveMode = false. Range: 1–1000 */ maxConcurrency?: pulumi.Input; /** * Maximum memory per instance, unit: MiB. Range: 512–4096, in increments of 512. Default: 1024 */ memoryMb?: pulumi.Input; /** * Function name. Function names must be unique within the same account. Function names support uppercase and lowercase English letters, numbers, hyphens (-), and underscores (_), with a length limit of 4–64 characters. */ name?: pulumi.Input; /** * NAS file storage mount configuration */ nasStorage?: pulumi.Input; /** * Function owner (Account Id). */ owner?: pulumi.Input; /** * Custom listening port for the instance (currently only supported in native/v1 runtime) */ port?: pulumi.Input; /** * Project name associated with the function */ projectName?: pulumi.Input; /** * Request timeout. Unit: seconds. Range: 1–900. Default: 30. */ requestTimeout?: pulumi.Input; /** * IAM role bound to the function instance */ role?: pulumi.Input; /** * Function runtime. Values: golang/v1, native/v1, nativejava8/v1, node14/v1, node20/v1, nodeprime14/v1, python3.12/v1, python3.8/v1, python3.9/v1. */ runtime?: pulumi.Input; /** * Code source. Values: zip: Base64-encoded binary ZIP file; tos: string in the format bucket*name:object*key; image: image address in the format host/namespace/repo:tag */ source?: pulumi.Input; /** * Image repository access configuration. */ sourceAccessConfig?: pulumi.Input; /** * Code source type. Values: tos: object storage (TOS); zip: local compressed file; image: image repository (CR), supports Basic and Enterprise editions */ sourceType?: pulumi.Input; tags?: pulumi.Input[]>; /** * TLS configuration for Log Service */ tlsConfig?: pulumi.Input; /** * TOS object storage mount configuration */ tosMountConfig?: pulumi.Input; /** * Number of triggers for this function. */ triggersCount?: pulumi.Input; /** * Private network VPC configuration. */ vpcConfig?: pulumi.Input; } /** * The set of arguments for constructing a Function resource. */ export interface FunctionArgs { /** * Asynchronous task configuration */ asyncTaskConfig?: pulumi.Input; /** * Custom startup command for the instance (currently only supported in native/v1 runtime) */ command?: pulumi.Input; /** * Function CPU billing policy. When creating a microservice application type function, this field must be set to always, meaning at least one instance is running. Other function types do not support this field */ cpuStrategy?: pulumi.Input; /** * Function description. Up to 1000 Unicode characters */ description?: pulumi.Input; /** * Whether to enable application monitoring */ enableApmplus?: pulumi.Input; /** * Enable function dependency installation. true: Enabled. The function installs dependencies after creation. false: Disabled. The function does not automatically install dependencies. */ enableDependencyInstall?: pulumi.Input; envs?: pulumi.Input[]>; /** * Exclusive mode switch. true: disables multi-concurrency per instance, i.e., exclusive mode where a single instance can only handle one request at a time. false (default): enables multi-concurrency per instance, i.e., non-exclusive mode where a single instance can handle multiple requests at the same time. You can set the maximum concurrent requests per instance using MaxConcurrency. */ exclusiveMode?: pulumi.Input; /** * Function initialization timeout configuration */ initializerSec?: pulumi.Input; /** * Maximum concurrency per instance. Effective when ExclusiveMode = false. Range: 1–1000 */ maxConcurrency?: pulumi.Input; /** * Maximum memory per instance, unit: MiB. Range: 512–4096, in increments of 512. Default: 1024 */ memoryMb?: pulumi.Input; /** * Function name. Function names must be unique within the same account. Function names support uppercase and lowercase English letters, numbers, hyphens (-), and underscores (_), with a length limit of 4–64 characters. */ name?: pulumi.Input; /** * NAS file storage mount configuration */ nasStorage?: pulumi.Input; /** * Custom listening port for the instance (currently only supported in native/v1 runtime) */ port?: pulumi.Input; /** * Project name associated with the function */ projectName?: pulumi.Input; /** * Request timeout. Unit: seconds. Range: 1–900. Default: 30. */ requestTimeout?: pulumi.Input; /** * IAM role bound to the function instance */ role?: pulumi.Input; /** * Function runtime. Values: golang/v1, native/v1, nativejava8/v1, node14/v1, node20/v1, nodeprime14/v1, python3.12/v1, python3.8/v1, python3.9/v1. */ runtime?: pulumi.Input; /** * Code source. Values: zip: Base64-encoded binary ZIP file; tos: string in the format bucket*name:object*key; image: image address in the format host/namespace/repo:tag */ source?: pulumi.Input; /** * Image repository access configuration. */ sourceAccessConfig?: pulumi.Input; /** * Code source type. Values: tos: object storage (TOS); zip: local compressed file; image: image repository (CR), supports Basic and Enterprise editions */ sourceType?: pulumi.Input; tags?: pulumi.Input[]>; /** * TLS configuration for Log Service */ tlsConfig?: pulumi.Input; /** * TOS object storage mount configuration */ tosMountConfig?: pulumi.Input; /** * Private network VPC configuration. */ vpcConfig?: pulumi.Input; }