volcengine.vefaas.Function
Explore with Pulumi AI
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.
- Cpu
Strategy string - Function CPU charging policy.
- Description string
- The description of Function.
- Envs
List<Function
Env> - 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 string
- The name of Function.
- Nas
Storage FunctionNas Storage - The configuration of file storage NAS mount.
- Port int
- Custom listening port for the instance.
- Request
Timeout int - Request timeout (in seconds).
- Source string
- Code source.
- Source
Access FunctionConfig Source Access Config - Access configuration for the image repository.
- Source
Type string - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- Tls
Config FunctionTls Config - Function log configuration.
- Tos
Mount FunctionConfig Tos Mount Config - The configuration of Object Storage TOS mount.
- Vpc
Config FunctionVpc Config - The configuration of VPC.
- Runtime string
- The runtime of Function.
- Command string
- The custom startup command for the instance.
- Cpu
Strategy string - Function CPU charging policy.
- Description string
- The description of Function.
- Envs
[]Function
Env Args - 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 string
- The name of Function.
- Nas
Storage FunctionNas Storage Args - The configuration of file storage NAS mount.
- Port int
- Custom listening port for the instance.
- Request
Timeout int - Request timeout (in seconds).
- Source string
- Code source.
- Source
Access FunctionConfig Source Access Config Args - Access configuration for the image repository.
- Source
Type string - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- Tls
Config FunctionTls Config Args - Function log configuration.
- Tos
Mount FunctionConfig Tos Mount Config Args - The configuration of Object Storage TOS mount.
- Vpc
Config FunctionVpc Config Args - The configuration of VPC.
- runtime String
- The runtime of Function.
- command String
- The custom startup command for the instance.
- cpu
Strategy String - Function CPU charging policy.
- description String
- The description of Function.
- envs
List<Function
Env> - Function environment variable.
- exclusive
Mode Boolean - Exclusive mode switch.
- initializer
Sec Integer - Function to initialize timeout configuration.
- max
Concurrency Integer - Maximum concurrency of a single instance.
- memory
Mb Integer - Maximum memory for a single instance.
- name String
- The name of Function.
- nas
Storage FunctionNas Storage - The configuration of file storage NAS mount.
- port Integer
- Custom listening port for the instance.
- request
Timeout Integer - Request timeout (in seconds).
- source String
- Code source.
- source
Access FunctionConfig Source Access Config - Access configuration for the image repository.
- source
Type String - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- tls
Config FunctionTls Config - Function log configuration.
- tos
Mount FunctionConfig Tos Mount Config - The configuration of Object Storage TOS mount.
- vpc
Config FunctionVpc Config - The configuration of VPC.
- runtime string
- The runtime of Function.
- command string
- The custom startup command for the instance.
- cpu
Strategy string - Function CPU charging policy.
- description string
- The description of Function.
- envs
Function
Env[] - Function environment variable.
- exclusive
Mode boolean - Exclusive mode switch.
- initializer
Sec number - Function to initialize timeout configuration.
- max
Concurrency number - Maximum concurrency of a single instance.
- memory
Mb number - Maximum memory for a single instance.
- name string
- The name of Function.
- nas
Storage FunctionNas Storage - The configuration of file storage NAS mount.
- port number
- Custom listening port for the instance.
- request
Timeout number - Request timeout (in seconds).
- source string
- Code source.
- source
Access FunctionConfig Source Access Config - Access configuration for the image repository.
- source
Type string - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- tls
Config FunctionTls Config - Function log configuration.
- tos
Mount FunctionConfig Tos Mount Config - The configuration of Object Storage TOS mount.
- vpc
Config FunctionVpc Config - 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[Function
Env Args] - 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 FunctionNas Storage Args - 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_ Functionconfig Source Access Config Args - 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 FunctionTls Config Args - Function log configuration.
- tos_
mount_ Functionconfig Tos Mount Config Args - The configuration of Object Storage TOS mount.
- vpc_
config FunctionVpc Config Args - The configuration of VPC.
- runtime String
- The runtime of Function.
- command String
- The custom startup command for the instance.
- cpu
Strategy String - Function CPU charging policy.
- description String
- The description of Function.
- envs List<Property Map>
- Function environment variable.
- exclusive
Mode Boolean - Exclusive mode switch.
- initializer
Sec Number - Function to initialize timeout configuration.
- max
Concurrency Number - Maximum concurrency of a single instance.
- memory
Mb Number - Maximum memory for a single instance.
- name String
- The name of Function.
- nas
Storage Property Map - The configuration of file storage NAS mount.
- port Number
- Custom listening port for the instance.
- request
Timeout Number - Request timeout (in seconds).
- source String
- Code source.
- source
Access Property MapConfig - Access configuration for the image repository.
- source
Type String - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- tls
Config Property Map - Function log configuration.
- tos
Mount Property MapConfig - The configuration of Object Storage TOS mount.
- vpc
Config 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:
- Code
Size int - The size of code package.
- Code
Size intLimit - Maximum code package size.
- Creation
Time string - The creation time of the function.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Update stringTime - The last update time of the function.
- Owner string
- The owner of Function.
- Source
Location string - Maximum code package size.
- Triggers
Count int - The number of triggers for this Function.
- Code
Size int - The size of code package.
- Code
Size intLimit - Maximum code package size.
- Creation
Time string - The creation time of the function.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Update stringTime - The last update time of the function.
- Owner string
- The owner of Function.
- Source
Location string - Maximum code package size.
- Triggers
Count int - The number of triggers for this Function.
- code
Size Integer - The size of code package.
- code
Size IntegerLimit - Maximum code package size.
- creation
Time String - The creation time of the function.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Update StringTime - The last update time of the function.
- owner String
- The owner of Function.
- source
Location String - Maximum code package size.
- triggers
Count Integer - The number of triggers for this Function.
- code
Size number - The size of code package.
- code
Size numberLimit - Maximum code package size.
- creation
Time string - The creation time of the function.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Update stringTime - The last update time of the function.
- owner string
- The owner of Function.
- source
Location string - Maximum code package size.
- triggers
Count number - The number of triggers for this Function.
- code_
size int - The size of code package.
- code_
size_ intlimit - 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_ strtime - 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.
- code
Size Number - The size of code package.
- code
Size NumberLimit - Maximum code package size.
- creation
Time String - The creation time of the function.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Update StringTime - The last update time of the function.
- owner String
- The owner of Function.
- source
Location String - Maximum code package size.
- triggers
Count 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.
- Code
Size int - The size of code package.
- Code
Size intLimit - Maximum code package size.
- Command string
- The custom startup command for the instance.
- Cpu
Strategy string - Function CPU charging policy.
- Creation
Time string - The creation time of the function.
- Description string
- The description of Function.
- Envs
List<Function
Env> - Function environment variable.
- Exclusive
Mode bool - Exclusive mode switch.
- Initializer
Sec int - Function to initialize timeout configuration.
- Last
Update stringTime - 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 string
- The name of Function.
- Nas
Storage FunctionNas Storage - The configuration of file storage NAS mount.
- Owner string
- The owner of Function.
- Port int
- Custom listening port for the instance.
- Request
Timeout int - Request timeout (in seconds).
- Runtime string
- The runtime of Function.
- Source string
- Code source.
- Source
Access FunctionConfig Source Access Config - Access configuration for the image repository.
- Source
Location string - Maximum code package size.
- Source
Type string - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- Tls
Config FunctionTls Config - Function log configuration.
- Tos
Mount FunctionConfig Tos Mount Config - The configuration of Object Storage TOS mount.
- Triggers
Count int - The number of triggers for this Function.
- Vpc
Config FunctionVpc Config - The configuration of VPC.
- Code
Size int - The size of code package.
- Code
Size intLimit - Maximum code package size.
- Command string
- The custom startup command for the instance.
- Cpu
Strategy string - Function CPU charging policy.
- Creation
Time string - The creation time of the function.
- Description string
- The description of Function.
- Envs
[]Function
Env Args - Function environment variable.
- Exclusive
Mode bool - Exclusive mode switch.
- Initializer
Sec int - Function to initialize timeout configuration.
- Last
Update stringTime - 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 string
- The name of Function.
- Nas
Storage FunctionNas Storage Args - The configuration of file storage NAS mount.
- Owner string
- The owner of Function.
- Port int
- Custom listening port for the instance.
- Request
Timeout int - Request timeout (in seconds).
- Runtime string
- The runtime of Function.
- Source string
- Code source.
- Source
Access FunctionConfig Source Access Config Args - Access configuration for the image repository.
- Source
Location string - Maximum code package size.
- Source
Type string - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- Tls
Config FunctionTls Config Args - Function log configuration.
- Tos
Mount FunctionConfig Tos Mount Config Args - The configuration of Object Storage TOS mount.
- Triggers
Count int - The number of triggers for this Function.
- Vpc
Config FunctionVpc Config Args - The configuration of VPC.
- code
Size Integer - The size of code package.
- code
Size IntegerLimit - Maximum code package size.
- command String
- The custom startup command for the instance.
- cpu
Strategy String - Function CPU charging policy.
- creation
Time String - The creation time of the function.
- description String
- The description of Function.
- envs
List<Function
Env> - Function environment variable.
- exclusive
Mode Boolean - Exclusive mode switch.
- initializer
Sec Integer - Function to initialize timeout configuration.
- last
Update StringTime - The last update time of the function.
- max
Concurrency Integer - Maximum concurrency of a single instance.
- memory
Mb Integer - Maximum memory for a single instance.
- name String
- The name of Function.
- nas
Storage FunctionNas Storage - The configuration of file storage NAS mount.
- owner String
- The owner of Function.
- port Integer
- Custom listening port for the instance.
- request
Timeout Integer - Request timeout (in seconds).
- runtime String
- The runtime of Function.
- source String
- Code source.
- source
Access FunctionConfig Source Access Config - Access configuration for the image repository.
- source
Location String - Maximum code package size.
- source
Type String - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- tls
Config FunctionTls Config - Function log configuration.
- tos
Mount FunctionConfig Tos Mount Config - The configuration of Object Storage TOS mount.
- triggers
Count Integer - The number of triggers for this Function.
- vpc
Config FunctionVpc Config - The configuration of VPC.
- code
Size number - The size of code package.
- code
Size numberLimit - Maximum code package size.
- command string
- The custom startup command for the instance.
- cpu
Strategy string - Function CPU charging policy.
- creation
Time string - The creation time of the function.
- description string
- The description of Function.
- envs
Function
Env[] - Function environment variable.
- exclusive
Mode boolean - Exclusive mode switch.
- initializer
Sec number - Function to initialize timeout configuration.
- last
Update stringTime - The last update time of the function.
- max
Concurrency number - Maximum concurrency of a single instance.
- memory
Mb number - Maximum memory for a single instance.
- name string
- The name of Function.
- nas
Storage FunctionNas Storage - The configuration of file storage NAS mount.
- owner string
- The owner of Function.
- port number
- Custom listening port for the instance.
- request
Timeout number - Request timeout (in seconds).
- runtime string
- The runtime of Function.
- source string
- Code source.
- source
Access FunctionConfig Source Access Config - Access configuration for the image repository.
- source
Location string - Maximum code package size.
- source
Type string - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- tls
Config FunctionTls Config - Function log configuration.
- tos
Mount FunctionConfig Tos Mount Config - The configuration of Object Storage TOS mount.
- triggers
Count number - The number of triggers for this Function.
- vpc
Config FunctionVpc Config - The configuration of VPC.
- code_
size int - The size of code package.
- code_
size_ intlimit - 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[Function
Env Args] - Function environment variable.
- exclusive_
mode bool - Exclusive mode switch.
- initializer_
sec int - Function to initialize timeout configuration.
- last_
update_ strtime - 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 FunctionNas Storage Args - 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_ Functionconfig Source Access Config Args - 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 FunctionTls Config Args - Function log configuration.
- tos_
mount_ Functionconfig Tos Mount Config Args - The configuration of Object Storage TOS mount.
- triggers_
count int - The number of triggers for this Function.
- vpc_
config FunctionVpc Config Args - The configuration of VPC.
- code
Size Number - The size of code package.
- code
Size NumberLimit - Maximum code package size.
- command String
- The custom startup command for the instance.
- cpu
Strategy String - Function CPU charging policy.
- creation
Time String - The creation time of the function.
- description String
- The description of Function.
- envs List<Property Map>
- Function environment variable.
- exclusive
Mode Boolean - Exclusive mode switch.
- initializer
Sec Number - Function to initialize timeout configuration.
- last
Update StringTime - The last update time of the function.
- max
Concurrency Number - Maximum concurrency of a single instance.
- memory
Mb Number - Maximum memory for a single instance.
- name String
- The name of Function.
- nas
Storage Property Map - The configuration of file storage NAS mount.
- owner String
- The owner of Function.
- port Number
- Custom listening port for the instance.
- request
Timeout Number - Request timeout (in seconds).
- runtime String
- The runtime of Function.
- source String
- Code source.
- source
Access Property MapConfig - Access configuration for the image repository.
- source
Location String - Maximum code package size.
- source
Type String - Code Source type, supports tos, zip, image (whitelist accounts support native/v1 custom images).
- tls
Config Property Map - Function log configuration.
- tos
Mount Property MapConfig - The configuration of Object Storage TOS mount.
- triggers
Count Number - The number of triggers for this Function.
- vpc
Config Property Map - The configuration of VPC.
Supporting Types
FunctionEnv, FunctionEnvArgs
FunctionNasStorage, FunctionNasStorageArgs
- Enable
Nas bool - Whether to enable NAS storage mounting.
- Nas
Configs List<FunctionNas Storage Nas Config> - The configuration of NAS.
- Enable
Nas bool - Whether to enable NAS storage mounting.
- Nas
Configs []FunctionNas Storage Nas Config - The configuration of NAS.
- enable
Nas Boolean - Whether to enable NAS storage mounting.
- nas
Configs List<FunctionNas Storage Nas Config> - The configuration of NAS.
- enable
Nas boolean - Whether to enable NAS storage mounting.
- nas
Configs FunctionNas Storage Nas Config[] - The configuration of NAS.
- enable_
nas bool - Whether to enable NAS storage mounting.
- nas_
configs Sequence[FunctionNas Storage Nas Config] - The configuration of NAS.
- enable
Nas Boolean - Whether to enable NAS storage mounting.
- nas
Configs List<Property Map> - The configuration of NAS.
FunctionNasStorageNasConfig, FunctionNasStorageNasConfigArgs
- File
System stringId - The ID of NAS file system.
- Local
Mount stringPath - The directory of Function local mount.
- Mount
Point stringId - The ID of NAS mount point.
- Remote
Path string - Remote directory of the file system.
- File
System stringId - The ID of NAS file system.
- Local
Mount stringPath - The directory of Function local mount.
- Mount
Point stringId - The ID of NAS mount point.
- Remote
Path string - Remote directory of the file system.
- file
System StringId - The ID of NAS file system.
- local
Mount StringPath - The directory of Function local mount.
- mount
Point StringId - The ID of NAS mount point.
- remote
Path String - Remote directory of the file system.
- file
System stringId - The ID of NAS file system.
- local
Mount stringPath - The directory of Function local mount.
- mount
Point stringId - The ID of NAS mount point.
- remote
Path string - Remote directory of the file system.
- file_
system_ strid - The ID of NAS file system.
- local_
mount_ strpath - The directory of Function local mount.
- mount_
point_ strid - The ID of NAS mount point.
- remote_
path str - Remote directory of the file system.
- file
System StringId - The ID of NAS file system.
- local
Mount StringPath - The directory of Function local mount.
- mount
Point StringId - The ID of NAS mount point.
- remote
Path String - Remote directory of the file system.
FunctionSourceAccessConfig, FunctionSourceAccessConfigArgs
FunctionTlsConfig, FunctionTlsConfigArgs
- Enable
Log bool - TLS log function switch.
- Tls
Project stringId - The project ID of TLS log topic.
- Tls
Topic stringId - The topic ID of TLS log topic.
- Enable
Log bool - TLS log function switch.
- Tls
Project stringId - The project ID of TLS log topic.
- Tls
Topic stringId - The topic ID of TLS log topic.
- enable
Log Boolean - TLS log function switch.
- tls
Project StringId - The project ID of TLS log topic.
- tls
Topic StringId - The topic ID of TLS log topic.
- enable
Log boolean - TLS log function switch.
- tls
Project stringId - The project ID of TLS log topic.
- tls
Topic stringId - The topic ID of TLS log topic.
- enable_
log bool - TLS log function switch.
- tls_
project_ strid - The project ID of TLS log topic.
- tls_
topic_ strid - The topic ID of TLS log topic.
- enable
Log Boolean - TLS log function switch.
- tls
Project StringId - The project ID of TLS log topic.
- tls
Topic StringId - The topic ID of TLS log topic.
FunctionTosMountConfig, FunctionTosMountConfigArgs
- Enable
Tos bool - Whether to enable TOS storage mounting.
- Credentials
Function
Tos Mount Config Credentials - 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 List<FunctionTos Mount Config Mount Point> - 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
Function
Tos Mount Config Credentials - 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 []FunctionTos Mount Config Mount Point - After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
- enable
Tos Boolean - Whether to enable TOS storage mounting.
- credentials
Function
Tos Mount Config Credentials - 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 List<FunctionTos Mount Config Mount Point> - After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
- enable
Tos boolean - Whether to enable TOS storage mounting.
- credentials
Function
Tos Mount Config Credentials - 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 FunctionTos Mount Config Mount Point[] - 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
Function
Tos Mount Config Credentials - 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[FunctionTos Mount Config Mount Point] - After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
- enable
Tos 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.
- mount
Points List<Property Map> - After enabling TOS, you need to provide a TOS storage configuration list, with a maximum of 5 items.
FunctionTosMountConfigCredentials, FunctionTosMountConfigCredentialsArgs
- Access
Key stringId - The AccessKey ID (AK) of the Volcano Engine account.
- Secret
Access stringKey - The Secret Access Key (SK) of the Volcano Engine account.
- Access
Key stringId - The AccessKey ID (AK) of the Volcano Engine account.
- Secret
Access stringKey - The Secret Access Key (SK) of the Volcano Engine account.
- access
Key StringId - The AccessKey ID (AK) of the Volcano Engine account.
- secret
Access StringKey - The Secret Access Key (SK) of the Volcano Engine account.
- access
Key stringId - The AccessKey ID (AK) of the Volcano Engine account.
- secret
Access stringKey - The Secret Access Key (SK) of the Volcano Engine account.
- access_
key_ strid - The AccessKey ID (AK) of the Volcano Engine account.
- secret_
access_ strkey - The Secret Access Key (SK) of the Volcano Engine account.
- access
Key StringId - The AccessKey ID (AK) of the Volcano Engine account.
- secret
Access StringKey - The Secret Access Key (SK) of the Volcano Engine account.
FunctionTosMountConfigMountPoint, FunctionTosMountConfigMountPointArgs
- Bucket
Name string - TOS bucket.
- Bucket
Path string - The mounted TOS Bucket path.
- Endpoint string
- TOS Access domain name.
- Local
Mount stringPath - 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.
- Bucket
Name string - TOS bucket.
- Bucket
Path string - The mounted TOS Bucket path.
- Endpoint string
- TOS Access domain name.
- Local
Mount stringPath - 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.
- bucket
Name String - TOS bucket.
- bucket
Path String - The mounted TOS Bucket path.
- endpoint String
- TOS Access domain name.
- local
Mount StringPath - Function local mount directory.
- read
Only Boolean - Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.
- bucket
Name string - TOS bucket.
- bucket
Path string - The mounted TOS Bucket path.
- endpoint string
- TOS Access domain name.
- local
Mount stringPath - Function local mount directory.
- read
Only 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_ strpath - 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.
- bucket
Name String - TOS bucket.
- bucket
Path String - The mounted TOS Bucket path.
- endpoint String
- TOS Access domain name.
- local
Mount StringPath - Function local mount directory.
- read
Only Boolean - Function local directory access permissions. After mounting the TOS Bucket, whether the function local mount directory has read-only permissions.
FunctionVpcConfig, FunctionVpcConfigArgs
- Enable
Vpc bool - Whether the function enables private network access.
- bool
- Function access to the public network switch.
- Security
Group List<string>Ids - The ID of security group.
- Subnet
Ids List<string> - The ID of subnet.
- Vpc
Id string - The ID of VPC.
- Enable
Vpc bool - Whether the function enables private network access.
- bool
- Function access to the public network switch.
- Security
Group []stringIds - The ID of security group.
- Subnet
Ids []string - The ID of subnet.
- Vpc
Id string - The ID of VPC.
- enable
Vpc Boolean - Whether the function enables private network access.
- Boolean
- Function access to the public network switch.
- security
Group List<String>Ids - The ID of security group.
- subnet
Ids List<String> - The ID of subnet.
- vpc
Id String - The ID of VPC.
- enable
Vpc boolean - Whether the function enables private network access.
- boolean
- Function access to the public network switch.
- security
Group string[]Ids - The ID of security group.
- subnet
Ids string[] - The ID of subnet.
- vpc
Id string - The ID of VPC.
- enable_
vpc bool - Whether the function enables private network access.
- bool
- Function access to the public network switch.
- security_
group_ Sequence[str]ids - The ID of security group.
- subnet_
ids Sequence[str] - The ID of subnet.
- vpc_
id str - The ID of VPC.
- enable
Vpc Boolean - Whether the function enables private network access.
- Boolean
- Function access to the public network switch.
- security
Group List<String>Ids - The ID of security group.
- subnet
Ids List<String> - The ID of subnet.
- vpc
Id 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.