1. Packages
  2. Volcengine
  3. API Docs
  4. vefaas
  5. Function
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.vefaas.Function

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage vefaas function

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.vefaas.Function("foo", {
        description: "123131231",
        exclusiveMode: false,
        requestTimeout: 30,
        runtime: "golang/v1",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.vefaas.Function("foo",
        description="123131231",
        exclusive_mode=False,
        request_timeout=30,
        runtime="golang/v1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vefaas"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vefaas.NewFunction(ctx, "foo", &vefaas.FunctionArgs{
    			Description:    pulumi.String("123131231"),
    			ExclusiveMode:  pulumi.Bool(false),
    			RequestTimeout: pulumi.Int(30),
    			Runtime:        pulumi.String("golang/v1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Vefaas.Function("foo", new()
        {
            Description = "123131231",
            ExclusiveMode = false,
            RequestTimeout = 30,
            Runtime = "golang/v1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vefaas.Function;
    import com.pulumi.volcengine.vefaas.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 foo = new Function("foo", FunctionArgs.builder()        
                .description("123131231")
                .exclusiveMode(false)
                .requestTimeout(30)
                .runtime("golang/v1")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:vefaas:Function
        properties:
          description: '123131231'
          exclusiveMode: false
          requestTimeout: 30
          runtime: golang/v1
    

    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,
                 runtime: Optional[str] = None,
                 exclusive_mode: Optional[bool] = None,
                 request_timeout: Optional[int] = None,
                 envs: Optional[Sequence[FunctionEnvArgs]] = None,
                 command: Optional[str] = None,
                 initializer_sec: Optional[int] = None,
                 max_concurrency: Optional[int] = None,
                 memory_mb: Optional[int] = None,
                 name: Optional[str] = None,
                 description: Optional[str] = None,
                 nas_storage: Optional[FunctionNasStorageArgs] = None,
                 port: Optional[int] = None,
                 cpu_strategy: Optional[str] = None,
                 source: Optional[str] = None,
                 source_access_config: Optional[FunctionSourceAccessConfigArgs] = None,
                 source_type: Optional[str] = None,
                 tls_config: Optional[FunctionTlsConfigArgs] = None,
                 tos_mount_config: Optional[FunctionTosMountConfigArgs] = None,
                 vpc_config: Optional[FunctionVpcConfigArgs] = 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: volcengine:vefaas: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 Volcengine.Vefaas.Function("functionResource", new()
    {
        Runtime = "string",
        ExclusiveMode = false,
        RequestTimeout = 0,
        Envs = new[]
        {
            new Volcengine.Vefaas.Inputs.FunctionEnvArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        Command = "string",
        InitializerSec = 0,
        MaxConcurrency = 0,
        MemoryMb = 0,
        Name = "string",
        Description = "string",
        NasStorage = new Volcengine.Vefaas.Inputs.FunctionNasStorageArgs
        {
            EnableNas = false,
            NasConfigs = new[]
            {
                new Volcengine.Vefaas.Inputs.FunctionNasStorageNasConfigArgs
                {
                    FileSystemId = "string",
                    LocalMountPath = "string",
                    MountPointId = "string",
                    RemotePath = "string",
                },
            },
        },
        Port = 0,
        CpuStrategy = "string",
        Source = "string",
        SourceAccessConfig = new Volcengine.Vefaas.Inputs.FunctionSourceAccessConfigArgs
        {
            Password = false,
            Username = "string",
        },
        SourceType = "string",
        TlsConfig = new Volcengine.Vefaas.Inputs.FunctionTlsConfigArgs
        {
            EnableLog = false,
            TlsProjectId = "string",
            TlsTopicId = "string",
        },
        TosMountConfig = new Volcengine.Vefaas.Inputs.FunctionTosMountConfigArgs
        {
            EnableTos = false,
            Credentials = new Volcengine.Vefaas.Inputs.FunctionTosMountConfigCredentialsArgs
            {
                AccessKeyId = "string",
                SecretAccessKey = "string",
            },
            MountPoints = new[]
            {
                new Volcengine.Vefaas.Inputs.FunctionTosMountConfigMountPointArgs
                {
                    BucketName = "string",
                    BucketPath = "string",
                    Endpoint = "string",
                    LocalMountPath = "string",
                    ReadOnly = false,
                },
            },
        },
        VpcConfig = new Volcengine.Vefaas.Inputs.FunctionVpcConfigArgs
        {
            EnableVpc = false,
            EnableSharedInternetAccess = false,
            SecurityGroupIds = new[]
            {
                "string",
            },
            SubnetIds = new[]
            {
                "string",
            },
            VpcId = "string",
        },
    });
    
    example, err := vefaas.NewFunction(ctx, "functionResource", &vefaas.FunctionArgs{
    	Runtime:        pulumi.String("string"),
    	ExclusiveMode:  pulumi.Bool(false),
    	RequestTimeout: pulumi.Int(0),
    	Envs: vefaas.FunctionEnvArray{
    		&vefaas.FunctionEnvArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	Command:        pulumi.String("string"),
    	InitializerSec: pulumi.Int(0),
    	MaxConcurrency: pulumi.Int(0),
    	MemoryMb:       pulumi.Int(0),
    	Name:           pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	NasStorage: &vefaas.FunctionNasStorageArgs{
    		EnableNas: pulumi.Bool(false),
    		NasConfigs: vefaas.FunctionNasStorageNasConfigArray{
    			&vefaas.FunctionNasStorageNasConfigArgs{
    				FileSystemId:   pulumi.String("string"),
    				LocalMountPath: pulumi.String("string"),
    				MountPointId:   pulumi.String("string"),
    				RemotePath:     pulumi.String("string"),
    			},
    		},
    	},
    	Port:        pulumi.Int(0),
    	CpuStrategy: pulumi.String("string"),
    	Source:      pulumi.String("string"),
    	SourceAccessConfig: &vefaas.FunctionSourceAccessConfigArgs{
    		Password: pulumi.Bool(false),
    		Username: pulumi.String("string"),
    	},
    	SourceType: pulumi.String("string"),
    	TlsConfig: &vefaas.FunctionTlsConfigArgs{
    		EnableLog:    pulumi.Bool(false),
    		TlsProjectId: pulumi.String("string"),
    		TlsTopicId:   pulumi.String("string"),
    	},
    	TosMountConfig: &vefaas.FunctionTosMountConfigArgs{
    		EnableTos: pulumi.Bool(false),
    		Credentials: &vefaas.FunctionTosMountConfigCredentialsArgs{
    			AccessKeyId:     pulumi.String("string"),
    			SecretAccessKey: pulumi.String("string"),
    		},
    		MountPoints: vefaas.FunctionTosMountConfigMountPointArray{
    			&vefaas.FunctionTosMountConfigMountPointArgs{
    				BucketName:     pulumi.String("string"),
    				BucketPath:     pulumi.String("string"),
    				Endpoint:       pulumi.String("string"),
    				LocalMountPath: pulumi.String("string"),
    				ReadOnly:       pulumi.Bool(false),
    			},
    		},
    	},
    	VpcConfig: &vefaas.FunctionVpcConfigArgs{
    		EnableVpc:                  pulumi.Bool(false),
    		EnableSharedInternetAccess: pulumi.Bool(false),
    		SecurityGroupIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SubnetIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		VpcId: pulumi.String("string"),
    	},
    })
    
    var functionResource = new Function("functionResource", FunctionArgs.builder()
        .runtime("string")
        .exclusiveMode(false)
        .requestTimeout(0)
        .envs(FunctionEnvArgs.builder()
            .key("string")
            .value("string")
            .build())
        .command("string")
        .initializerSec(0)
        .maxConcurrency(0)
        .memoryMb(0)
        .name("string")
        .description("string")
        .nasStorage(FunctionNasStorageArgs.builder()
            .enableNas(false)
            .nasConfigs(FunctionNasStorageNasConfigArgs.builder()
                .fileSystemId("string")
                .localMountPath("string")
                .mountPointId("string")
                .remotePath("string")
                .build())
            .build())
        .port(0)
        .cpuStrategy("string")
        .source("string")
        .sourceAccessConfig(FunctionSourceAccessConfigArgs.builder()
            .password(false)
            .username("string")
            .build())
        .sourceType("string")
        .tlsConfig(FunctionTlsConfigArgs.builder()
            .enableLog(false)
            .tlsProjectId("string")
            .tlsTopicId("string")
            .build())
        .tosMountConfig(FunctionTosMountConfigArgs.builder()
            .enableTos(false)
            .credentials(FunctionTosMountConfigCredentialsArgs.builder()
                .accessKeyId("string")
                .secretAccessKey("string")
                .build())
            .mountPoints(FunctionTosMountConfigMountPointArgs.builder()
                .bucketName("string")
                .bucketPath("string")
                .endpoint("string")
                .localMountPath("string")
                .readOnly(false)
                .build())
            .build())
        .vpcConfig(FunctionVpcConfigArgs.builder()
            .enableVpc(false)
            .enableSharedInternetAccess(false)
            .securityGroupIds("string")
            .subnetIds("string")
            .vpcId("string")
            .build())
        .build());
    
    function_resource = volcengine.vefaas.Function("functionResource",
        runtime="string",
        exclusive_mode=False,
        request_timeout=0,
        envs=[{
            "key": "string",
            "value": "string",
        }],
        command="string",
        initializer_sec=0,
        max_concurrency=0,
        memory_mb=0,
        name="string",
        description="string",
        nas_storage={
            "enable_nas": False,
            "nas_configs": [{
                "file_system_id": "string",
                "local_mount_path": "string",
                "mount_point_id": "string",
                "remote_path": "string",
            }],
        },
        port=0,
        cpu_strategy="string",
        source="string",
        source_access_config={
            "password": False,
            "username": "string",
        },
        source_type="string",
        tls_config={
            "enable_log": False,
            "tls_project_id": "string",
            "tls_topic_id": "string",
        },
        tos_mount_config={
            "enable_tos": False,
            "credentials": {
                "access_key_id": "string",
                "secret_access_key": "string",
            },
            "mount_points": [{
                "bucket_name": "string",
                "bucket_path": "string",
                "endpoint": "string",
                "local_mount_path": "string",
                "read_only": False,
            }],
        },
        vpc_config={
            "enable_vpc": False,
            "enable_shared_internet_access": False,
            "security_group_ids": ["string"],
            "subnet_ids": ["string"],
            "vpc_id": "string",
        })
    
    const functionResource = new volcengine.vefaas.Function("functionResource", {
        runtime: "string",
        exclusiveMode: false,
        requestTimeout: 0,
        envs: [{
            key: "string",
            value: "string",
        }],
        command: "string",
        initializerSec: 0,
        maxConcurrency: 0,
        memoryMb: 0,
        name: "string",
        description: "string",
        nasStorage: {
            enableNas: false,
            nasConfigs: [{
                fileSystemId: "string",
                localMountPath: "string",
                mountPointId: "string",
                remotePath: "string",
            }],
        },
        port: 0,
        cpuStrategy: "string",
        source: "string",
        sourceAccessConfig: {
            password: false,
            username: "string",
        },
        sourceType: "string",
        tlsConfig: {
            enableLog: false,
            tlsProjectId: "string",
            tlsTopicId: "string",
        },
        tosMountConfig: {
            enableTos: false,
            credentials: {
                accessKeyId: "string",
                secretAccessKey: "string",
            },
            mountPoints: [{
                bucketName: "string",
                bucketPath: "string",
                endpoint: "string",
                localMountPath: "string",
                readOnly: false,
            }],
        },
        vpcConfig: {
            enableVpc: false,
            enableSharedInternetAccess: false,
            securityGroupIds: ["string"],
            subnetIds: ["string"],
            vpcId: "string",
        },
    });
    
    type: volcengine:vefaas:Function
    properties:
        command: string
        cpuStrategy: string
        description: string
        envs:
            - key: string
              value: string
        exclusiveMode: false
        initializerSec: 0
        maxConcurrency: 0
        memoryMb: 0
        name: string
        nasStorage:
            enableNas: false
            nasConfigs:
                - fileSystemId: string
                  localMountPath: string
                  mountPointId: string
                  remotePath: string
        port: 0
        requestTimeout: 0
        runtime: string
        source: string
        sourceAccessConfig:
            password: false
            username: string
        sourceType: string
        tlsConfig:
            enableLog: false
            tlsProjectId: string
            tlsTopicId: string
        tosMountConfig:
            credentials:
                accessKeyId: string
                secretAccessKey: string
            enableTos: false
            mountPoints:
                - bucketName: string
                  bucketPath: string
                  endpoint: string
                  localMountPath: string
                  readOnly: false
        vpcConfig:
            enableSharedInternetAccess: false
            enableVpc: false
            securityGroupIds:
                - string
            subnetIds:
                - string
            vpcId: 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

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

    The Function resource accepts the following input properties:

    Runtime string
    The runtime of Function.
    Command string
    The custom startup command for the instance.
    CpuStrategy string
    Function CPU charging policy.
    Description string
    The description of Function.
    Envs List<FunctionEnv>
    Function environment variable.
    ExclusiveMode bool
    Exclusive mode switch.
    InitializerSec int
    Function to initialize timeout configuration.
    MaxConcurrency int
    Maximum concurrency of a single instance.
    MemoryMb int
    Maximum memory for a single instance.
    Name string
    The name of Function.
    NasStorage FunctionNasStorage
    The configuration of file storage NAS mount.
    Port int
    Custom listening port for the instance.
    RequestTimeout int
    Request timeout (in seconds).
    Source string
    Code source.
    SourceAccessConfig FunctionSourceAccessConfig
    Access configuration for the image repository.
    SourceType string
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    TlsConfig FunctionTlsConfig
    Function log configuration.
    TosMountConfig FunctionTosMountConfig
    The configuration of Object Storage TOS mount.
    VpcConfig FunctionVpcConfig
    The configuration of VPC.
    Runtime string
    The runtime of Function.
    Command string
    The custom startup command for the instance.
    CpuStrategy string
    Function CPU charging policy.
    Description string
    The description of Function.
    Envs []FunctionEnvArgs
    Function environment variable.
    ExclusiveMode bool
    Exclusive mode switch.
    InitializerSec int
    Function to initialize timeout configuration.
    MaxConcurrency int
    Maximum concurrency of a single instance.
    MemoryMb int
    Maximum memory for a single instance.
    Name string
    The name of Function.
    NasStorage FunctionNasStorageArgs
    The configuration of file storage NAS mount.
    Port int
    Custom listening port for the instance.
    RequestTimeout int
    Request timeout (in seconds).
    Source string
    Code source.
    SourceAccessConfig FunctionSourceAccessConfigArgs
    Access configuration for the image repository.
    SourceType string
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    TlsConfig FunctionTlsConfigArgs
    Function log configuration.
    TosMountConfig FunctionTosMountConfigArgs
    The configuration of Object Storage TOS mount.
    VpcConfig FunctionVpcConfigArgs
    The configuration of VPC.
    runtime String
    The runtime of Function.
    command String
    The custom startup command for the instance.
    cpuStrategy String
    Function CPU charging policy.
    description String
    The description of Function.
    envs List<FunctionEnv>
    Function environment variable.
    exclusiveMode Boolean
    Exclusive mode switch.
    initializerSec Integer
    Function to initialize timeout configuration.
    maxConcurrency Integer
    Maximum concurrency of a single instance.
    memoryMb Integer
    Maximum memory for a single instance.
    name String
    The name of Function.
    nasStorage FunctionNasStorage
    The configuration of file storage NAS mount.
    port Integer
    Custom listening port for the instance.
    requestTimeout Integer
    Request timeout (in seconds).
    source String
    Code source.
    sourceAccessConfig FunctionSourceAccessConfig
    Access configuration for the image repository.
    sourceType String
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tlsConfig FunctionTlsConfig
    Function log configuration.
    tosMountConfig FunctionTosMountConfig
    The configuration of Object Storage TOS mount.
    vpcConfig FunctionVpcConfig
    The configuration of VPC.
    runtime string
    The runtime of Function.
    command string
    The custom startup command for the instance.
    cpuStrategy string
    Function CPU charging policy.
    description string
    The description of Function.
    envs FunctionEnv[]
    Function environment variable.
    exclusiveMode boolean
    Exclusive mode switch.
    initializerSec number
    Function to initialize timeout configuration.
    maxConcurrency number
    Maximum concurrency of a single instance.
    memoryMb number
    Maximum memory for a single instance.
    name string
    The name of Function.
    nasStorage FunctionNasStorage
    The configuration of file storage NAS mount.
    port number
    Custom listening port for the instance.
    requestTimeout number
    Request timeout (in seconds).
    source string
    Code source.
    sourceAccessConfig FunctionSourceAccessConfig
    Access configuration for the image repository.
    sourceType string
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tlsConfig FunctionTlsConfig
    Function log configuration.
    tosMountConfig FunctionTosMountConfig
    The configuration of Object Storage TOS mount.
    vpcConfig FunctionVpcConfig
    The configuration of VPC.
    runtime str
    The runtime of Function.
    command str
    The custom startup command for the instance.
    cpu_strategy str
    Function CPU charging policy.
    description str
    The description of Function.
    envs Sequence[FunctionEnvArgs]
    Function environment variable.
    exclusive_mode bool
    Exclusive mode switch.
    initializer_sec int
    Function to initialize timeout configuration.
    max_concurrency int
    Maximum concurrency of a single instance.
    memory_mb int
    Maximum memory for a single instance.
    name str
    The name of Function.
    nas_storage FunctionNasStorageArgs
    The configuration of file storage NAS mount.
    port int
    Custom listening port for the instance.
    request_timeout int
    Request timeout (in seconds).
    source str
    Code source.
    source_access_config FunctionSourceAccessConfigArgs
    Access configuration for the image repository.
    source_type str
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tls_config FunctionTlsConfigArgs
    Function log configuration.
    tos_mount_config FunctionTosMountConfigArgs
    The configuration of Object Storage TOS mount.
    vpc_config FunctionVpcConfigArgs
    The configuration of VPC.
    runtime String
    The runtime of Function.
    command String
    The custom startup command for the instance.
    cpuStrategy String
    Function CPU charging policy.
    description String
    The description of Function.
    envs List<Property Map>
    Function environment variable.
    exclusiveMode Boolean
    Exclusive mode switch.
    initializerSec Number
    Function to initialize timeout configuration.
    maxConcurrency Number
    Maximum concurrency of a single instance.
    memoryMb Number
    Maximum memory for a single instance.
    name String
    The name of Function.
    nasStorage Property Map
    The configuration of file storage NAS mount.
    port Number
    Custom listening port for the instance.
    requestTimeout Number
    Request timeout (in seconds).
    source String
    Code source.
    sourceAccessConfig Property Map
    Access configuration for the image repository.
    sourceType String
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tlsConfig Property Map
    Function log configuration.
    tosMountConfig Property Map
    The configuration of Object Storage TOS mount.
    vpcConfig Property Map
    The configuration of VPC.

    Outputs

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

    CodeSize int
    The size of code package.
    CodeSizeLimit int
    Maximum code package size.
    CreationTime string
    The creation time of the function.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    The last update time of the function.
    Owner string
    The owner of Function.
    SourceLocation string
    Maximum code package size.
    TriggersCount int
    The number of triggers for this Function.
    CodeSize int
    The size of code package.
    CodeSizeLimit int
    Maximum code package size.
    CreationTime string
    The creation time of the function.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    The last update time of the function.
    Owner string
    The owner of Function.
    SourceLocation string
    Maximum code package size.
    TriggersCount int
    The number of triggers for this Function.
    codeSize Integer
    The size of code package.
    codeSizeLimit Integer
    Maximum code package size.
    creationTime String
    The creation time of the function.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    The last update time of the function.
    owner String
    The owner of Function.
    sourceLocation String
    Maximum code package size.
    triggersCount Integer
    The number of triggers for this Function.
    codeSize number
    The size of code package.
    codeSizeLimit number
    Maximum code package size.
    creationTime string
    The creation time of the function.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime string
    The last update time of the function.
    owner string
    The owner of Function.
    sourceLocation string
    Maximum code package size.
    triggersCount number
    The number of triggers for this Function.
    code_size int
    The size of code package.
    code_size_limit int
    Maximum code package size.
    creation_time str
    The creation time of the function.
    id str
    The provider-assigned unique ID for this managed resource.
    last_update_time str
    The last update time of the function.
    owner str
    The owner of Function.
    source_location str
    Maximum code package size.
    triggers_count int
    The number of triggers for this Function.
    codeSize Number
    The size of code package.
    codeSizeLimit Number
    Maximum code package size.
    creationTime String
    The creation time of the function.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    The last update time of the function.
    owner String
    The owner of Function.
    sourceLocation String
    Maximum code package size.
    triggersCount Number
    The number of triggers for this Function.

    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,
            code_size: Optional[int] = None,
            code_size_limit: Optional[int] = None,
            command: Optional[str] = None,
            cpu_strategy: Optional[str] = None,
            creation_time: Optional[str] = None,
            description: Optional[str] = None,
            envs: Optional[Sequence[FunctionEnvArgs]] = None,
            exclusive_mode: Optional[bool] = None,
            initializer_sec: Optional[int] = None,
            last_update_time: Optional[str] = None,
            max_concurrency: Optional[int] = None,
            memory_mb: Optional[int] = None,
            name: Optional[str] = None,
            nas_storage: Optional[FunctionNasStorageArgs] = None,
            owner: Optional[str] = None,
            port: Optional[int] = None,
            request_timeout: Optional[int] = None,
            runtime: Optional[str] = None,
            source: Optional[str] = None,
            source_access_config: Optional[FunctionSourceAccessConfigArgs] = None,
            source_location: Optional[str] = None,
            source_type: Optional[str] = None,
            tls_config: Optional[FunctionTlsConfigArgs] = None,
            tos_mount_config: Optional[FunctionTosMountConfigArgs] = None,
            triggers_count: Optional[int] = None,
            vpc_config: Optional[FunctionVpcConfigArgs] = 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)
    resources:  _:    type: volcengine:vefaas:Function    get:      id: ${id}
    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.
    The following state arguments are supported:
    CodeSize int
    The size of code package.
    CodeSizeLimit int
    Maximum code package size.
    Command string
    The custom startup command for the instance.
    CpuStrategy string
    Function CPU charging policy.
    CreationTime string
    The creation time of the function.
    Description string
    The description of Function.
    Envs List<FunctionEnv>
    Function environment variable.
    ExclusiveMode bool
    Exclusive mode switch.
    InitializerSec int
    Function to initialize timeout configuration.
    LastUpdateTime string
    The last update time of the function.
    MaxConcurrency int
    Maximum concurrency of a single instance.
    MemoryMb int
    Maximum memory for a single instance.
    Name string
    The name of Function.
    NasStorage FunctionNasStorage
    The configuration of file storage NAS mount.
    Owner string
    The owner of Function.
    Port int
    Custom listening port for the instance.
    RequestTimeout int
    Request timeout (in seconds).
    Runtime string
    The runtime of Function.
    Source string
    Code source.
    SourceAccessConfig FunctionSourceAccessConfig
    Access configuration for the image repository.
    SourceLocation string
    Maximum code package size.
    SourceType string
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    TlsConfig FunctionTlsConfig
    Function log configuration.
    TosMountConfig FunctionTosMountConfig
    The configuration of Object Storage TOS mount.
    TriggersCount int
    The number of triggers for this Function.
    VpcConfig FunctionVpcConfig
    The configuration of VPC.
    CodeSize int
    The size of code package.
    CodeSizeLimit int
    Maximum code package size.
    Command string
    The custom startup command for the instance.
    CpuStrategy string
    Function CPU charging policy.
    CreationTime string
    The creation time of the function.
    Description string
    The description of Function.
    Envs []FunctionEnvArgs
    Function environment variable.
    ExclusiveMode bool
    Exclusive mode switch.
    InitializerSec int
    Function to initialize timeout configuration.
    LastUpdateTime string
    The last update time of the function.
    MaxConcurrency int
    Maximum concurrency of a single instance.
    MemoryMb int
    Maximum memory for a single instance.
    Name string
    The name of Function.
    NasStorage FunctionNasStorageArgs
    The configuration of file storage NAS mount.
    Owner string
    The owner of Function.
    Port int
    Custom listening port for the instance.
    RequestTimeout int
    Request timeout (in seconds).
    Runtime string
    The runtime of Function.
    Source string
    Code source.
    SourceAccessConfig FunctionSourceAccessConfigArgs
    Access configuration for the image repository.
    SourceLocation string
    Maximum code package size.
    SourceType string
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    TlsConfig FunctionTlsConfigArgs
    Function log configuration.
    TosMountConfig FunctionTosMountConfigArgs
    The configuration of Object Storage TOS mount.
    TriggersCount int
    The number of triggers for this Function.
    VpcConfig FunctionVpcConfigArgs
    The configuration of VPC.
    codeSize Integer
    The size of code package.
    codeSizeLimit Integer
    Maximum code package size.
    command String
    The custom startup command for the instance.
    cpuStrategy String
    Function CPU charging policy.
    creationTime String
    The creation time of the function.
    description String
    The description of Function.
    envs List<FunctionEnv>
    Function environment variable.
    exclusiveMode Boolean
    Exclusive mode switch.
    initializerSec Integer
    Function to initialize timeout configuration.
    lastUpdateTime String
    The last update time of the function.
    maxConcurrency Integer
    Maximum concurrency of a single instance.
    memoryMb Integer
    Maximum memory for a single instance.
    name String
    The name of Function.
    nasStorage FunctionNasStorage
    The configuration of file storage NAS mount.
    owner String
    The owner of Function.
    port Integer
    Custom listening port for the instance.
    requestTimeout Integer
    Request timeout (in seconds).
    runtime String
    The runtime of Function.
    source String
    Code source.
    sourceAccessConfig FunctionSourceAccessConfig
    Access configuration for the image repository.
    sourceLocation String
    Maximum code package size.
    sourceType String
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tlsConfig FunctionTlsConfig
    Function log configuration.
    tosMountConfig FunctionTosMountConfig
    The configuration of Object Storage TOS mount.
    triggersCount Integer
    The number of triggers for this Function.
    vpcConfig FunctionVpcConfig
    The configuration of VPC.
    codeSize number
    The size of code package.
    codeSizeLimit number
    Maximum code package size.
    command string
    The custom startup command for the instance.
    cpuStrategy string
    Function CPU charging policy.
    creationTime string
    The creation time of the function.
    description string
    The description of Function.
    envs FunctionEnv[]
    Function environment variable.
    exclusiveMode boolean
    Exclusive mode switch.
    initializerSec number
    Function to initialize timeout configuration.
    lastUpdateTime string
    The last update time of the function.
    maxConcurrency number
    Maximum concurrency of a single instance.
    memoryMb number
    Maximum memory for a single instance.
    name string
    The name of Function.
    nasStorage FunctionNasStorage
    The configuration of file storage NAS mount.
    owner string
    The owner of Function.
    port number
    Custom listening port for the instance.
    requestTimeout number
    Request timeout (in seconds).
    runtime string
    The runtime of Function.
    source string
    Code source.
    sourceAccessConfig FunctionSourceAccessConfig
    Access configuration for the image repository.
    sourceLocation string
    Maximum code package size.
    sourceType string
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tlsConfig FunctionTlsConfig
    Function log configuration.
    tosMountConfig FunctionTosMountConfig
    The configuration of Object Storage TOS mount.
    triggersCount number
    The number of triggers for this Function.
    vpcConfig FunctionVpcConfig
    The configuration of VPC.
    code_size int
    The size of code package.
    code_size_limit int
    Maximum code package size.
    command str
    The custom startup command for the instance.
    cpu_strategy str
    Function CPU charging policy.
    creation_time str
    The creation time of the function.
    description str
    The description of Function.
    envs Sequence[FunctionEnvArgs]
    Function environment variable.
    exclusive_mode bool
    Exclusive mode switch.
    initializer_sec int
    Function to initialize timeout configuration.
    last_update_time str
    The last update time of the function.
    max_concurrency int
    Maximum concurrency of a single instance.
    memory_mb int
    Maximum memory for a single instance.
    name str
    The name of Function.
    nas_storage FunctionNasStorageArgs
    The configuration of file storage NAS mount.
    owner str
    The owner of Function.
    port int
    Custom listening port for the instance.
    request_timeout int
    Request timeout (in seconds).
    runtime str
    The runtime of Function.
    source str
    Code source.
    source_access_config FunctionSourceAccessConfigArgs
    Access configuration for the image repository.
    source_location str
    Maximum code package size.
    source_type str
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tls_config FunctionTlsConfigArgs
    Function log configuration.
    tos_mount_config FunctionTosMountConfigArgs
    The configuration of Object Storage TOS mount.
    triggers_count int
    The number of triggers for this Function.
    vpc_config FunctionVpcConfigArgs
    The configuration of VPC.
    codeSize Number
    The size of code package.
    codeSizeLimit Number
    Maximum code package size.
    command String
    The custom startup command for the instance.
    cpuStrategy String
    Function CPU charging policy.
    creationTime String
    The creation time of the function.
    description String
    The description of Function.
    envs List<Property Map>
    Function environment variable.
    exclusiveMode Boolean
    Exclusive mode switch.
    initializerSec Number
    Function to initialize timeout configuration.
    lastUpdateTime String
    The last update time of the function.
    maxConcurrency Number
    Maximum concurrency of a single instance.
    memoryMb Number
    Maximum memory for a single instance.
    name String
    The name of Function.
    nasStorage Property Map
    The configuration of file storage NAS mount.
    owner String
    The owner of Function.
    port Number
    Custom listening port for the instance.
    requestTimeout Number
    Request timeout (in seconds).
    runtime String
    The runtime of Function.
    source String
    Code source.
    sourceAccessConfig Property Map
    Access configuration for the image repository.
    sourceLocation String
    Maximum code package size.
    sourceType String
    Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
    tlsConfig Property Map
    Function log configuration.
    tosMountConfig Property Map
    The configuration of Object Storage TOS mount.
    triggersCount Number
    The number of triggers for this Function.
    vpcConfig Property Map
    The configuration of VPC.

    Supporting Types

    FunctionEnv, FunctionEnvArgs

    Key string
    The Key of the environment variable.
    Value string
    The Value of the environment variable.
    Key string
    The Key of the environment variable.
    Value string
    The Value of the environment variable.
    key String
    The Key of the environment variable.
    value String
    The Value of the environment variable.
    key string
    The Key of the environment variable.
    value string
    The Value of the environment variable.
    key str
    The Key of the environment variable.
    value str
    The Value of the environment variable.
    key String
    The Key of the environment variable.
    value String
    The Value of the environment variable.

    FunctionNasStorage, FunctionNasStorageArgs

    EnableNas bool
    Whether to enable NAS storage mounting.
    NasConfigs List<FunctionNasStorageNasConfig>
    The configuration of NAS.
    EnableNas bool
    Whether to enable NAS storage mounting.
    NasConfigs []FunctionNasStorageNasConfig
    The configuration of NAS.
    enableNas Boolean
    Whether to enable NAS storage mounting.
    nasConfigs List<FunctionNasStorageNasConfig>
    The configuration of NAS.
    enableNas boolean
    Whether to enable NAS storage mounting.
    nasConfigs FunctionNasStorageNasConfig[]
    The configuration of NAS.
    enable_nas bool
    Whether to enable NAS storage mounting.
    nas_configs Sequence[FunctionNasStorageNasConfig]
    The configuration of NAS.
    enableNas Boolean
    Whether to enable NAS storage mounting.
    nasConfigs List<Property Map>
    The configuration of NAS.

    FunctionNasStorageNasConfig, FunctionNasStorageNasConfigArgs

    FileSystemId string
    The ID of NAS file system.
    LocalMountPath string
    The directory of Function local mount.
    MountPointId string
    The ID of NAS mount point.
    RemotePath string
    Remote directory of the file system.
    FileSystemId string
    The ID of NAS file system.
    LocalMountPath string
    The directory of Function local mount.
    MountPointId string
    The ID of NAS mount point.
    RemotePath string
    Remote directory of the file system.
    fileSystemId String
    The ID of NAS file system.
    localMountPath String
    The directory of Function local mount.
    mountPointId String
    The ID of NAS mount point.
    remotePath String
    Remote directory of the file system.
    fileSystemId string
    The ID of NAS file system.
    localMountPath string
    The directory of Function local mount.
    mountPointId string
    The ID of NAS mount point.
    remotePath string
    Remote directory of the file system.
    file_system_id str
    The ID of NAS file system.
    local_mount_path str
    The directory of Function local mount.
    mount_point_id str
    The ID of NAS mount point.
    remote_path str
    Remote directory of the file system.
    fileSystemId String
    The ID of NAS file system.
    localMountPath String
    The directory of Function local mount.
    mountPointId String
    The ID of NAS mount point.
    remotePath String
    Remote directory of the file system.

    FunctionSourceAccessConfig, FunctionSourceAccessConfigArgs

    Password bool
    The image repository password.
    Username string
    Mirror repository username.
    Password bool
    The image repository password.
    Username string
    Mirror repository username.
    password Boolean
    The image repository password.
    username String
    Mirror repository username.
    password boolean
    The image repository password.
    username string
    Mirror repository username.
    password bool
    The image repository password.
    username str
    Mirror repository username.
    password Boolean
    The image repository password.
    username String
    Mirror repository username.

    FunctionTlsConfig, FunctionTlsConfigArgs

    EnableLog bool
    TLS log function switch.
    TlsProjectId string
    The project ID of TLS log topic.
    TlsTopicId string
    The topic ID of TLS log topic.
    EnableLog bool
    TLS log function switch.
    TlsProjectId string
    The project ID of TLS log topic.
    TlsTopicId string
    The topic ID of TLS log topic.
    enableLog Boolean
    TLS log function switch.
    tlsProjectId String
    The project ID of TLS log topic.
    tlsTopicId String
    The topic ID of TLS log topic.
    enableLog boolean
    TLS log function switch.
    tlsProjectId string
    The project ID of TLS log topic.
    tlsTopicId string
    The topic ID of TLS log topic.
    enable_log bool
    TLS log function switch.
    tls_project_id str
    The project ID of TLS log topic.
    tls_topic_id str
    The topic ID of TLS log topic.
    enableLog Boolean
    TLS log function switch.
    tlsProjectId String
    The project ID of TLS log topic.
    tlsTopicId String
    The topic ID of TLS log topic.

    FunctionTosMountConfig, FunctionTosMountConfigArgs

    EnableTos bool
    Whether to enable TOS storage mounting.
    Credentials FunctionTosMountConfigCredentials
    After enabling TOS, you need to provide an AKSK with access rights to the TOS domain name. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    MountPoints List<FunctionTosMountConfigMountPoint>
    After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
    EnableTos bool
    Whether to enable TOS storage mounting.
    Credentials FunctionTosMountConfigCredentials
    After enabling TOS, you need to provide an AKSK with access rights to the TOS domain name. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    MountPoints []FunctionTosMountConfigMountPoint
    After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
    enableTos Boolean
    Whether to enable TOS storage mounting.
    credentials FunctionTosMountConfigCredentials
    After enabling TOS, you need to provide an AKSK with access rights to the TOS domain name. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    mountPoints List<FunctionTosMountConfigMountPoint>
    After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
    enableTos boolean
    Whether to enable TOS storage mounting.
    credentials FunctionTosMountConfigCredentials
    After enabling TOS, you need to provide an AKSK with access rights to the TOS domain name. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    mountPoints FunctionTosMountConfigMountPoint[]
    After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
    enable_tos bool
    Whether to enable TOS storage mounting.
    credentials FunctionTosMountConfigCredentials
    After enabling TOS, you need to provide an AKSK with access rights to the TOS domain name. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    mount_points Sequence[FunctionTosMountConfigMountPoint]
    After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
    enableTos Boolean
    Whether to enable TOS storage mounting.
    credentials Property Map
    After enabling TOS, you need to provide an AKSK with access rights to the TOS domain name. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    mountPoints List<Property Map>
    After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.

    FunctionTosMountConfigCredentials, FunctionTosMountConfigCredentialsArgs

    AccessKeyId string
    The AccessKey ID (AK) of the Volcano Engine account.
    SecretAccessKey string
    The Secret Access Key (SK) of the Volcano Engine account.
    AccessKeyId string
    The AccessKey ID (AK) of the Volcano Engine account.
    SecretAccessKey string
    The Secret Access Key (SK) of the Volcano Engine account.
    accessKeyId String
    The AccessKey ID (AK) of the Volcano Engine account.
    secretAccessKey String
    The Secret Access Key (SK) of the Volcano Engine account.
    accessKeyId string
    The AccessKey ID (AK) of the Volcano Engine account.
    secretAccessKey string
    The Secret Access Key (SK) of the Volcano Engine account.
    access_key_id str
    The AccessKey ID (AK) of the Volcano Engine account.
    secret_access_key str
    The Secret Access Key (SK) of the Volcano Engine account.
    accessKeyId String
    The AccessKey ID (AK) of the Volcano Engine account.
    secretAccessKey String
    The Secret Access Key (SK) of the Volcano Engine account.

    FunctionTosMountConfigMountPoint, FunctionTosMountConfigMountPointArgs

    BucketName string
    TOS bucket.
    BucketPath string
    The mounted TOS Bucket path.
    Endpoint string
    TOS Access domain name.
    LocalMountPath string
    Function local mount directory.
    ReadOnly bool
    Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.
    BucketName string
    TOS bucket.
    BucketPath string
    The mounted TOS Bucket path.
    Endpoint string
    TOS Access domain name.
    LocalMountPath string
    Function local mount directory.
    ReadOnly bool
    Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.
    bucketName String
    TOS bucket.
    bucketPath String
    The mounted TOS Bucket path.
    endpoint String
    TOS Access domain name.
    localMountPath String
    Function local mount directory.
    readOnly Boolean
    Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.
    bucketName string
    TOS bucket.
    bucketPath string
    The mounted TOS Bucket path.
    endpoint string
    TOS Access domain name.
    localMountPath string
    Function local mount directory.
    readOnly boolean
    Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.
    bucket_name str
    TOS bucket.
    bucket_path str
    The mounted TOS Bucket path.
    endpoint str
    TOS Access domain name.
    local_mount_path str
    Function local mount directory.
    read_only bool
    Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.
    bucketName String
    TOS bucket.
    bucketPath String
    The mounted TOS Bucket path.
    endpoint String
    TOS Access domain name.
    localMountPath String
    Function local mount directory.
    readOnly Boolean
    Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.

    FunctionVpcConfig, FunctionVpcConfigArgs

    EnableVpc bool
    Whether the function enables private network access.
    EnableSharedInternetAccess bool
    Function access to the public network switch.
    SecurityGroupIds List<string>
    The ID of security group.
    SubnetIds List<string>
    The ID of subnet.
    VpcId string
    The ID of VPC.
    EnableVpc bool
    Whether the function enables private network access.
    EnableSharedInternetAccess bool
    Function access to the public network switch.
    SecurityGroupIds []string
    The ID of security group.
    SubnetIds []string
    The ID of subnet.
    VpcId string
    The ID of VPC.
    enableVpc Boolean
    Whether the function enables private network access.
    enableSharedInternetAccess Boolean
    Function access to the public network switch.
    securityGroupIds List<String>
    The ID of security group.
    subnetIds List<String>
    The ID of subnet.
    vpcId String
    The ID of VPC.
    enableVpc boolean
    Whether the function enables private network access.
    enableSharedInternetAccess boolean
    Function access to the public network switch.
    securityGroupIds string[]
    The ID of security group.
    subnetIds string[]
    The ID of subnet.
    vpcId string
    The ID of VPC.
    enable_vpc bool
    Whether the function enables private network access.
    enable_shared_internet_access bool
    Function access to the public network switch.
    security_group_ids Sequence[str]
    The ID of security group.
    subnet_ids Sequence[str]
    The ID of subnet.
    vpc_id str
    The ID of VPC.
    enableVpc Boolean
    Whether the function enables private network access.
    enableSharedInternetAccess Boolean
    Function access to the public network switch.
    securityGroupIds List<String>
    The ID of security group.
    subnetIds List<String>
    The ID of subnet.
    vpcId String
    The ID of VPC.

    Import

    VefaasFunction can be imported using the id, e.g.

    $ pulumi import volcengine:vefaas/function:Function default resource_id
    

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine