1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. FgsFunction
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.FgsFunction

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages a Function resource within FlexibleEngine.

    Example Usage

    With base64 func code

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const f1 = new flexibleengine.FgsFunction("f1", {
        agency: "test",
        app: "default",
        codeType: "inline",
        description: "fuction test",
        funcCode: "aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=",
        handler: "test.handler",
        memorySize: 128,
        runtime: "Python2.7",
        timeout: 3,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    f1 = flexibleengine.FgsFunction("f1",
        agency="test",
        app="default",
        code_type="inline",
        description="fuction test",
        func_code="aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=",
        handler="test.handler",
        memory_size=128,
        runtime="Python2.7",
        timeout=3)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.NewFgsFunction(ctx, "f1", &flexibleengine.FgsFunctionArgs{
    			Agency:      pulumi.String("test"),
    			App:         pulumi.String("default"),
    			CodeType:    pulumi.String("inline"),
    			Description: pulumi.String("fuction test"),
    			FuncCode:    pulumi.String("aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ="),
    			Handler:     pulumi.String("test.handler"),
    			MemorySize:  pulumi.Float64(128),
    			Runtime:     pulumi.String("Python2.7"),
    			Timeout:     pulumi.Float64(3),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var f1 = new Flexibleengine.FgsFunction("f1", new()
        {
            Agency = "test",
            App = "default",
            CodeType = "inline",
            Description = "fuction test",
            FuncCode = "aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=",
            Handler = "test.handler",
            MemorySize = 128,
            Runtime = "Python2.7",
            Timeout = 3,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.FgsFunction;
    import com.pulumi.flexibleengine.FgsFunctionArgs;
    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 f1 = new FgsFunction("f1", FgsFunctionArgs.builder()
                .agency("test")
                .app("default")
                .codeType("inline")
                .description("fuction test")
                .funcCode("aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=")
                .handler("test.handler")
                .memorySize(128)
                .runtime("Python2.7")
                .timeout(3)
                .build());
    
        }
    }
    
    resources:
      f1:
        type: flexibleengine:FgsFunction
        properties:
          agency: test
          app: default
          codeType: inline
          description: fuction test
          funcCode: aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=
          handler: test.handler
          memorySize: 128
          runtime: Python2.7
          timeout: 3
    

    With text code

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const f1 = new flexibleengine.FgsFunction("f1", {
        agency: "test",
        app: "default",
        codeType: "inline",
        description: "fuction test",
        funcCode: `# -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            "statusCode": 200,
            "isBase64Encoded": False,
            "body": json.dumps(event),
            "headers": {
                "Content-Type": "application/json"
            }
        }
    
    `,
        handler: "test.handler",
        memorySize: 128,
        runtime: "Python2.7",
        timeout: 3,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    f1 = flexibleengine.FgsFunction("f1",
        agency="test",
        app="default",
        code_type="inline",
        description="fuction test",
        func_code="""# -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            "statusCode": 200,
            "isBase64Encoded": False,
            "body": json.dumps(event),
            "headers": {
                "Content-Type": "application/json"
            }
        }
    
    """,
        handler="test.handler",
        memory_size=128,
        runtime="Python2.7",
        timeout=3)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.NewFgsFunction(ctx, "f1", &flexibleengine.FgsFunctionArgs{
    			Agency:      pulumi.String("test"),
    			App:         pulumi.String("default"),
    			CodeType:    pulumi.String("inline"),
    			Description: pulumi.String("fuction test"),
    			FuncCode: pulumi.String(`# -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            "statusCode": 200,
            "isBase64Encoded": False,
            "body": json.dumps(event),
            "headers": {
                "Content-Type": "application/json"
            }
        }
    
    `),
    			Handler:    pulumi.String("test.handler"),
    			MemorySize: pulumi.Float64(128),
    			Runtime:    pulumi.String("Python2.7"),
    			Timeout:    pulumi.Float64(3),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var f1 = new Flexibleengine.FgsFunction("f1", new()
        {
            Agency = "test",
            App = "default",
            CodeType = "inline",
            Description = "fuction test",
            FuncCode = @"# -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            ""statusCode"": 200,
            ""isBase64Encoded"": False,
            ""body"": json.dumps(event),
            ""headers"": {
                ""Content-Type"": ""application/json""
            }
        }
    
    ",
            Handler = "test.handler",
            MemorySize = 128,
            Runtime = "Python2.7",
            Timeout = 3,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.FgsFunction;
    import com.pulumi.flexibleengine.FgsFunctionArgs;
    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 f1 = new FgsFunction("f1", FgsFunctionArgs.builder()
                .agency("test")
                .app("default")
                .codeType("inline")
                .description("fuction test")
                .funcCode("""
    # -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            "statusCode": 200,
            "isBase64Encoded": False,
            "body": json.dumps(event),
            "headers": {
                "Content-Type": "application/json"
            }
        }
    
                """)
                .handler("test.handler")
                .memorySize(128)
                .runtime("Python2.7")
                .timeout(3)
                .build());
    
        }
    }
    
    resources:
      f1:
        type: flexibleengine:FgsFunction
        properties:
          agency: test
          app: default
          codeType: inline
          description: fuction test
          funcCode: |+
            # -*- coding:utf-8 -*-
            import json
            def handler (event, context):
                return {
                    "statusCode": 200,
                    "isBase64Encoded": False,
                    "body": json.dumps(event),
                    "headers": {
                        "Content-Type": "application/json"
                    }
                }        
    
          handler: test.handler
          memorySize: 128
          runtime: Python2.7
          timeout: 3
    

    With agency, vpc, subnet and func_mounts

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
    const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
        cidr: "192.168.1.0/24",
        gatewayIp: "192.168.1.1",
        vpcId: flexibleengine_vpc_v1.test.id,
    });
    const testSfsFileSystemV2 = new flexibleengine.SfsFileSystemV2("testSfsFileSystemV2", {
        shareProto: "NFS",
        size: 10,
        description: "test sfs for fgs",
    });
    const testIdentityAgencyV3 = new flexibleengine.IdentityAgencyV3("testIdentityAgencyV3", {
        description: "test agency for fgs",
        delegatedServiceName: "op_svc_cff",
        projectRoles: [{
            project: "eu-west-0",
            roles: [
                "VPC Administrator",
                "SFS Administrator",
            ],
        }],
    });
    const testFgsFunction = new flexibleengine.FgsFunction("testFgsFunction", {
        "package": "default",
        description: "fuction test",
        handler: "test.handler",
        memorySize: 128,
        timeout: 3,
        runtime: "Python2.7",
        codeType: "inline",
        funcCode: "aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=",
        agency: testIdentityAgencyV3.name,
        vpcId: flexibleengine_vpc_v1.test.id,
        networkId: flexibleengine_vpc_subnet_v1.test.id,
        funcMounts: [{
            mountType: "sfs",
            mountResource: testSfsFileSystemV2.sfsFileSystemV2Id,
            mountSharePath: testSfsFileSystemV2.exportLocation,
            localMountPath: "/mnt",
        }],
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
    example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
        cidr="192.168.1.0/24",
        gateway_ip="192.168.1.1",
        vpc_id=flexibleengine_vpc_v1["test"]["id"])
    test_sfs_file_system_v2 = flexibleengine.SfsFileSystemV2("testSfsFileSystemV2",
        share_proto="NFS",
        size=10,
        description="test sfs for fgs")
    test_identity_agency_v3 = flexibleengine.IdentityAgencyV3("testIdentityAgencyV3",
        description="test agency for fgs",
        delegated_service_name="op_svc_cff",
        project_roles=[{
            "project": "eu-west-0",
            "roles": [
                "VPC Administrator",
                "SFS Administrator",
            ],
        }])
    test_fgs_function = flexibleengine.FgsFunction("testFgsFunction",
        package="default",
        description="fuction test",
        handler="test.handler",
        memory_size=128,
        timeout=3,
        runtime="Python2.7",
        code_type="inline",
        func_code="aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=",
        agency=test_identity_agency_v3.name,
        vpc_id=flexibleengine_vpc_v1["test"]["id"],
        network_id=flexibleengine_vpc_subnet_v1["test"]["id"],
        func_mounts=[{
            "mount_type": "sfs",
            "mount_resource": test_sfs_file_system_v2.sfs_file_system_v2_id,
            "mount_share_path": test_sfs_file_system_v2.export_location,
            "local_mount_path": "/mnt",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
    			Cidr: pulumi.String("192.168.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
    			Cidr:      pulumi.String("192.168.1.0/24"),
    			GatewayIp: pulumi.String("192.168.1.1"),
    			VpcId:     pulumi.Any(flexibleengine_vpc_v1.Test.Id),
    		})
    		if err != nil {
    			return err
    		}
    		testSfsFileSystemV2, err := flexibleengine.NewSfsFileSystemV2(ctx, "testSfsFileSystemV2", &flexibleengine.SfsFileSystemV2Args{
    			ShareProto:  pulumi.String("NFS"),
    			Size:        pulumi.Float64(10),
    			Description: pulumi.String("test sfs for fgs"),
    		})
    		if err != nil {
    			return err
    		}
    		testIdentityAgencyV3, err := flexibleengine.NewIdentityAgencyV3(ctx, "testIdentityAgencyV3", &flexibleengine.IdentityAgencyV3Args{
    			Description:          pulumi.String("test agency for fgs"),
    			DelegatedServiceName: pulumi.String("op_svc_cff"),
    			ProjectRoles: flexibleengine.IdentityAgencyV3ProjectRoleArray{
    				&flexibleengine.IdentityAgencyV3ProjectRoleArgs{
    					Project: pulumi.String("eu-west-0"),
    					Roles: pulumi.StringArray{
    						pulumi.String("VPC Administrator"),
    						pulumi.String("SFS Administrator"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = flexibleengine.NewFgsFunction(ctx, "testFgsFunction", &flexibleengine.FgsFunctionArgs{
    			Package:     pulumi.String("default"),
    			Description: pulumi.String("fuction test"),
    			Handler:     pulumi.String("test.handler"),
    			MemorySize:  pulumi.Float64(128),
    			Timeout:     pulumi.Float64(3),
    			Runtime:     pulumi.String("Python2.7"),
    			CodeType:    pulumi.String("inline"),
    			FuncCode:    pulumi.String("aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ="),
    			Agency:      testIdentityAgencyV3.Name,
    			VpcId:       pulumi.Any(flexibleengine_vpc_v1.Test.Id),
    			NetworkId:   pulumi.Any(flexibleengine_vpc_subnet_v1.Test.Id),
    			FuncMounts: flexibleengine.FgsFunctionFuncMountArray{
    				&flexibleengine.FgsFunctionFuncMountArgs{
    					MountType:      pulumi.String("sfs"),
    					MountResource:  testSfsFileSystemV2.SfsFileSystemV2Id,
    					MountSharePath: testSfsFileSystemV2.ExportLocation,
    					LocalMountPath: pulumi.String("/mnt"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
        {
            Cidr = "192.168.0.0/16",
        });
    
        var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
        {
            Cidr = "192.168.1.0/24",
            GatewayIp = "192.168.1.1",
            VpcId = flexibleengine_vpc_v1.Test.Id,
        });
    
        var testSfsFileSystemV2 = new Flexibleengine.SfsFileSystemV2("testSfsFileSystemV2", new()
        {
            ShareProto = "NFS",
            Size = 10,
            Description = "test sfs for fgs",
        });
    
        var testIdentityAgencyV3 = new Flexibleengine.IdentityAgencyV3("testIdentityAgencyV3", new()
        {
            Description = "test agency for fgs",
            DelegatedServiceName = "op_svc_cff",
            ProjectRoles = new[]
            {
                new Flexibleengine.Inputs.IdentityAgencyV3ProjectRoleArgs
                {
                    Project = "eu-west-0",
                    Roles = new[]
                    {
                        "VPC Administrator",
                        "SFS Administrator",
                    },
                },
            },
        });
    
        var testFgsFunction = new Flexibleengine.FgsFunction("testFgsFunction", new()
        {
            Package = "default",
            Description = "fuction test",
            Handler = "test.handler",
            MemorySize = 128,
            Timeout = 3,
            Runtime = "Python2.7",
            CodeType = "inline",
            FuncCode = "aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=",
            Agency = testIdentityAgencyV3.Name,
            VpcId = flexibleengine_vpc_v1.Test.Id,
            NetworkId = flexibleengine_vpc_subnet_v1.Test.Id,
            FuncMounts = new[]
            {
                new Flexibleengine.Inputs.FgsFunctionFuncMountArgs
                {
                    MountType = "sfs",
                    MountResource = testSfsFileSystemV2.SfsFileSystemV2Id,
                    MountSharePath = testSfsFileSystemV2.ExportLocation,
                    LocalMountPath = "/mnt",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.VpcV1;
    import com.pulumi.flexibleengine.VpcV1Args;
    import com.pulumi.flexibleengine.VpcSubnetV1;
    import com.pulumi.flexibleengine.VpcSubnetV1Args;
    import com.pulumi.flexibleengine.SfsFileSystemV2;
    import com.pulumi.flexibleengine.SfsFileSystemV2Args;
    import com.pulumi.flexibleengine.IdentityAgencyV3;
    import com.pulumi.flexibleengine.IdentityAgencyV3Args;
    import com.pulumi.flexibleengine.inputs.IdentityAgencyV3ProjectRoleArgs;
    import com.pulumi.flexibleengine.FgsFunction;
    import com.pulumi.flexibleengine.FgsFunctionArgs;
    import com.pulumi.flexibleengine.inputs.FgsFunctionFuncMountArgs;
    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 exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
                .cidr("192.168.0.0/16")
                .build());
    
            var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
                .cidr("192.168.1.0/24")
                .gatewayIp("192.168.1.1")
                .vpcId(flexibleengine_vpc_v1.test().id())
                .build());
    
            var testSfsFileSystemV2 = new SfsFileSystemV2("testSfsFileSystemV2", SfsFileSystemV2Args.builder()
                .shareProto("NFS")
                .size(10)
                .description("test sfs for fgs")
                .build());
    
            var testIdentityAgencyV3 = new IdentityAgencyV3("testIdentityAgencyV3", IdentityAgencyV3Args.builder()
                .description("test agency for fgs")
                .delegatedServiceName("op_svc_cff")
                .projectRoles(IdentityAgencyV3ProjectRoleArgs.builder()
                    .project("eu-west-0")
                    .roles(                
                        "VPC Administrator",
                        "SFS Administrator")
                    .build())
                .build());
    
            var testFgsFunction = new FgsFunction("testFgsFunction", FgsFunctionArgs.builder()
                .package_("default")
                .description("fuction test")
                .handler("test.handler")
                .memorySize(128)
                .timeout(3)
                .runtime("Python2.7")
                .codeType("inline")
                .funcCode("aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=")
                .agency(testIdentityAgencyV3.name())
                .vpcId(flexibleengine_vpc_v1.test().id())
                .networkId(flexibleengine_vpc_subnet_v1.test().id())
                .funcMounts(FgsFunctionFuncMountArgs.builder()
                    .mountType("sfs")
                    .mountResource(testSfsFileSystemV2.sfsFileSystemV2Id())
                    .mountSharePath(testSfsFileSystemV2.exportLocation())
                    .localMountPath("/mnt")
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleVpc:
        type: flexibleengine:VpcV1
        properties:
          cidr: 192.168.0.0/16
      exampleSubnet:
        type: flexibleengine:VpcSubnetV1
        properties:
          cidr: 192.168.1.0/24
          gatewayIp: 192.168.1.1
          vpcId: ${flexibleengine_vpc_v1.test.id}
      testSfsFileSystemV2:
        type: flexibleengine:SfsFileSystemV2
        properties:
          shareProto: NFS
          size: 10
          description: test sfs for fgs
      testIdentityAgencyV3:
        type: flexibleengine:IdentityAgencyV3
        properties:
          description: test agency for fgs
          delegatedServiceName: op_svc_cff
          projectRoles:
            - project: eu-west-0
              roles:
                - VPC Administrator
                - SFS Administrator
      testFgsFunction:
        type: flexibleengine:FgsFunction
        properties:
          package: default
          description: fuction test
          handler: test.handler
          memorySize: 128
          timeout: 3
          runtime: Python2.7
          codeType: inline
          funcCode: aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ=
          agency: ${testIdentityAgencyV3.name}
          vpcId: ${flexibleengine_vpc_v1.test.id}
          networkId: ${flexibleengine_vpc_subnet_v1.test.id}
          funcMounts:
            - mountType: sfs
              mountResource: ${testSfsFileSystemV2.sfsFileSystemV2Id}
              mountSharePath: ${testSfsFileSystemV2.exportLocation}
              localMountPath: /mnt
    

    With agency, user_data for environment variables and OBS for code storage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const codeUrl = config.requireObject("codeUrl");
    const agency = new flexibleengine.IdentityAgencyV3("agency", {
        description: "Delegate OBS access to FGS",
        delegatedServiceName: "op_svc_cff",
        domainRoles: ["OBS OperateAccess"],
    });
    const _function = new flexibleengine.FgsFunction("function", {
        app: "default",
        description: "test function",
        handler: "index.handler",
        agency: agency.name,
        memorySize: 128,
        timeout: 3,
        runtime: "Node.js6.10",
        codeType: "obs",
        codeUrl: codeUrl,
        userData: JSON.stringify({
            environmentVariable1: "someValue",
            environmentVariable2: "5",
        }),
        encryptedUserData: JSON.stringify({
            secret_key: "xxxxxxx",
        }),
    });
    
    import pulumi
    import json
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    code_url = config.require_object("codeUrl")
    agency = flexibleengine.IdentityAgencyV3("agency",
        description="Delegate OBS access to FGS",
        delegated_service_name="op_svc_cff",
        domain_roles=["OBS OperateAccess"])
    function = flexibleengine.FgsFunction("function",
        app="default",
        description="test function",
        handler="index.handler",
        agency=agency.name,
        memory_size=128,
        timeout=3,
        runtime="Node.js6.10",
        code_type="obs",
        code_url=code_url,
        user_data=json.dumps({
            "environmentVariable1": "someValue",
            "environmentVariable2": "5",
        }),
        encrypted_user_data=json.dumps({
            "secret_key": "xxxxxxx",
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		codeUrl := cfg.RequireObject("codeUrl")
    		agency, err := flexibleengine.NewIdentityAgencyV3(ctx, "agency", &flexibleengine.IdentityAgencyV3Args{
    			Description:          pulumi.String("Delegate OBS access to FGS"),
    			DelegatedServiceName: pulumi.String("op_svc_cff"),
    			DomainRoles: pulumi.StringArray{
    				pulumi.String("OBS OperateAccess"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"environmentVariable1": "someValue",
    			"environmentVariable2": "5",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		tmpJSON1, err := json.Marshal(map[string]interface{}{
    			"secret_key": "xxxxxxx",
    		})
    		if err != nil {
    			return err
    		}
    		json1 := string(tmpJSON1)
    		_, err = flexibleengine.NewFgsFunction(ctx, "function", &flexibleengine.FgsFunctionArgs{
    			App:               pulumi.String("default"),
    			Description:       pulumi.String("test function"),
    			Handler:           pulumi.String("index.handler"),
    			Agency:            agency.Name,
    			MemorySize:        pulumi.Float64(128),
    			Timeout:           pulumi.Float64(3),
    			Runtime:           pulumi.String("Node.js6.10"),
    			CodeType:          pulumi.String("obs"),
    			CodeUrl:           pulumi.Any(codeUrl),
    			UserData:          pulumi.String(json0),
    			EncryptedUserData: pulumi.String(json1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var codeUrl = config.RequireObject<dynamic>("codeUrl");
        var agency = new Flexibleengine.IdentityAgencyV3("agency", new()
        {
            Description = "Delegate OBS access to FGS",
            DelegatedServiceName = "op_svc_cff",
            DomainRoles = new[]
            {
                "OBS OperateAccess",
            },
        });
    
        var function = new Flexibleengine.FgsFunction("function", new()
        {
            App = "default",
            Description = "test function",
            Handler = "index.handler",
            Agency = agency.Name,
            MemorySize = 128,
            Timeout = 3,
            Runtime = "Node.js6.10",
            CodeType = "obs",
            CodeUrl = codeUrl,
            UserData = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["environmentVariable1"] = "someValue",
                ["environmentVariable2"] = "5",
            }),
            EncryptedUserData = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["secret_key"] = "xxxxxxx",
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.IdentityAgencyV3;
    import com.pulumi.flexibleengine.IdentityAgencyV3Args;
    import com.pulumi.flexibleengine.FgsFunction;
    import com.pulumi.flexibleengine.FgsFunctionArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            final var config = ctx.config();
            final var codeUrl = config.get("codeUrl");
            var agency = new IdentityAgencyV3("agency", IdentityAgencyV3Args.builder()
                .description("Delegate OBS access to FGS")
                .delegatedServiceName("op_svc_cff")
                .domainRoles("OBS OperateAccess")
                .build());
    
            var function = new FgsFunction("function", FgsFunctionArgs.builder()
                .app("default")
                .description("test function")
                .handler("index.handler")
                .agency(agency.name())
                .memorySize(128)
                .timeout(3)
                .runtime("Node.js6.10")
                .codeType("obs")
                .codeUrl(codeUrl)
                .userData(serializeJson(
                    jsonObject(
                        jsonProperty("environmentVariable1", "someValue"),
                        jsonProperty("environmentVariable2", "5")
                    )))
                .encryptedUserData(serializeJson(
                    jsonObject(
                        jsonProperty("secret_key", "xxxxxxx")
                    )))
                .build());
    
        }
    }
    
    configuration:
      codeUrl:
        type: dynamic
    resources:
      agency:
        type: flexibleengine:IdentityAgencyV3
        properties:
          description: Delegate OBS access to FGS
          delegatedServiceName: op_svc_cff
          domainRoles:
            - OBS OperateAccess
      function:
        type: flexibleengine:FgsFunction
        properties:
          app: default
          description: test function
          handler: index.handler
          agency: ${agency.name}
          memorySize: 128
          timeout: 3
          runtime: Node.js6.10
          codeType: obs
          codeUrl: ${codeUrl}
          userData:
            fn::toJSON:
              environmentVariable1: someValue
              environmentVariable2: '5'
          encryptedUserData:
            fn::toJSON:
              secret_key: xxxxxxx
    

    Create FgsFunction Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FgsFunction(name: string, args: FgsFunctionArgs, opts?: CustomResourceOptions);
    @overload
    def FgsFunction(resource_name: str,
                    args: FgsFunctionArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def FgsFunction(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    memory_size: Optional[float] = None,
                    timeout: Optional[float] = None,
                    runtime: Optional[str] = None,
                    initializer_timeout: Optional[float] = None,
                    code_type: Optional[str] = None,
                    code_url: Optional[str] = None,
                    custom_image: Optional[FgsFunctionCustomImageArgs] = None,
                    depend_lists: Optional[Sequence[str]] = None,
                    description: Optional[str] = None,
                    dns_list: Optional[str] = None,
                    encrypted_user_data: Optional[str] = None,
                    enterprise_project_id: Optional[str] = None,
                    fgs_function_id: Optional[str] = None,
                    func_code: Optional[str] = None,
                    func_mounts: Optional[Sequence[FgsFunctionFuncMountArgs]] = None,
                    functiongraph_version: Optional[str] = None,
                    handler: Optional[str] = None,
                    initializer_handler: Optional[str] = None,
                    agency: Optional[str] = None,
                    log_group_name: Optional[str] = None,
                    log_group_id: Optional[str] = None,
                    app_agency: Optional[str] = None,
                    log_stream_name: Optional[str] = None,
                    max_instance_num: Optional[str] = None,
                    code_filename: Optional[str] = None,
                    mount_user_group_id: Optional[float] = None,
                    mount_user_id: Optional[float] = None,
                    name: Optional[str] = None,
                    network_id: Optional[str] = None,
                    package: Optional[str] = None,
                    region: Optional[str] = None,
                    log_stream_id: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    app: Optional[str] = None,
                    timeouts: Optional[FgsFunctionTimeoutsArgs] = None,
                    user_data: Optional[str] = None,
                    versions: Optional[Sequence[FgsFunctionVersionArgs]] = None,
                    vpc_id: Optional[str] = None,
                    xrole: Optional[str] = None)
    func NewFgsFunction(ctx *Context, name string, args FgsFunctionArgs, opts ...ResourceOption) (*FgsFunction, error)
    public FgsFunction(string name, FgsFunctionArgs args, CustomResourceOptions? opts = null)
    public FgsFunction(String name, FgsFunctionArgs args)
    public FgsFunction(String name, FgsFunctionArgs args, CustomResourceOptions options)
    
    type: flexibleengine:FgsFunction
    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 FgsFunctionArgs
    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 FgsFunctionArgs
    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 FgsFunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FgsFunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FgsFunctionArgs
    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 fgsFunctionResource = new Flexibleengine.FgsFunction("fgsFunctionResource", new()
    {
        MemorySize = 0,
        Timeout = 0,
        Runtime = "string",
        InitializerTimeout = 0,
        CodeType = "string",
        CodeUrl = "string",
        CustomImage = new Flexibleengine.Inputs.FgsFunctionCustomImageArgs
        {
            Url = "string",
        },
        DependLists = new[]
        {
            "string",
        },
        Description = "string",
        DnsList = "string",
        EncryptedUserData = "string",
        EnterpriseProjectId = "string",
        FgsFunctionId = "string",
        FuncCode = "string",
        FuncMounts = new[]
        {
            new Flexibleengine.Inputs.FgsFunctionFuncMountArgs
            {
                LocalMountPath = "string",
                MountResource = "string",
                MountSharePath = "string",
                MountType = "string",
                Status = "string",
            },
        },
        FunctiongraphVersion = "string",
        Handler = "string",
        InitializerHandler = "string",
        Agency = "string",
        LogGroupName = "string",
        LogGroupId = "string",
        AppAgency = "string",
        LogStreamName = "string",
        MaxInstanceNum = "string",
        CodeFilename = "string",
        MountUserGroupId = 0,
        MountUserId = 0,
        Name = "string",
        NetworkId = "string",
        Region = "string",
        LogStreamId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        App = "string",
        Timeouts = new Flexibleengine.Inputs.FgsFunctionTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        UserData = "string",
        Versions = new[]
        {
            new Flexibleengine.Inputs.FgsFunctionVersionArgs
            {
                Name = "string",
                Aliases = new Flexibleengine.Inputs.FgsFunctionVersionAliasesArgs
                {
                    Name = "string",
                    Description = "string",
                },
            },
        },
        VpcId = "string",
    });
    
    example, err := flexibleengine.NewFgsFunction(ctx, "fgsFunctionResource", &flexibleengine.FgsFunctionArgs{
    	MemorySize:         pulumi.Float64(0),
    	Timeout:            pulumi.Float64(0),
    	Runtime:            pulumi.String("string"),
    	InitializerTimeout: pulumi.Float64(0),
    	CodeType:           pulumi.String("string"),
    	CodeUrl:            pulumi.String("string"),
    	CustomImage: &flexibleengine.FgsFunctionCustomImageArgs{
    		Url: pulumi.String("string"),
    	},
    	DependLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description:         pulumi.String("string"),
    	DnsList:             pulumi.String("string"),
    	EncryptedUserData:   pulumi.String("string"),
    	EnterpriseProjectId: pulumi.String("string"),
    	FgsFunctionId:       pulumi.String("string"),
    	FuncCode:            pulumi.String("string"),
    	FuncMounts: flexibleengine.FgsFunctionFuncMountArray{
    		&flexibleengine.FgsFunctionFuncMountArgs{
    			LocalMountPath: pulumi.String("string"),
    			MountResource:  pulumi.String("string"),
    			MountSharePath: pulumi.String("string"),
    			MountType:      pulumi.String("string"),
    			Status:         pulumi.String("string"),
    		},
    	},
    	FunctiongraphVersion: pulumi.String("string"),
    	Handler:              pulumi.String("string"),
    	InitializerHandler:   pulumi.String("string"),
    	Agency:               pulumi.String("string"),
    	LogGroupName:         pulumi.String("string"),
    	LogGroupId:           pulumi.String("string"),
    	AppAgency:            pulumi.String("string"),
    	LogStreamName:        pulumi.String("string"),
    	MaxInstanceNum:       pulumi.String("string"),
    	CodeFilename:         pulumi.String("string"),
    	MountUserGroupId:     pulumi.Float64(0),
    	MountUserId:          pulumi.Float64(0),
    	Name:                 pulumi.String("string"),
    	NetworkId:            pulumi.String("string"),
    	Region:               pulumi.String("string"),
    	LogStreamId:          pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	App: pulumi.String("string"),
    	Timeouts: &flexibleengine.FgsFunctionTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	UserData: pulumi.String("string"),
    	Versions: flexibleengine.FgsFunctionVersionArray{
    		&flexibleengine.FgsFunctionVersionArgs{
    			Name: pulumi.String("string"),
    			Aliases: &flexibleengine.FgsFunctionVersionAliasesArgs{
    				Name:        pulumi.String("string"),
    				Description: pulumi.String("string"),
    			},
    		},
    	},
    	VpcId: pulumi.String("string"),
    })
    
    var fgsFunctionResource = new FgsFunction("fgsFunctionResource", FgsFunctionArgs.builder()
        .memorySize(0)
        .timeout(0)
        .runtime("string")
        .initializerTimeout(0)
        .codeType("string")
        .codeUrl("string")
        .customImage(FgsFunctionCustomImageArgs.builder()
            .url("string")
            .build())
        .dependLists("string")
        .description("string")
        .dnsList("string")
        .encryptedUserData("string")
        .enterpriseProjectId("string")
        .fgsFunctionId("string")
        .funcCode("string")
        .funcMounts(FgsFunctionFuncMountArgs.builder()
            .localMountPath("string")
            .mountResource("string")
            .mountSharePath("string")
            .mountType("string")
            .status("string")
            .build())
        .functiongraphVersion("string")
        .handler("string")
        .initializerHandler("string")
        .agency("string")
        .logGroupName("string")
        .logGroupId("string")
        .appAgency("string")
        .logStreamName("string")
        .maxInstanceNum("string")
        .codeFilename("string")
        .mountUserGroupId(0)
        .mountUserId(0)
        .name("string")
        .networkId("string")
        .region("string")
        .logStreamId("string")
        .tags(Map.of("string", "string"))
        .app("string")
        .timeouts(FgsFunctionTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .userData("string")
        .versions(FgsFunctionVersionArgs.builder()
            .name("string")
            .aliases(FgsFunctionVersionAliasesArgs.builder()
                .name("string")
                .description("string")
                .build())
            .build())
        .vpcId("string")
        .build());
    
    fgs_function_resource = flexibleengine.FgsFunction("fgsFunctionResource",
        memory_size=0,
        timeout=0,
        runtime="string",
        initializer_timeout=0,
        code_type="string",
        code_url="string",
        custom_image={
            "url": "string",
        },
        depend_lists=["string"],
        description="string",
        dns_list="string",
        encrypted_user_data="string",
        enterprise_project_id="string",
        fgs_function_id="string",
        func_code="string",
        func_mounts=[{
            "local_mount_path": "string",
            "mount_resource": "string",
            "mount_share_path": "string",
            "mount_type": "string",
            "status": "string",
        }],
        functiongraph_version="string",
        handler="string",
        initializer_handler="string",
        agency="string",
        log_group_name="string",
        log_group_id="string",
        app_agency="string",
        log_stream_name="string",
        max_instance_num="string",
        code_filename="string",
        mount_user_group_id=0,
        mount_user_id=0,
        name="string",
        network_id="string",
        region="string",
        log_stream_id="string",
        tags={
            "string": "string",
        },
        app="string",
        timeouts={
            "create": "string",
            "delete": "string",
        },
        user_data="string",
        versions=[{
            "name": "string",
            "aliases": {
                "name": "string",
                "description": "string",
            },
        }],
        vpc_id="string")
    
    const fgsFunctionResource = new flexibleengine.FgsFunction("fgsFunctionResource", {
        memorySize: 0,
        timeout: 0,
        runtime: "string",
        initializerTimeout: 0,
        codeType: "string",
        codeUrl: "string",
        customImage: {
            url: "string",
        },
        dependLists: ["string"],
        description: "string",
        dnsList: "string",
        encryptedUserData: "string",
        enterpriseProjectId: "string",
        fgsFunctionId: "string",
        funcCode: "string",
        funcMounts: [{
            localMountPath: "string",
            mountResource: "string",
            mountSharePath: "string",
            mountType: "string",
            status: "string",
        }],
        functiongraphVersion: "string",
        handler: "string",
        initializerHandler: "string",
        agency: "string",
        logGroupName: "string",
        logGroupId: "string",
        appAgency: "string",
        logStreamName: "string",
        maxInstanceNum: "string",
        codeFilename: "string",
        mountUserGroupId: 0,
        mountUserId: 0,
        name: "string",
        networkId: "string",
        region: "string",
        logStreamId: "string",
        tags: {
            string: "string",
        },
        app: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        userData: "string",
        versions: [{
            name: "string",
            aliases: {
                name: "string",
                description: "string",
            },
        }],
        vpcId: "string",
    });
    
    type: flexibleengine:FgsFunction
    properties:
        agency: string
        app: string
        appAgency: string
        codeFilename: string
        codeType: string
        codeUrl: string
        customImage:
            url: string
        dependLists:
            - string
        description: string
        dnsList: string
        encryptedUserData: string
        enterpriseProjectId: string
        fgsFunctionId: string
        funcCode: string
        funcMounts:
            - localMountPath: string
              mountResource: string
              mountSharePath: string
              mountType: string
              status: string
        functiongraphVersion: string
        handler: string
        initializerHandler: string
        initializerTimeout: 0
        logGroupId: string
        logGroupName: string
        logStreamId: string
        logStreamName: string
        maxInstanceNum: string
        memorySize: 0
        mountUserGroupId: 0
        mountUserId: 0
        name: string
        networkId: string
        region: string
        runtime: string
        tags:
            string: string
        timeout: 0
        timeouts:
            create: string
            delete: string
        userData: string
        versions:
            - aliases:
                description: string
                name: string
              name: string
        vpcId: string
    

    FgsFunction 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 FgsFunction resource accepts the following input properties:

    MemorySize double
    Specifies the memory size(MB) allocated to the function.
    Runtime string
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    Timeout double
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    Agency string
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    App string
    Specifies the group to which the function belongs.
    AppAgency string
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    CodeFilename string
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    CodeType string
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    CodeUrl string
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    CustomImage FgsFunctionCustomImage
    DependLists List<string>
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    DnsList string
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    EnterpriseProjectId string
    Specifies the enterprise project id of the function. Changing this creates a new function.
    FgsFunctionId string
    Specifies a resource ID in UUID format.
    FuncCode string
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    FuncMounts List<FgsFunctionFuncMount>

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    FunctiongraphVersion string
    Handler string
    Specifies the entry point of the function.
    InitializerHandler string
    Specifies the initializer of the function.
    InitializerTimeout double
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    LogGroupId string
    LogGroupName string
    LogStreamId string
    LogStreamName string
    MaxInstanceNum string
    MountUserGroupId double
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    MountUserId double
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    Name string
    Specifies the name of the function.
    NetworkId string

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    Package string

    Deprecated: Deprecated

    Region string
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    Tags Dictionary<string, string>
    Timeouts FgsFunctionTimeouts
    UserData string
    Versions List<FgsFunctionVersion>
    The versions management of the function.
    VpcId string
    Specifies the ID of VPC.
    Xrole string

    Deprecated: Deprecated

    MemorySize float64
    Specifies the memory size(MB) allocated to the function.
    Runtime string
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    Timeout float64
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    Agency string
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    App string
    Specifies the group to which the function belongs.
    AppAgency string
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    CodeFilename string
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    CodeType string
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    CodeUrl string
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    CustomImage FgsFunctionCustomImageArgs
    DependLists []string
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    DnsList string
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    EnterpriseProjectId string
    Specifies the enterprise project id of the function. Changing this creates a new function.
    FgsFunctionId string
    Specifies a resource ID in UUID format.
    FuncCode string
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    FuncMounts []FgsFunctionFuncMountArgs

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    FunctiongraphVersion string
    Handler string
    Specifies the entry point of the function.
    InitializerHandler string
    Specifies the initializer of the function.
    InitializerTimeout float64
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    LogGroupId string
    LogGroupName string
    LogStreamId string
    LogStreamName string
    MaxInstanceNum string
    MountUserGroupId float64
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    MountUserId float64
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    Name string
    Specifies the name of the function.
    NetworkId string

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    Package string

    Deprecated: Deprecated

    Region string
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    Tags map[string]string
    Timeouts FgsFunctionTimeoutsArgs
    UserData string
    Versions []FgsFunctionVersionArgs
    The versions management of the function.
    VpcId string
    Specifies the ID of VPC.
    Xrole string

    Deprecated: Deprecated

    memorySize Double
    Specifies the memory size(MB) allocated to the function.
    runtime String
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    timeout Double
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    agency String
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app String
    Specifies the group to which the function belongs.
    appAgency String
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    codeFilename String
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    codeType String
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    codeUrl String
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    customImage FgsFunctionCustomImage
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    dnsList String
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterpriseProjectId String
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgsFunctionId String
    Specifies a resource ID in UUID format.
    funcCode String
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    funcMounts List<FgsFunctionFuncMount>

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraphVersion String
    handler String
    Specifies the entry point of the function.
    initializerHandler String
    Specifies the initializer of the function.
    initializerTimeout Double
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    logGroupId String
    logGroupName String
    logStreamId String
    logStreamName String
    maxInstanceNum String
    mountUserGroupId Double
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mountUserId Double
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name String
    Specifies the name of the function.
    networkId String

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package_ String

    Deprecated: Deprecated

    region String
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    tags Map<String,String>
    timeouts FgsFunctionTimeouts
    userData String
    versions List<FgsFunctionVersion>
    The versions management of the function.
    vpcId String
    Specifies the ID of VPC.
    xrole String

    Deprecated: Deprecated

    memorySize number
    Specifies the memory size(MB) allocated to the function.
    runtime string
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    timeout number
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    agency string
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app string
    Specifies the group to which the function belongs.
    appAgency string
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    codeFilename string
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    codeType string
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    codeUrl string
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    customImage FgsFunctionCustomImage
    dependLists string[]
    Specifies the ID list of the dependencies.
    description string
    Specifies the description of the function.
    dnsList string
    encryptedUserData string
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterpriseProjectId string
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgsFunctionId string
    Specifies a resource ID in UUID format.
    funcCode string
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    funcMounts FgsFunctionFuncMount[]

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraphVersion string
    handler string
    Specifies the entry point of the function.
    initializerHandler string
    Specifies the initializer of the function.
    initializerTimeout number
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    logGroupId string
    logGroupName string
    logStreamId string
    logStreamName string
    maxInstanceNum string
    mountUserGroupId number
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mountUserId number
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name string
    Specifies the name of the function.
    networkId string

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package string

    Deprecated: Deprecated

    region string
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    tags {[key: string]: string}
    timeouts FgsFunctionTimeouts
    userData string
    versions FgsFunctionVersion[]
    The versions management of the function.
    vpcId string
    Specifies the ID of VPC.
    xrole string

    Deprecated: Deprecated

    memory_size float
    Specifies the memory size(MB) allocated to the function.
    runtime str
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    timeout float
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    agency str
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app str
    Specifies the group to which the function belongs.
    app_agency str
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    code_filename str
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    code_type str
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    code_url str
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    custom_image FgsFunctionCustomImageArgs
    depend_lists Sequence[str]
    Specifies the ID list of the dependencies.
    description str
    Specifies the description of the function.
    dns_list str
    encrypted_user_data str
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterprise_project_id str
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgs_function_id str
    Specifies a resource ID in UUID format.
    func_code str
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    func_mounts Sequence[FgsFunctionFuncMountArgs]

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraph_version str
    handler str
    Specifies the entry point of the function.
    initializer_handler str
    Specifies the initializer of the function.
    initializer_timeout float
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    log_group_id str
    log_group_name str
    log_stream_id str
    log_stream_name str
    max_instance_num str
    mount_user_group_id float
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mount_user_id float
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name str
    Specifies the name of the function.
    network_id str

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package str

    Deprecated: Deprecated

    region str
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    tags Mapping[str, str]
    timeouts FgsFunctionTimeoutsArgs
    user_data str
    versions Sequence[FgsFunctionVersionArgs]
    The versions management of the function.
    vpc_id str
    Specifies the ID of VPC.
    xrole str

    Deprecated: Deprecated

    memorySize Number
    Specifies the memory size(MB) allocated to the function.
    runtime String
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    timeout Number
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    agency String
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app String
    Specifies the group to which the function belongs.
    appAgency String
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    codeFilename String
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    codeType String
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    codeUrl String
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    customImage Property Map
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    dnsList String
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterpriseProjectId String
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgsFunctionId String
    Specifies a resource ID in UUID format.
    funcCode String
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    funcMounts List<Property Map>

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraphVersion String
    handler String
    Specifies the entry point of the function.
    initializerHandler String
    Specifies the initializer of the function.
    initializerTimeout Number
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    logGroupId String
    logGroupName String
    logStreamId String
    logStreamName String
    maxInstanceNum String
    mountUserGroupId Number
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mountUserId Number
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name String
    Specifies the name of the function.
    networkId String

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package String

    Deprecated: Deprecated

    region String
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    tags Map<String>
    timeouts Property Map
    userData String
    versions List<Property Map>
    The versions management of the function.
    vpcId String
    Specifies the ID of VPC.
    xrole String

    Deprecated: Deprecated

    Outputs

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

    FlexibleengineUrn string
    Uniform Resource Name.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version string
    The version of the function.
    FlexibleengineUrn string
    Uniform Resource Name.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version string
    The version of the function.
    flexibleengineUrn String
    Uniform Resource Name.
    id String
    The provider-assigned unique ID for this managed resource.
    version String
    The version of the function.
    flexibleengineUrn string
    Uniform Resource Name.
    id string
    The provider-assigned unique ID for this managed resource.
    version string
    The version of the function.
    flexibleengine_urn str
    Uniform Resource Name.
    id str
    The provider-assigned unique ID for this managed resource.
    version str
    The version of the function.
    flexibleengineUrn String
    Uniform Resource Name.
    id String
    The provider-assigned unique ID for this managed resource.
    version String
    The version of the function.

    Look up Existing FgsFunction Resource

    Get an existing FgsFunction 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?: FgsFunctionState, opts?: CustomResourceOptions): FgsFunction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            agency: Optional[str] = None,
            app: Optional[str] = None,
            app_agency: Optional[str] = None,
            code_filename: Optional[str] = None,
            code_type: Optional[str] = None,
            code_url: Optional[str] = None,
            custom_image: Optional[FgsFunctionCustomImageArgs] = None,
            depend_lists: Optional[Sequence[str]] = None,
            description: Optional[str] = None,
            dns_list: Optional[str] = None,
            encrypted_user_data: Optional[str] = None,
            enterprise_project_id: Optional[str] = None,
            fgs_function_id: Optional[str] = None,
            flexibleengine_urn: Optional[str] = None,
            func_code: Optional[str] = None,
            func_mounts: Optional[Sequence[FgsFunctionFuncMountArgs]] = None,
            functiongraph_version: Optional[str] = None,
            handler: Optional[str] = None,
            initializer_handler: Optional[str] = None,
            initializer_timeout: Optional[float] = None,
            log_group_id: Optional[str] = None,
            log_group_name: Optional[str] = None,
            log_stream_id: Optional[str] = None,
            log_stream_name: Optional[str] = None,
            max_instance_num: Optional[str] = None,
            memory_size: Optional[float] = None,
            mount_user_group_id: Optional[float] = None,
            mount_user_id: Optional[float] = None,
            name: Optional[str] = None,
            network_id: Optional[str] = None,
            package: Optional[str] = None,
            region: Optional[str] = None,
            runtime: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            timeout: Optional[float] = None,
            timeouts: Optional[FgsFunctionTimeoutsArgs] = None,
            user_data: Optional[str] = None,
            version: Optional[str] = None,
            versions: Optional[Sequence[FgsFunctionVersionArgs]] = None,
            vpc_id: Optional[str] = None,
            xrole: Optional[str] = None) -> FgsFunction
    func GetFgsFunction(ctx *Context, name string, id IDInput, state *FgsFunctionState, opts ...ResourceOption) (*FgsFunction, error)
    public static FgsFunction Get(string name, Input<string> id, FgsFunctionState? state, CustomResourceOptions? opts = null)
    public static FgsFunction get(String name, Output<String> id, FgsFunctionState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:FgsFunction    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:
    Agency string
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    App string
    Specifies the group to which the function belongs.
    AppAgency string
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    CodeFilename string
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    CodeType string
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    CodeUrl string
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    CustomImage FgsFunctionCustomImage
    DependLists List<string>
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    DnsList string
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    EnterpriseProjectId string
    Specifies the enterprise project id of the function. Changing this creates a new function.
    FgsFunctionId string
    Specifies a resource ID in UUID format.
    FlexibleengineUrn string
    Uniform Resource Name.
    FuncCode string
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    FuncMounts List<FgsFunctionFuncMount>

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    FunctiongraphVersion string
    Handler string
    Specifies the entry point of the function.
    InitializerHandler string
    Specifies the initializer of the function.
    InitializerTimeout double
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    LogGroupId string
    LogGroupName string
    LogStreamId string
    LogStreamName string
    MaxInstanceNum string
    MemorySize double
    Specifies the memory size(MB) allocated to the function.
    MountUserGroupId double
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    MountUserId double
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    Name string
    Specifies the name of the function.
    NetworkId string

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    Package string

    Deprecated: Deprecated

    Region string
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    Runtime string
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    Tags Dictionary<string, string>
    Timeout double
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    Timeouts FgsFunctionTimeouts
    UserData string
    Version string
    The version of the function.
    Versions List<FgsFunctionVersion>
    The versions management of the function.
    VpcId string
    Specifies the ID of VPC.
    Xrole string

    Deprecated: Deprecated

    Agency string
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    App string
    Specifies the group to which the function belongs.
    AppAgency string
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    CodeFilename string
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    CodeType string
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    CodeUrl string
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    CustomImage FgsFunctionCustomImageArgs
    DependLists []string
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    DnsList string
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    EnterpriseProjectId string
    Specifies the enterprise project id of the function. Changing this creates a new function.
    FgsFunctionId string
    Specifies a resource ID in UUID format.
    FlexibleengineUrn string
    Uniform Resource Name.
    FuncCode string
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    FuncMounts []FgsFunctionFuncMountArgs

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    FunctiongraphVersion string
    Handler string
    Specifies the entry point of the function.
    InitializerHandler string
    Specifies the initializer of the function.
    InitializerTimeout float64
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    LogGroupId string
    LogGroupName string
    LogStreamId string
    LogStreamName string
    MaxInstanceNum string
    MemorySize float64
    Specifies the memory size(MB) allocated to the function.
    MountUserGroupId float64
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    MountUserId float64
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    Name string
    Specifies the name of the function.
    NetworkId string

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    Package string

    Deprecated: Deprecated

    Region string
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    Runtime string
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    Tags map[string]string
    Timeout float64
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    Timeouts FgsFunctionTimeoutsArgs
    UserData string
    Version string
    The version of the function.
    Versions []FgsFunctionVersionArgs
    The versions management of the function.
    VpcId string
    Specifies the ID of VPC.
    Xrole string

    Deprecated: Deprecated

    agency String
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app String
    Specifies the group to which the function belongs.
    appAgency String
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    codeFilename String
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    codeType String
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    codeUrl String
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    customImage FgsFunctionCustomImage
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    dnsList String
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterpriseProjectId String
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgsFunctionId String
    Specifies a resource ID in UUID format.
    flexibleengineUrn String
    Uniform Resource Name.
    funcCode String
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    funcMounts List<FgsFunctionFuncMount>

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraphVersion String
    handler String
    Specifies the entry point of the function.
    initializerHandler String
    Specifies the initializer of the function.
    initializerTimeout Double
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    logGroupId String
    logGroupName String
    logStreamId String
    logStreamName String
    maxInstanceNum String
    memorySize Double
    Specifies the memory size(MB) allocated to the function.
    mountUserGroupId Double
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mountUserId Double
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name String
    Specifies the name of the function.
    networkId String

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package_ String

    Deprecated: Deprecated

    region String
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    runtime String
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    tags Map<String,String>
    timeout Double
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    timeouts FgsFunctionTimeouts
    userData String
    version String
    The version of the function.
    versions List<FgsFunctionVersion>
    The versions management of the function.
    vpcId String
    Specifies the ID of VPC.
    xrole String

    Deprecated: Deprecated

    agency string
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app string
    Specifies the group to which the function belongs.
    appAgency string
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    codeFilename string
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    codeType string
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    codeUrl string
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    customImage FgsFunctionCustomImage
    dependLists string[]
    Specifies the ID list of the dependencies.
    description string
    Specifies the description of the function.
    dnsList string
    encryptedUserData string
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterpriseProjectId string
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgsFunctionId string
    Specifies a resource ID in UUID format.
    flexibleengineUrn string
    Uniform Resource Name.
    funcCode string
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    funcMounts FgsFunctionFuncMount[]

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraphVersion string
    handler string
    Specifies the entry point of the function.
    initializerHandler string
    Specifies the initializer of the function.
    initializerTimeout number
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    logGroupId string
    logGroupName string
    logStreamId string
    logStreamName string
    maxInstanceNum string
    memorySize number
    Specifies the memory size(MB) allocated to the function.
    mountUserGroupId number
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mountUserId number
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name string
    Specifies the name of the function.
    networkId string

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package string

    Deprecated: Deprecated

    region string
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    runtime string
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    tags {[key: string]: string}
    timeout number
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    timeouts FgsFunctionTimeouts
    userData string
    version string
    The version of the function.
    versions FgsFunctionVersion[]
    The versions management of the function.
    vpcId string
    Specifies the ID of VPC.
    xrole string

    Deprecated: Deprecated

    agency str
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app str
    Specifies the group to which the function belongs.
    app_agency str
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    code_filename str
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    code_type str
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    code_url str
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    custom_image FgsFunctionCustomImageArgs
    depend_lists Sequence[str]
    Specifies the ID list of the dependencies.
    description str
    Specifies the description of the function.
    dns_list str
    encrypted_user_data str
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterprise_project_id str
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgs_function_id str
    Specifies a resource ID in UUID format.
    flexibleengine_urn str
    Uniform Resource Name.
    func_code str
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    func_mounts Sequence[FgsFunctionFuncMountArgs]

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraph_version str
    handler str
    Specifies the entry point of the function.
    initializer_handler str
    Specifies the initializer of the function.
    initializer_timeout float
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    log_group_id str
    log_group_name str
    log_stream_id str
    log_stream_name str
    max_instance_num str
    memory_size float
    Specifies the memory size(MB) allocated to the function.
    mount_user_group_id float
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mount_user_id float
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name str
    Specifies the name of the function.
    network_id str

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package str

    Deprecated: Deprecated

    region str
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    runtime str
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    tags Mapping[str, str]
    timeout float
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    timeouts FgsFunctionTimeoutsArgs
    user_data str
    version str
    The version of the function.
    versions Sequence[FgsFunctionVersionArgs]
    The versions management of the function.
    vpc_id str
    Specifies the ID of VPC.
    xrole str

    Deprecated: Deprecated

    agency String
    Specifies the agency. This parameter is mandatory if the function needs to access other cloud services.
    app String
    Specifies the group to which the function belongs.
    appAgency String
    Specifies An execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
    codeFilename String
    Specifies the name of a function file, This field is mandatory only when coe_type is set to jar or zip.
    codeType String
    Specifies the function code type, which can be inline: inline code, zip: ZIP file, jar: JAR file or java functions, obs: function code stored in an OBS bucket.
    codeUrl String
    Specifies the code url. This parameter is mandatory when code_type is set to obs.
    customImage Property Map
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    dnsList String
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function. The format is the same as user_data.
    enterpriseProjectId String
    Specifies the enterprise project id of the function. Changing this creates a new function.
    fgsFunctionId String
    Specifies a resource ID in UUID format.
    flexibleengineUrn String
    Uniform Resource Name.
    funcCode String
    Specifies the function code. When code_type is set to inline, zip, or jar, this parameter is mandatory, and the code can be encoded using Base64 or just with the text code.
    funcMounts List<Property Map>

    Specifies the file system list. The func_mounts object structure is documented below.

    The func_mounts block supports:

    functiongraphVersion String
    handler String
    Specifies the entry point of the function.
    initializerHandler String
    Specifies the initializer of the function.
    initializerTimeout Number
    Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
    logGroupId String
    logGroupName String
    logStreamId String
    logStreamName String
    maxInstanceNum String
    memorySize Number
    Specifies the memory size(MB) allocated to the function.
    mountUserGroupId Number
    Specifies the user group ID, a non-0 integer from –1 to 65534. Default to -1.
    mountUserId Number
    Specifies the user ID, a non-0 integer from –1 to 65534. Default to -1.
    name String
    Specifies the name of the function.
    networkId String

    Specifies the network ID of subnet.

    NOTE: An agency with VPC management permissions must be specified for the function.

    package String

    Deprecated: Deprecated

    region String
    Specifies the region in which to create the Function resource. If omitted, the provider-level region will be used. Changing this creates a new Function resource.
    runtime String
    Specifies the environment for executing the function. Changing this creates a new Function resource.
    tags Map<String>
    timeout Number
    Specifies the timeout interval of the function, ranges from 3s to 900s.
    timeouts Property Map
    userData String
    version String
    The version of the function.
    versions List<Property Map>
    The versions management of the function.
    vpcId String
    Specifies the ID of VPC.
    xrole String

    Deprecated: Deprecated

    Supporting Types

    FgsFunctionCustomImage, FgsFunctionCustomImageArgs

    Url string
    Url string
    url String
    url string
    url str
    url String

    FgsFunctionFuncMount, FgsFunctionFuncMountArgs

    LocalMountPath string
    Specifies the function access path.
    MountResource string
    Specifies the ID of the mounted resource (corresponding cloud service).
    MountSharePath string
    Specifies the remote mount path. Example: 192.168.0.12:/data.
    MountType string
    Specifies the mount type. Options: sfs, sfsTurbo, and ecs.
    Status string
    The status of file system.
    LocalMountPath string
    Specifies the function access path.
    MountResource string
    Specifies the ID of the mounted resource (corresponding cloud service).
    MountSharePath string
    Specifies the remote mount path. Example: 192.168.0.12:/data.
    MountType string
    Specifies the mount type. Options: sfs, sfsTurbo, and ecs.
    Status string
    The status of file system.
    localMountPath String
    Specifies the function access path.
    mountResource String
    Specifies the ID of the mounted resource (corresponding cloud service).
    mountSharePath String
    Specifies the remote mount path. Example: 192.168.0.12:/data.
    mountType String
    Specifies the mount type. Options: sfs, sfsTurbo, and ecs.
    status String
    The status of file system.
    localMountPath string
    Specifies the function access path.
    mountResource string
    Specifies the ID of the mounted resource (corresponding cloud service).
    mountSharePath string
    Specifies the remote mount path. Example: 192.168.0.12:/data.
    mountType string
    Specifies the mount type. Options: sfs, sfsTurbo, and ecs.
    status string
    The status of file system.
    local_mount_path str
    Specifies the function access path.
    mount_resource str
    Specifies the ID of the mounted resource (corresponding cloud service).
    mount_share_path str
    Specifies the remote mount path. Example: 192.168.0.12:/data.
    mount_type str
    Specifies the mount type. Options: sfs, sfsTurbo, and ecs.
    status str
    The status of file system.
    localMountPath String
    Specifies the function access path.
    mountResource String
    Specifies the ID of the mounted resource (corresponding cloud service).
    mountSharePath String
    Specifies the remote mount path. Example: 192.168.0.12:/data.
    mountType String
    Specifies the mount type. Options: sfs, sfsTurbo, and ecs.
    status String
    The status of file system.

    FgsFunctionTimeouts, FgsFunctionTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    FgsFunctionVersion, FgsFunctionVersionArgs

    Name string
    Specifies the name of the function.
    Aliases FgsFunctionVersionAliases
    The aliases management for specified version.
    Name string
    Specifies the name of the function.
    Aliases FgsFunctionVersionAliases
    The aliases management for specified version.
    name String
    Specifies the name of the function.
    aliases FgsFunctionVersionAliases
    The aliases management for specified version.
    name string
    Specifies the name of the function.
    aliases FgsFunctionVersionAliases
    The aliases management for specified version.
    name str
    Specifies the name of the function.
    aliases FgsFunctionVersionAliases
    The aliases management for specified version.
    name String
    Specifies the name of the function.
    aliases Property Map
    The aliases management for specified version.

    FgsFunctionVersionAliases, FgsFunctionVersionAliasesArgs

    Name string
    Specifies the name of the function.
    Description string
    Specifies the description of the function.
    Name string
    Specifies the name of the function.
    Description string
    Specifies the description of the function.
    name String
    Specifies the name of the function.
    description String
    Specifies the description of the function.
    name string
    Specifies the name of the function.
    description string
    Specifies the description of the function.
    name str
    Specifies the name of the function.
    description str
    Specifies the description of the function.
    name String
    Specifies the name of the function.
    description String
    Specifies the description of the function.

    Import

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

    $ pulumi import flexibleengine:index/fgsFunction:FgsFunction my-func 7117d38e-4c8f-4624-a505-bd96b97d024c
    

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud