1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. FgsFunctionV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.FgsFunctionV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for FGS you can get at documentation portal

    Manages a V2 function graph resource within OpenTelekomCloud.

    Example Usage

    With text code

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const functionName = config.requireObject("functionName");
    const agencyName = config.requireObject("agencyName");
    const test = new opentelekomcloud.FgsFunctionV2("test", {
        app: "default",
        agency: agencyName,
        handler: "test.handler",
        memorySize: 128,
        timeout: 3,
        runtime: "Python2.7",
        codeType: "inline",
        funcCode: `# -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            "statusCode": 200,
            "isBase64Encoded": False,
            "body": json.dumps(event),
            "headers": {
                "Content-Type": "application/json"
            }
        }
    `,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    function_name = config.require_object("functionName")
    agency_name = config.require_object("agencyName")
    test = opentelekomcloud.FgsFunctionV2("test",
        app="default",
        agency=agency_name,
        handler="test.handler",
        memory_size=128,
        timeout=3,
        runtime="Python2.7",
        code_type="inline",
        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"
            }
        }
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"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, "")
    		functionName := cfg.RequireObject("functionName")
    		agencyName := cfg.RequireObject("agencyName")
    		_, err := opentelekomcloud.NewFgsFunctionV2(ctx, "test", &opentelekomcloud.FgsFunctionV2Args{
    			App:        pulumi.String("default"),
    			Agency:     pulumi.Any(agencyName),
    			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(`# -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            "statusCode": 200,
            "isBase64Encoded": False,
            "body": json.dumps(event),
            "headers": {
                "Content-Type": "application/json"
            }
        }
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var functionName = config.RequireObject<dynamic>("functionName");
        var agencyName = config.RequireObject<dynamic>("agencyName");
        var test = new Opentelekomcloud.FgsFunctionV2("test", new()
        {
            App = "default",
            Agency = agencyName,
            Handler = "test.handler",
            MemorySize = 128,
            Timeout = 3,
            Runtime = "Python2.7",
            CodeType = "inline",
            FuncCode = @"# -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            ""statusCode"": 200,
            ""isBase64Encoded"": False,
            ""body"": json.dumps(event),
            ""headers"": {
                ""Content-Type"": ""application/json""
            }
        }
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.FgsFunctionV2;
    import com.pulumi.opentelekomcloud.FgsFunctionV2Args;
    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 functionName = config.get("functionName");
            final var agencyName = config.get("agencyName");
            var test = new FgsFunctionV2("test", FgsFunctionV2Args.builder()
                .app("default")
                .agency(agencyName)
                .handler("test.handler")
                .memorySize(128)
                .timeout(3)
                .runtime("Python2.7")
                .codeType("inline")
                .funcCode("""
    # -*- coding:utf-8 -*-
    import json
    def handler (event, context):
        return {
            "statusCode": 200,
            "isBase64Encoded": False,
            "body": json.dumps(event),
            "headers": {
                "Content-Type": "application/json"
            }
        }
                """)
                .build());
    
        }
    }
    
    configuration:
      functionName:
        type: dynamic
      agencyName:
        type: dynamic
    resources:
      test:
        type: opentelekomcloud:FgsFunctionV2
        properties:
          app: default
          agency: ${agencyName}
          handler: test.handler
          memorySize: 128
          timeout: 3
          runtime: Python2.7
          codeType: inline
          funcCode: |
            # -*- coding:utf-8 -*-
            import json
            def handler (event, context):
                return {
                    "statusCode": 200,
                    "isBase64Encoded": False,
                    "body": json.dumps(event),
                    "headers": {
                        "Content-Type": "application/json"
                    }
                }        
    

    Create function using SWR image

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const functionName = config.requireObject("functionName");
    const agencyName = config.requireObject("agencyName");
    const imageUrl = config.requireObject("imageUrl");
    const bySwrImage = new opentelekomcloud.FgsFunctionV2("bySwrImage", {
        agency: agencyName,
        handler: "-",
        app: "default",
        runtime: "Custom Image",
        memorySize: 128,
        timeout: 3,
        customImage: {
            url: imageUrl,
        },
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    function_name = config.require_object("functionName")
    agency_name = config.require_object("agencyName")
    image_url = config.require_object("imageUrl")
    by_swr_image = opentelekomcloud.FgsFunctionV2("bySwrImage",
        agency=agency_name,
        handler="-",
        app="default",
        runtime="Custom Image",
        memory_size=128,
        timeout=3,
        custom_image={
            "url": image_url,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"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, "")
    		functionName := cfg.RequireObject("functionName")
    		agencyName := cfg.RequireObject("agencyName")
    		imageUrl := cfg.RequireObject("imageUrl")
    		_, err := opentelekomcloud.NewFgsFunctionV2(ctx, "bySwrImage", &opentelekomcloud.FgsFunctionV2Args{
    			Agency:     pulumi.Any(agencyName),
    			Handler:    pulumi.String("-"),
    			App:        pulumi.String("default"),
    			Runtime:    pulumi.String("Custom Image"),
    			MemorySize: pulumi.Float64(128),
    			Timeout:    pulumi.Float64(3),
    			CustomImage: &opentelekomcloud.FgsFunctionV2CustomImageArgs{
    				Url: pulumi.Any(imageUrl),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var functionName = config.RequireObject<dynamic>("functionName");
        var agencyName = config.RequireObject<dynamic>("agencyName");
        var imageUrl = config.RequireObject<dynamic>("imageUrl");
        var bySwrImage = new Opentelekomcloud.FgsFunctionV2("bySwrImage", new()
        {
            Agency = agencyName,
            Handler = "-",
            App = "default",
            Runtime = "Custom Image",
            MemorySize = 128,
            Timeout = 3,
            CustomImage = new Opentelekomcloud.Inputs.FgsFunctionV2CustomImageArgs
            {
                Url = imageUrl,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.FgsFunctionV2;
    import com.pulumi.opentelekomcloud.FgsFunctionV2Args;
    import com.pulumi.opentelekomcloud.inputs.FgsFunctionV2CustomImageArgs;
    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 functionName = config.get("functionName");
            final var agencyName = config.get("agencyName");
            final var imageUrl = config.get("imageUrl");
            var bySwrImage = new FgsFunctionV2("bySwrImage", FgsFunctionV2Args.builder()
                .agency(agencyName)
                .handler("-")
                .app("default")
                .runtime("Custom Image")
                .memorySize(128)
                .timeout(3)
                .customImage(FgsFunctionV2CustomImageArgs.builder()
                    .url(imageUrl)
                    .build())
                .build());
    
        }
    }
    
    configuration:
      functionName:
        type: dynamic
      agencyName:
        type: dynamic
      # The agent name that authorizes FunctionGraph service SWR administrator privilege
      imageUrl:
        type: dynamic
    resources:
      bySwrImage:
        type: opentelekomcloud:FgsFunctionV2
        properties:
          agency: ${agencyName}
          handler: '-'
          app: default
          runtime: Custom Image
          memorySize: 128
          timeout: 3
          customImage:
            url: ${imageUrl}
    

    Create FgsFunctionV2 Resource

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

    Constructor syntax

    new FgsFunctionV2(name: string, args: FgsFunctionV2Args, opts?: CustomResourceOptions);
    @overload
    def FgsFunctionV2(resource_name: str,
                      args: FgsFunctionV2Args,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def FgsFunctionV2(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,
                      log_group_name: Optional[str] = None,
                      code_url: Optional[str] = None,
                      concurrency_num: Optional[float] = None,
                      custom_image: Optional[FgsFunctionV2CustomImageArgs] = None,
                      depend_lists: Optional[Sequence[str]] = None,
                      description: Optional[str] = None,
                      encrypted_user_data: Optional[str] = None,
                      fgs_function_v2_id: Optional[str] = None,
                      func_code: Optional[str] = None,
                      log_topic_id: Optional[str] = None,
                      functiongraph_version: Optional[str] = None,
                      gpu_memory: Optional[float] = None,
                      handler: Optional[str] = None,
                      initializer_handler: Optional[str] = None,
                      agency: Optional[str] = None,
                      code_type: Optional[str] = None,
                      log_group_id: Optional[str] = None,
                      func_mounts: Optional[Sequence[FgsFunctionV2FuncMountArgs]] = None,
                      log_topic_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,
                      reserved_instances: Optional[Sequence[FgsFunctionV2ReservedInstanceArgs]] = None,
                      app_agency: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      app: Optional[str] = None,
                      timeouts: Optional[FgsFunctionV2TimeoutsArgs] = None,
                      user_data: Optional[str] = None,
                      versions: Optional[Sequence[FgsFunctionV2VersionArgs]] = None,
                      vpc_id: Optional[str] = None)
    func NewFgsFunctionV2(ctx *Context, name string, args FgsFunctionV2Args, opts ...ResourceOption) (*FgsFunctionV2, error)
    public FgsFunctionV2(string name, FgsFunctionV2Args args, CustomResourceOptions? opts = null)
    public FgsFunctionV2(String name, FgsFunctionV2Args args)
    public FgsFunctionV2(String name, FgsFunctionV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:FgsFunctionV2
    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 FgsFunctionV2Args
    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 FgsFunctionV2Args
    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 FgsFunctionV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FgsFunctionV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FgsFunctionV2Args
    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 fgsFunctionV2Resource = new Opentelekomcloud.FgsFunctionV2("fgsFunctionV2Resource", new()
    {
        MemorySize = 0,
        Timeout = 0,
        Runtime = "string",
        InitializerTimeout = 0,
        LogGroupName = "string",
        CodeUrl = "string",
        ConcurrencyNum = 0,
        CustomImage = new Opentelekomcloud.Inputs.FgsFunctionV2CustomImageArgs
        {
            Url = "string",
        },
        DependLists = new[]
        {
            "string",
        },
        Description = "string",
        EncryptedUserData = "string",
        FgsFunctionV2Id = "string",
        FuncCode = "string",
        LogTopicId = "string",
        FunctiongraphVersion = "string",
        GpuMemory = 0,
        Handler = "string",
        InitializerHandler = "string",
        Agency = "string",
        CodeType = "string",
        LogGroupId = "string",
        FuncMounts = new[]
        {
            new Opentelekomcloud.Inputs.FgsFunctionV2FuncMountArgs
            {
                LocalMountPath = "string",
                MountResource = "string",
                MountSharePath = "string",
                MountType = "string",
            },
        },
        LogTopicName = "string",
        MaxInstanceNum = "string",
        CodeFilename = "string",
        MountUserGroupId = 0,
        MountUserId = 0,
        Name = "string",
        NetworkId = "string",
        ReservedInstances = new[]
        {
            new Opentelekomcloud.Inputs.FgsFunctionV2ReservedInstanceArgs
            {
                Count = 0,
                QualifierName = "string",
                QualifierType = "string",
                IdleMode = false,
                TacticsConfig = new Opentelekomcloud.Inputs.FgsFunctionV2ReservedInstanceTacticsConfigArgs
                {
                    CronConfigs = new[]
                    {
                        new Opentelekomcloud.Inputs.FgsFunctionV2ReservedInstanceTacticsConfigCronConfigArgs
                        {
                            Count = 0,
                            Cron = "string",
                            ExpiredTime = 0,
                            Name = "string",
                            StartTime = 0,
                        },
                    },
                },
            },
        },
        AppAgency = "string",
        Tags = 
        {
            { "string", "string" },
        },
        App = "string",
        Timeouts = new Opentelekomcloud.Inputs.FgsFunctionV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        UserData = "string",
        Versions = new[]
        {
            new Opentelekomcloud.Inputs.FgsFunctionV2VersionArgs
            {
                Name = "string",
                Aliases = new Opentelekomcloud.Inputs.FgsFunctionV2VersionAliasesArgs
                {
                    Name = "string",
                    Description = "string",
                },
            },
        },
        VpcId = "string",
    });
    
    example, err := opentelekomcloud.NewFgsFunctionV2(ctx, "fgsFunctionV2Resource", &opentelekomcloud.FgsFunctionV2Args{
    	MemorySize:         pulumi.Float64(0),
    	Timeout:            pulumi.Float64(0),
    	Runtime:            pulumi.String("string"),
    	InitializerTimeout: pulumi.Float64(0),
    	LogGroupName:       pulumi.String("string"),
    	CodeUrl:            pulumi.String("string"),
    	ConcurrencyNum:     pulumi.Float64(0),
    	CustomImage: &opentelekomcloud.FgsFunctionV2CustomImageArgs{
    		Url: pulumi.String("string"),
    	},
    	DependLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description:          pulumi.String("string"),
    	EncryptedUserData:    pulumi.String("string"),
    	FgsFunctionV2Id:      pulumi.String("string"),
    	FuncCode:             pulumi.String("string"),
    	LogTopicId:           pulumi.String("string"),
    	FunctiongraphVersion: pulumi.String("string"),
    	GpuMemory:            pulumi.Float64(0),
    	Handler:              pulumi.String("string"),
    	InitializerHandler:   pulumi.String("string"),
    	Agency:               pulumi.String("string"),
    	CodeType:             pulumi.String("string"),
    	LogGroupId:           pulumi.String("string"),
    	FuncMounts: opentelekomcloud.FgsFunctionV2FuncMountArray{
    		&opentelekomcloud.FgsFunctionV2FuncMountArgs{
    			LocalMountPath: pulumi.String("string"),
    			MountResource:  pulumi.String("string"),
    			MountSharePath: pulumi.String("string"),
    			MountType:      pulumi.String("string"),
    		},
    	},
    	LogTopicName:     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"),
    	ReservedInstances: opentelekomcloud.FgsFunctionV2ReservedInstanceArray{
    		&opentelekomcloud.FgsFunctionV2ReservedInstanceArgs{
    			Count:         pulumi.Float64(0),
    			QualifierName: pulumi.String("string"),
    			QualifierType: pulumi.String("string"),
    			IdleMode:      pulumi.Bool(false),
    			TacticsConfig: &opentelekomcloud.FgsFunctionV2ReservedInstanceTacticsConfigArgs{
    				CronConfigs: opentelekomcloud.FgsFunctionV2ReservedInstanceTacticsConfigCronConfigArray{
    					&opentelekomcloud.FgsFunctionV2ReservedInstanceTacticsConfigCronConfigArgs{
    						Count:       pulumi.Float64(0),
    						Cron:        pulumi.String("string"),
    						ExpiredTime: pulumi.Float64(0),
    						Name:        pulumi.String("string"),
    						StartTime:   pulumi.Float64(0),
    					},
    				},
    			},
    		},
    	},
    	AppAgency: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	App: pulumi.String("string"),
    	Timeouts: &opentelekomcloud.FgsFunctionV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	UserData: pulumi.String("string"),
    	Versions: opentelekomcloud.FgsFunctionV2VersionArray{
    		&opentelekomcloud.FgsFunctionV2VersionArgs{
    			Name: pulumi.String("string"),
    			Aliases: &opentelekomcloud.FgsFunctionV2VersionAliasesArgs{
    				Name:        pulumi.String("string"),
    				Description: pulumi.String("string"),
    			},
    		},
    	},
    	VpcId: pulumi.String("string"),
    })
    
    var fgsFunctionV2Resource = new FgsFunctionV2("fgsFunctionV2Resource", FgsFunctionV2Args.builder()
        .memorySize(0)
        .timeout(0)
        .runtime("string")
        .initializerTimeout(0)
        .logGroupName("string")
        .codeUrl("string")
        .concurrencyNum(0)
        .customImage(FgsFunctionV2CustomImageArgs.builder()
            .url("string")
            .build())
        .dependLists("string")
        .description("string")
        .encryptedUserData("string")
        .fgsFunctionV2Id("string")
        .funcCode("string")
        .logTopicId("string")
        .functiongraphVersion("string")
        .gpuMemory(0)
        .handler("string")
        .initializerHandler("string")
        .agency("string")
        .codeType("string")
        .logGroupId("string")
        .funcMounts(FgsFunctionV2FuncMountArgs.builder()
            .localMountPath("string")
            .mountResource("string")
            .mountSharePath("string")
            .mountType("string")
            .build())
        .logTopicName("string")
        .maxInstanceNum("string")
        .codeFilename("string")
        .mountUserGroupId(0)
        .mountUserId(0)
        .name("string")
        .networkId("string")
        .reservedInstances(FgsFunctionV2ReservedInstanceArgs.builder()
            .count(0)
            .qualifierName("string")
            .qualifierType("string")
            .idleMode(false)
            .tacticsConfig(FgsFunctionV2ReservedInstanceTacticsConfigArgs.builder()
                .cronConfigs(FgsFunctionV2ReservedInstanceTacticsConfigCronConfigArgs.builder()
                    .count(0)
                    .cron("string")
                    .expiredTime(0)
                    .name("string")
                    .startTime(0)
                    .build())
                .build())
            .build())
        .appAgency("string")
        .tags(Map.of("string", "string"))
        .app("string")
        .timeouts(FgsFunctionV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .userData("string")
        .versions(FgsFunctionV2VersionArgs.builder()
            .name("string")
            .aliases(FgsFunctionV2VersionAliasesArgs.builder()
                .name("string")
                .description("string")
                .build())
            .build())
        .vpcId("string")
        .build());
    
    fgs_function_v2_resource = opentelekomcloud.FgsFunctionV2("fgsFunctionV2Resource",
        memory_size=0,
        timeout=0,
        runtime="string",
        initializer_timeout=0,
        log_group_name="string",
        code_url="string",
        concurrency_num=0,
        custom_image={
            "url": "string",
        },
        depend_lists=["string"],
        description="string",
        encrypted_user_data="string",
        fgs_function_v2_id="string",
        func_code="string",
        log_topic_id="string",
        functiongraph_version="string",
        gpu_memory=0,
        handler="string",
        initializer_handler="string",
        agency="string",
        code_type="string",
        log_group_id="string",
        func_mounts=[{
            "local_mount_path": "string",
            "mount_resource": "string",
            "mount_share_path": "string",
            "mount_type": "string",
        }],
        log_topic_name="string",
        max_instance_num="string",
        code_filename="string",
        mount_user_group_id=0,
        mount_user_id=0,
        name="string",
        network_id="string",
        reserved_instances=[{
            "count": 0,
            "qualifier_name": "string",
            "qualifier_type": "string",
            "idle_mode": False,
            "tactics_config": {
                "cron_configs": [{
                    "count": 0,
                    "cron": "string",
                    "expired_time": 0,
                    "name": "string",
                    "start_time": 0,
                }],
            },
        }],
        app_agency="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 fgsFunctionV2Resource = new opentelekomcloud.FgsFunctionV2("fgsFunctionV2Resource", {
        memorySize: 0,
        timeout: 0,
        runtime: "string",
        initializerTimeout: 0,
        logGroupName: "string",
        codeUrl: "string",
        concurrencyNum: 0,
        customImage: {
            url: "string",
        },
        dependLists: ["string"],
        description: "string",
        encryptedUserData: "string",
        fgsFunctionV2Id: "string",
        funcCode: "string",
        logTopicId: "string",
        functiongraphVersion: "string",
        gpuMemory: 0,
        handler: "string",
        initializerHandler: "string",
        agency: "string",
        codeType: "string",
        logGroupId: "string",
        funcMounts: [{
            localMountPath: "string",
            mountResource: "string",
            mountSharePath: "string",
            mountType: "string",
        }],
        logTopicName: "string",
        maxInstanceNum: "string",
        codeFilename: "string",
        mountUserGroupId: 0,
        mountUserId: 0,
        name: "string",
        networkId: "string",
        reservedInstances: [{
            count: 0,
            qualifierName: "string",
            qualifierType: "string",
            idleMode: false,
            tacticsConfig: {
                cronConfigs: [{
                    count: 0,
                    cron: "string",
                    expiredTime: 0,
                    name: "string",
                    startTime: 0,
                }],
            },
        }],
        appAgency: "string",
        tags: {
            string: "string",
        },
        app: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        userData: "string",
        versions: [{
            name: "string",
            aliases: {
                name: "string",
                description: "string",
            },
        }],
        vpcId: "string",
    });
    
    type: opentelekomcloud:FgsFunctionV2
    properties:
        agency: string
        app: string
        appAgency: string
        codeFilename: string
        codeType: string
        codeUrl: string
        concurrencyNum: 0
        customImage:
            url: string
        dependLists:
            - string
        description: string
        encryptedUserData: string
        fgsFunctionV2Id: string
        funcCode: string
        funcMounts:
            - localMountPath: string
              mountResource: string
              mountSharePath: string
              mountType: string
        functiongraphVersion: string
        gpuMemory: 0
        handler: string
        initializerHandler: string
        initializerTimeout: 0
        logGroupId: string
        logGroupName: string
        logTopicId: string
        logTopicName: string
        maxInstanceNum: string
        memorySize: 0
        mountUserGroupId: 0
        mountUserId: 0
        name: string
        networkId: string
        reservedInstances:
            - count: 0
              idleMode: false
              qualifierName: string
              qualifierType: string
              tacticsConfig:
                cronConfigs:
                    - count: 0
                      cron: string
                      expiredTime: 0
                      name: string
                      startTime: 0
        runtime: string
        tags:
            string: string
        timeout: 0
        timeouts:
            create: string
            delete: string
        userData: string
        versions:
            - aliases:
                description: string
                name: string
              name: string
        vpcId: string
    

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

    MemorySize double
    Specifies the memory size allocated to the function, in MByte (MB).
    Runtime string
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    Timeout double
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    CodeUrl string
    Specifies the code url. Required if the code_type is set to obs.
    ConcurrencyNum double
    CustomImage FgsFunctionV2CustomImage
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    DependLists List<string>
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function.
    FgsFunctionV2Id string
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    FuncCode string
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    FuncMounts List<FgsFunctionV2FuncMount>
    Specifies the file system list. The func_mounts object structure is documented below.
    FunctiongraphVersion string
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    GpuMemory double
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    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
    Specifies the ID of the LTS log group.
    LogGroupName string
    Specifies the name of the LTS log group.
    LogTopicId string
    Specifies the ID of the LTS log stream.
    LogTopicName string
    Specifies the name of the LTS stream.
    MaxInstanceNum string
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    MountUserGroupId double
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    MountUserId double
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    Name string
    Specifies the name of the function. Changing this will create a new resource.
    NetworkId string
    Specifies the network ID of subnet.
    ReservedInstances List<FgsFunctionV2ReservedInstance>
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    Tags Dictionary<string, string>
    Specifies the key/value pairs to associate with the function.
    Timeouts FgsFunctionV2Timeouts
    UserData string
    Specifies the Key/Value information defined for the function.
    Versions List<FgsFunctionV2Version>
    Specifies the versions management of the function. The versions structure is documented below.
    VpcId string
    Specifies the ID of VPC.
    MemorySize float64
    Specifies the memory size allocated to the function, in MByte (MB).
    Runtime string
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    Timeout float64
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    CodeUrl string
    Specifies the code url. Required if the code_type is set to obs.
    ConcurrencyNum float64
    CustomImage FgsFunctionV2CustomImageArgs
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    DependLists []string
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function.
    FgsFunctionV2Id string
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    FuncCode string
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    FuncMounts []FgsFunctionV2FuncMountArgs
    Specifies the file system list. The func_mounts object structure is documented below.
    FunctiongraphVersion string
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    GpuMemory float64
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    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
    Specifies the ID of the LTS log group.
    LogGroupName string
    Specifies the name of the LTS log group.
    LogTopicId string
    Specifies the ID of the LTS log stream.
    LogTopicName string
    Specifies the name of the LTS stream.
    MaxInstanceNum string
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    MountUserGroupId float64
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    MountUserId float64
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    Name string
    Specifies the name of the function. Changing this will create a new resource.
    NetworkId string
    Specifies the network ID of subnet.
    ReservedInstances []FgsFunctionV2ReservedInstanceArgs
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    Tags map[string]string
    Specifies the key/value pairs to associate with the function.
    Timeouts FgsFunctionV2TimeoutsArgs
    UserData string
    Specifies the Key/Value information defined for the function.
    Versions []FgsFunctionV2VersionArgs
    Specifies the versions management of the function. The versions structure is documented below.
    VpcId string
    Specifies the ID of VPC.
    memorySize Double
    Specifies the memory size allocated to the function, in MByte (MB).
    runtime String
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    timeout Double
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    codeUrl String
    Specifies the code url. Required if the code_type is set to obs.
    concurrencyNum Double
    customImage FgsFunctionV2CustomImage
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function.
    fgsFunctionV2Id String
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    funcCode String
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    funcMounts List<FgsFunctionV2FuncMount>
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraphVersion String
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpuMemory Double
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    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
    Specifies the ID of the LTS log group.
    logGroupName String
    Specifies the name of the LTS log group.
    logTopicId String
    Specifies the ID of the LTS log stream.
    logTopicName String
    Specifies the name of the LTS stream.
    maxInstanceNum String
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    mountUserGroupId Double
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mountUserId Double
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name String
    Specifies the name of the function. Changing this will create a new resource.
    networkId String
    Specifies the network ID of subnet.
    reservedInstances List<FgsFunctionV2ReservedInstance>
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    tags Map<String,String>
    Specifies the key/value pairs to associate with the function.
    timeouts FgsFunctionV2Timeouts
    userData String
    Specifies the Key/Value information defined for the function.
    versions List<FgsFunctionV2Version>
    Specifies the versions management of the function. The versions structure is documented below.
    vpcId String
    Specifies the ID of VPC.
    memorySize number
    Specifies the memory size allocated to the function, in MByte (MB).
    runtime string
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    timeout number
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    codeUrl string
    Specifies the code url. Required if the code_type is set to obs.
    concurrencyNum number
    customImage FgsFunctionV2CustomImage
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    dependLists string[]
    Specifies the ID list of the dependencies.
    description string
    Specifies the description of the function.
    encryptedUserData string
    Specifies the key/value information defined to be encrypted for the function.
    fgsFunctionV2Id string
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    funcCode string
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    funcMounts FgsFunctionV2FuncMount[]
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraphVersion string
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpuMemory number
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    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
    Specifies the ID of the LTS log group.
    logGroupName string
    Specifies the name of the LTS log group.
    logTopicId string
    Specifies the ID of the LTS log stream.
    logTopicName string
    Specifies the name of the LTS stream.
    maxInstanceNum string
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    mountUserGroupId number
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mountUserId number
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name string
    Specifies the name of the function. Changing this will create a new resource.
    networkId string
    Specifies the network ID of subnet.
    reservedInstances FgsFunctionV2ReservedInstance[]
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    tags {[key: string]: string}
    Specifies the key/value pairs to associate with the function.
    timeouts FgsFunctionV2Timeouts
    userData string
    Specifies the Key/Value information defined for the function.
    versions FgsFunctionV2Version[]
    Specifies the versions management of the function. The versions structure is documented below.
    vpcId string
    Specifies the ID of VPC.
    memory_size float
    Specifies the memory size allocated to the function, in MByte (MB).
    runtime str
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    timeout float
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    code_url str
    Specifies the code url. Required if the code_type is set to obs.
    concurrency_num float
    custom_image FgsFunctionV2CustomImageArgs
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    depend_lists Sequence[str]
    Specifies the ID list of the dependencies.
    description str
    Specifies the description of the function.
    encrypted_user_data str
    Specifies the key/value information defined to be encrypted for the function.
    fgs_function_v2_id str
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    func_code str
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    func_mounts Sequence[FgsFunctionV2FuncMountArgs]
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraph_version str
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpu_memory float
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    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
    Specifies the ID of the LTS log group.
    log_group_name str
    Specifies the name of the LTS log group.
    log_topic_id str
    Specifies the ID of the LTS log stream.
    log_topic_name str
    Specifies the name of the LTS stream.
    max_instance_num str
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    mount_user_group_id float
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mount_user_id float
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name str
    Specifies the name of the function. Changing this will create a new resource.
    network_id str
    Specifies the network ID of subnet.
    reserved_instances Sequence[FgsFunctionV2ReservedInstanceArgs]
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    tags Mapping[str, str]
    Specifies the key/value pairs to associate with the function.
    timeouts FgsFunctionV2TimeoutsArgs
    user_data str
    Specifies the Key/Value information defined for the function.
    versions Sequence[FgsFunctionV2VersionArgs]
    Specifies the versions management of the function. The versions structure is documented below.
    vpc_id str
    Specifies the ID of VPC.
    memorySize Number
    Specifies the memory size allocated to the function, in MByte (MB).
    runtime String
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    timeout Number
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    codeUrl String
    Specifies the code url. Required if the code_type is set to obs.
    concurrencyNum Number
    customImage Property Map
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function.
    fgsFunctionV2Id String
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    funcCode String
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    funcMounts List<Property Map>
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraphVersion String
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpuMemory Number
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    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
    Specifies the ID of the LTS log group.
    logGroupName String
    Specifies the name of the LTS log group.
    logTopicId String
    Specifies the ID of the LTS log stream.
    logTopicName String
    Specifies the name of the LTS stream.
    maxInstanceNum String
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    mountUserGroupId Number
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mountUserId Number
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name String
    Specifies the name of the function. Changing this will create a new resource.
    networkId String
    Specifies the network ID of subnet.
    reservedInstances List<Property Map>
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    tags Map<String>
    Specifies the key/value pairs to associate with the function.
    timeouts Property Map
    userData String
    Specifies the Key/Value information defined for the function.
    versions List<Property Map>
    Specifies the versions management of the function. The versions structure is documented below.
    vpcId String
    Specifies the ID of VPC.

    Outputs

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

    DnsList string
    The private DNS configuration of the function network.
    GpuType string
    Id string
    The provider-assigned unique ID for this managed resource.
    OpentelekomcloudUrn string
    Uniform Resource Name.
    Region string
    The region in which function graph resource is created.
    Version string
    The version of the function.
    DnsList string
    The private DNS configuration of the function network.
    GpuType string
    Id string
    The provider-assigned unique ID for this managed resource.
    OpentelekomcloudUrn string
    Uniform Resource Name.
    Region string
    The region in which function graph resource is created.
    Version string
    The version of the function.
    dnsList String
    The private DNS configuration of the function network.
    gpuType String
    id String
    The provider-assigned unique ID for this managed resource.
    opentelekomcloudUrn String
    Uniform Resource Name.
    region String
    The region in which function graph resource is created.
    version String
    The version of the function.
    dnsList string
    The private DNS configuration of the function network.
    gpuType string
    id string
    The provider-assigned unique ID for this managed resource.
    opentelekomcloudUrn string
    Uniform Resource Name.
    region string
    The region in which function graph resource is created.
    version string
    The version of the function.
    dns_list str
    The private DNS configuration of the function network.
    gpu_type str
    id str
    The provider-assigned unique ID for this managed resource.
    opentelekomcloud_urn str
    Uniform Resource Name.
    region str
    The region in which function graph resource is created.
    version str
    The version of the function.
    dnsList String
    The private DNS configuration of the function network.
    gpuType String
    id String
    The provider-assigned unique ID for this managed resource.
    opentelekomcloudUrn String
    Uniform Resource Name.
    region String
    The region in which function graph resource is created.
    version String
    The version of the function.

    Look up Existing FgsFunctionV2 Resource

    Get an existing FgsFunctionV2 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?: FgsFunctionV2State, opts?: CustomResourceOptions): FgsFunctionV2
    @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,
            concurrency_num: Optional[float] = None,
            custom_image: Optional[FgsFunctionV2CustomImageArgs] = None,
            depend_lists: Optional[Sequence[str]] = None,
            description: Optional[str] = None,
            dns_list: Optional[str] = None,
            encrypted_user_data: Optional[str] = None,
            fgs_function_v2_id: Optional[str] = None,
            func_code: Optional[str] = None,
            func_mounts: Optional[Sequence[FgsFunctionV2FuncMountArgs]] = None,
            functiongraph_version: Optional[str] = None,
            gpu_memory: Optional[float] = None,
            gpu_type: 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_topic_id: Optional[str] = None,
            log_topic_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,
            opentelekomcloud_urn: Optional[str] = None,
            region: Optional[str] = None,
            reserved_instances: Optional[Sequence[FgsFunctionV2ReservedInstanceArgs]] = None,
            runtime: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            timeout: Optional[float] = None,
            timeouts: Optional[FgsFunctionV2TimeoutsArgs] = None,
            user_data: Optional[str] = None,
            version: Optional[str] = None,
            versions: Optional[Sequence[FgsFunctionV2VersionArgs]] = None,
            vpc_id: Optional[str] = None) -> FgsFunctionV2
    func GetFgsFunctionV2(ctx *Context, name string, id IDInput, state *FgsFunctionV2State, opts ...ResourceOption) (*FgsFunctionV2, error)
    public static FgsFunctionV2 Get(string name, Input<string> id, FgsFunctionV2State? state, CustomResourceOptions? opts = null)
    public static FgsFunctionV2 get(String name, Output<String> id, FgsFunctionV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:FgsFunctionV2    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    CodeUrl string
    Specifies the code url. Required if the code_type is set to obs.
    ConcurrencyNum double
    CustomImage FgsFunctionV2CustomImage
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    DependLists List<string>
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    DnsList string
    The private DNS configuration of the function network.
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function.
    FgsFunctionV2Id string
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    FuncCode string
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    FuncMounts List<FgsFunctionV2FuncMount>
    Specifies the file system list. The func_mounts object structure is documented below.
    FunctiongraphVersion string
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    GpuMemory double
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    GpuType 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
    Specifies the ID of the LTS log group.
    LogGroupName string
    Specifies the name of the LTS log group.
    LogTopicId string
    Specifies the ID of the LTS log stream.
    LogTopicName string
    Specifies the name of the LTS stream.
    MaxInstanceNum string
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    MemorySize double
    Specifies the memory size allocated to the function, in MByte (MB).
    MountUserGroupId double
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    MountUserId double
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    Name string
    Specifies the name of the function. Changing this will create a new resource.
    NetworkId string
    Specifies the network ID of subnet.
    OpentelekomcloudUrn string
    Uniform Resource Name.
    Region string
    The region in which function graph resource is created.
    ReservedInstances List<FgsFunctionV2ReservedInstance>
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    Runtime string
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    Tags Dictionary<string, string>
    Specifies the key/value pairs to associate with the function.
    Timeout double
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    Timeouts FgsFunctionV2Timeouts
    UserData string
    Specifies the Key/Value information defined for the function.
    Version string
    The version of the function.
    Versions List<FgsFunctionV2Version>
    Specifies the versions management of the function. The versions structure is documented below.
    VpcId string
    Specifies the ID of VPC.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    CodeUrl string
    Specifies the code url. Required if the code_type is set to obs.
    ConcurrencyNum float64
    CustomImage FgsFunctionV2CustomImageArgs
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    DependLists []string
    Specifies the ID list of the dependencies.
    Description string
    Specifies the description of the function.
    DnsList string
    The private DNS configuration of the function network.
    EncryptedUserData string
    Specifies the key/value information defined to be encrypted for the function.
    FgsFunctionV2Id string
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    FuncCode string
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    FuncMounts []FgsFunctionV2FuncMountArgs
    Specifies the file system list. The func_mounts object structure is documented below.
    FunctiongraphVersion string
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    GpuMemory float64
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    GpuType 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
    Specifies the ID of the LTS log group.
    LogGroupName string
    Specifies the name of the LTS log group.
    LogTopicId string
    Specifies the ID of the LTS log stream.
    LogTopicName string
    Specifies the name of the LTS stream.
    MaxInstanceNum string
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    MemorySize float64
    Specifies the memory size allocated to the function, in MByte (MB).
    MountUserGroupId float64
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    MountUserId float64
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    Name string
    Specifies the name of the function. Changing this will create a new resource.
    NetworkId string
    Specifies the network ID of subnet.
    OpentelekomcloudUrn string
    Uniform Resource Name.
    Region string
    The region in which function graph resource is created.
    ReservedInstances []FgsFunctionV2ReservedInstanceArgs
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    Runtime string
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    Tags map[string]string
    Specifies the key/value pairs to associate with the function.
    Timeout float64
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    Timeouts FgsFunctionV2TimeoutsArgs
    UserData string
    Specifies the Key/Value information defined for the function.
    Version string
    The version of the function.
    Versions []FgsFunctionV2VersionArgs
    Specifies the versions management of the function. The versions structure is documented below.
    VpcId string
    Specifies the ID of VPC.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    codeUrl String
    Specifies the code url. Required if the code_type is set to obs.
    concurrencyNum Double
    customImage FgsFunctionV2CustomImage
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    dnsList String
    The private DNS configuration of the function network.
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function.
    fgsFunctionV2Id String
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    funcCode String
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    funcMounts List<FgsFunctionV2FuncMount>
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraphVersion String
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpuMemory Double
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    gpuType 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
    Specifies the ID of the LTS log group.
    logGroupName String
    Specifies the name of the LTS log group.
    logTopicId String
    Specifies the ID of the LTS log stream.
    logTopicName String
    Specifies the name of the LTS stream.
    maxInstanceNum String
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    memorySize Double
    Specifies the memory size allocated to the function, in MByte (MB).
    mountUserGroupId Double
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mountUserId Double
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name String
    Specifies the name of the function. Changing this will create a new resource.
    networkId String
    Specifies the network ID of subnet.
    opentelekomcloudUrn String
    Uniform Resource Name.
    region String
    The region in which function graph resource is created.
    reservedInstances List<FgsFunctionV2ReservedInstance>
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    runtime String
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    tags Map<String,String>
    Specifies the key/value pairs to associate with the function.
    timeout Double
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    timeouts FgsFunctionV2Timeouts
    userData String
    Specifies the Key/Value information defined for the function.
    version String
    The version of the function.
    versions List<FgsFunctionV2Version>
    Specifies the versions management of the function. The versions structure is documented below.
    vpcId String
    Specifies the ID of VPC.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    codeUrl string
    Specifies the code url. Required if the code_type is set to obs.
    concurrencyNum number
    customImage FgsFunctionV2CustomImage
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    dependLists string[]
    Specifies the ID list of the dependencies.
    description string
    Specifies the description of the function.
    dnsList string
    The private DNS configuration of the function network.
    encryptedUserData string
    Specifies the key/value information defined to be encrypted for the function.
    fgsFunctionV2Id string
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    funcCode string
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    funcMounts FgsFunctionV2FuncMount[]
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraphVersion string
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpuMemory number
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    gpuType 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
    Specifies the ID of the LTS log group.
    logGroupName string
    Specifies the name of the LTS log group.
    logTopicId string
    Specifies the ID of the LTS log stream.
    logTopicName string
    Specifies the name of the LTS stream.
    maxInstanceNum string
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    memorySize number
    Specifies the memory size allocated to the function, in MByte (MB).
    mountUserGroupId number
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mountUserId number
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name string
    Specifies the name of the function. Changing this will create a new resource.
    networkId string
    Specifies the network ID of subnet.
    opentelekomcloudUrn string
    Uniform Resource Name.
    region string
    The region in which function graph resource is created.
    reservedInstances FgsFunctionV2ReservedInstance[]
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    runtime string
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    tags {[key: string]: string}
    Specifies the key/value pairs to associate with the function.
    timeout number
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    timeouts FgsFunctionV2Timeouts
    userData string
    Specifies the Key/Value information defined for the function.
    version string
    The version of the function.
    versions FgsFunctionV2Version[]
    Specifies the versions management of the function. The versions structure is documented below.
    vpcId string
    Specifies the ID of VPC.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    code_url str
    Specifies the code url. Required if the code_type is set to obs.
    concurrency_num float
    custom_image FgsFunctionV2CustomImageArgs
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    depend_lists Sequence[str]
    Specifies the ID list of the dependencies.
    description str
    Specifies the description of the function.
    dns_list str
    The private DNS configuration of the function network.
    encrypted_user_data str
    Specifies the key/value information defined to be encrypted for the function.
    fgs_function_v2_id str
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    func_code str
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    func_mounts Sequence[FgsFunctionV2FuncMountArgs]
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraph_version str
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpu_memory float
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    gpu_type 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
    Specifies the ID of the LTS log group.
    log_group_name str
    Specifies the name of the LTS log group.
    log_topic_id str
    Specifies the ID of the LTS log stream.
    log_topic_name str
    Specifies the name of the LTS stream.
    max_instance_num str
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    memory_size float
    Specifies the memory size allocated to the function, in MByte (MB).
    mount_user_group_id float
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mount_user_id float
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name str
    Specifies the name of the function. Changing this will create a new resource.
    network_id str
    Specifies the network ID of subnet.
    opentelekomcloud_urn str
    Uniform Resource Name.
    region str
    The region in which function graph resource is created.
    reserved_instances Sequence[FgsFunctionV2ReservedInstanceArgs]
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    runtime str
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    tags Mapping[str, str]
    Specifies the key/value pairs to associate with the function.
    timeout float
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    timeouts FgsFunctionV2TimeoutsArgs
    user_data str
    Specifies the Key/Value information defined for the function.
    version str
    The version of the function.
    versions Sequence[FgsFunctionV2VersionArgs]
    Specifies the versions management of the function. The versions structure is documented below.
    vpc_id str
    Specifies the ID of VPC.
    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 the 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. Required if the code_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.
    • Custom-Image-Swr: function code comes from the SWR custom image.
    codeUrl String
    Specifies the code url. Required if the code_type is set to obs.
    concurrencyNum Number
    customImage Property Map
    Specifies the custom image configuration for creating function. The custom_image structure is documented below.
    dependLists List<String>
    Specifies the ID list of the dependencies.
    description String
    Specifies the description of the function.
    dnsList String
    The private DNS configuration of the function network.
    encryptedUserData String
    Specifies the key/value information defined to be encrypted for the function.
    fgsFunctionV2Id String
    The resource ID, consist of urn and current version, the format is <urn>:<version>.
    funcCode String
    Specifies the function code. The code value can be encoded using Base64 or just with the text code. Required if the code_type is set to inline, zip, or jar.
    funcMounts List<Property Map>
    Specifies the file system list. The func_mounts object structure is documented below.
    functiongraphVersion String
    Specifies the FunctionGraph version, default value is v2. The valid values are as follows:

    • v1
    • v2
    gpuMemory Number
    Specifies the GPU memory size allocated to the function, in MByte (MB). The valid value ranges form 1,024 to 16,384, the value must be a multiple of 1,024. If not specified, the GPU function is disabled.
    gpuType 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
    Specifies the ID of the LTS log group.
    logGroupName String
    Specifies the name of the LTS log group.
    logTopicId String
    Specifies the ID of the LTS log stream.
    logTopicName String
    Specifies the name of the LTS stream.
    maxInstanceNum String
    Specifies the maximum number of instances of the function. The valid value ranges from -1 to 1,000, defaults to 400.

    • The minimum value is -1 and means the number of instances is unlimited.
    memorySize Number
    Specifies the memory size allocated to the function, in MByte (MB).
    mountUserGroupId Number
    Specifies the user group ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    mountUserId Number
    Specifies the user ID, a non-0 integer from –1 to 65,534. Defaults to -1.
    name String
    Specifies the name of the function. Changing this will create a new resource.
    networkId String
    Specifies the network ID of subnet.
    opentelekomcloudUrn String
    Uniform Resource Name.
    region String
    The region in which function graph resource is created.
    reservedInstances List<Property Map>
    Specifies the reserved instance policies of the function. The reserved_instances structure is documented below.
    runtime String
    Specifies the environment for executing the function. The valid values are as follows:

    • Java8
    • Java11
    • Node.js6.10
    • Node.js8.10
    • Node.js10.16
    • Node.js12.13
    • Node.js14.18
    • Python2.7
    • Python3.6
    • Python3.9
    • Go1.8
    • Go1.x
    • C#(.NET Core 2.0)
    • C#(.NET Core 2.1)
    • C#(.NET Core 3.1)
    • PHP7.3
    • Custom
    • http
    tags Map<String>
    Specifies the key/value pairs to associate with the function.
    timeout Number
    Specifies the timeout interval of the function, in seconds. The value ranges from 3 to 900.
    timeouts Property Map
    userData String
    Specifies the Key/Value information defined for the function.
    version String
    The version of the function.
    versions List<Property Map>
    Specifies the versions management of the function. The versions structure is documented below.
    vpcId String
    Specifies the ID of VPC.

    Supporting Types

    FgsFunctionV2CustomImage, FgsFunctionV2CustomImageArgs

    Url string
    Specifies the URL of SWR image, the URL must start with swr..
    Url string
    Specifies the URL of SWR image, the URL must start with swr..
    url String
    Specifies the URL of SWR image, the URL must start with swr..
    url string
    Specifies the URL of SWR image, the URL must start with swr..
    url str
    Specifies the URL of SWR image, the URL must start with swr..
    url String
    Specifies the URL of SWR image, the URL must start with swr..

    FgsFunctionV2FuncMount, FgsFunctionV2FuncMountArgs

    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.

    • sfs
    • sfsTurbo
    • ecs
    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.

    • sfs
    • sfsTurbo
    • ecs
    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.

    • sfs
    • sfsTurbo
    • ecs
    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.

    • sfs
    • sfsTurbo
    • ecs
    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.

    • sfs
    • sfsTurbo
    • ecs
    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.

    • sfs
    • sfsTurbo
    • ecs

    FgsFunctionV2ReservedInstance, FgsFunctionV2ReservedInstanceArgs

    Count double
    Specifies the number of reserved instance. The valid value ranges from 0 to 1,000. If this parameter is set to 0, the reserved instance will not run.
    QualifierName string
    Specifies the version name or alias name.
    QualifierType string

    Specifies qualifier type of reserved instance. The valid values are as follows:

    • version
    • alias

    Reserved instances cannot be configured for both a function alias and the corresponding version. For example, if the alias of the latest version is 1.0 and reserved instances have been configured for this version, no more instances can be configured for alias 1.0.

    IdleMode bool
    Specifies whether to enable the idle mode. The default value is false. If this parameter is enabled, reserved instances are initialized and the mode change needs some time to take effect. You will still be billed at the price of reserved instances for non-idle mode in this period.
    TacticsConfig FgsFunctionV2ReservedInstanceTacticsConfig
    Specifies the auto scaling policies for reserved instance. The tactics_config structure is documented below.
    Count float64
    Specifies the number of reserved instance. The valid value ranges from 0 to 1,000. If this parameter is set to 0, the reserved instance will not run.
    QualifierName string
    Specifies the version name or alias name.
    QualifierType string

    Specifies qualifier type of reserved instance. The valid values are as follows:

    • version
    • alias

    Reserved instances cannot be configured for both a function alias and the corresponding version. For example, if the alias of the latest version is 1.0 and reserved instances have been configured for this version, no more instances can be configured for alias 1.0.

    IdleMode bool
    Specifies whether to enable the idle mode. The default value is false. If this parameter is enabled, reserved instances are initialized and the mode change needs some time to take effect. You will still be billed at the price of reserved instances for non-idle mode in this period.
    TacticsConfig FgsFunctionV2ReservedInstanceTacticsConfig
    Specifies the auto scaling policies for reserved instance. The tactics_config structure is documented below.
    count Double
    Specifies the number of reserved instance. The valid value ranges from 0 to 1,000. If this parameter is set to 0, the reserved instance will not run.
    qualifierName String
    Specifies the version name or alias name.
    qualifierType String

    Specifies qualifier type of reserved instance. The valid values are as follows:

    • version
    • alias

    Reserved instances cannot be configured for both a function alias and the corresponding version. For example, if the alias of the latest version is 1.0 and reserved instances have been configured for this version, no more instances can be configured for alias 1.0.

    idleMode Boolean
    Specifies whether to enable the idle mode. The default value is false. If this parameter is enabled, reserved instances are initialized and the mode change needs some time to take effect. You will still be billed at the price of reserved instances for non-idle mode in this period.
    tacticsConfig FgsFunctionV2ReservedInstanceTacticsConfig
    Specifies the auto scaling policies for reserved instance. The tactics_config structure is documented below.
    count number
    Specifies the number of reserved instance. The valid value ranges from 0 to 1,000. If this parameter is set to 0, the reserved instance will not run.
    qualifierName string
    Specifies the version name or alias name.
    qualifierType string

    Specifies qualifier type of reserved instance. The valid values are as follows:

    • version
    • alias

    Reserved instances cannot be configured for both a function alias and the corresponding version. For example, if the alias of the latest version is 1.0 and reserved instances have been configured for this version, no more instances can be configured for alias 1.0.

    idleMode boolean
    Specifies whether to enable the idle mode. The default value is false. If this parameter is enabled, reserved instances are initialized and the mode change needs some time to take effect. You will still be billed at the price of reserved instances for non-idle mode in this period.
    tacticsConfig FgsFunctionV2ReservedInstanceTacticsConfig
    Specifies the auto scaling policies for reserved instance. The tactics_config structure is documented below.
    count float
    Specifies the number of reserved instance. The valid value ranges from 0 to 1,000. If this parameter is set to 0, the reserved instance will not run.
    qualifier_name str
    Specifies the version name or alias name.
    qualifier_type str

    Specifies qualifier type of reserved instance. The valid values are as follows:

    • version
    • alias

    Reserved instances cannot be configured for both a function alias and the corresponding version. For example, if the alias of the latest version is 1.0 and reserved instances have been configured for this version, no more instances can be configured for alias 1.0.

    idle_mode bool
    Specifies whether to enable the idle mode. The default value is false. If this parameter is enabled, reserved instances are initialized and the mode change needs some time to take effect. You will still be billed at the price of reserved instances for non-idle mode in this period.
    tactics_config FgsFunctionV2ReservedInstanceTacticsConfig
    Specifies the auto scaling policies for reserved instance. The tactics_config structure is documented below.
    count Number
    Specifies the number of reserved instance. The valid value ranges from 0 to 1,000. If this parameter is set to 0, the reserved instance will not run.
    qualifierName String
    Specifies the version name or alias name.
    qualifierType String

    Specifies qualifier type of reserved instance. The valid values are as follows:

    • version
    • alias

    Reserved instances cannot be configured for both a function alias and the corresponding version. For example, if the alias of the latest version is 1.0 and reserved instances have been configured for this version, no more instances can be configured for alias 1.0.

    idleMode Boolean
    Specifies whether to enable the idle mode. The default value is false. If this parameter is enabled, reserved instances are initialized and the mode change needs some time to take effect. You will still be billed at the price of reserved instances for non-idle mode in this period.
    tacticsConfig Property Map
    Specifies the auto scaling policies for reserved instance. The tactics_config structure is documented below.

    FgsFunctionV2ReservedInstanceTacticsConfig, FgsFunctionV2ReservedInstanceTacticsConfigArgs

    CronConfigs List<FgsFunctionV2ReservedInstanceTacticsConfigCronConfig>
    Specifies the list of scheduled policy configurations. The cron_configs structure is documented below.
    CronConfigs []FgsFunctionV2ReservedInstanceTacticsConfigCronConfig
    Specifies the list of scheduled policy configurations. The cron_configs structure is documented below.
    cronConfigs List<FgsFunctionV2ReservedInstanceTacticsConfigCronConfig>
    Specifies the list of scheduled policy configurations. The cron_configs structure is documented below.
    cronConfigs FgsFunctionV2ReservedInstanceTacticsConfigCronConfig[]
    Specifies the list of scheduled policy configurations. The cron_configs structure is documented below.
    cron_configs Sequence[FgsFunctionV2ReservedInstanceTacticsConfigCronConfig]
    Specifies the list of scheduled policy configurations. The cron_configs structure is documented below.
    cronConfigs List<Property Map>
    Specifies the list of scheduled policy configurations. The cron_configs structure is documented below.

    FgsFunctionV2ReservedInstanceTacticsConfigCronConfig, FgsFunctionV2ReservedInstanceTacticsConfigCronConfigArgs

    Count double

    Specifies the number of reserved instance to which the policy belongs. The valid value ranges from 0 to 1,000.

    The number of reserved instances must be greater than or equal to the number of reserved instances in the basic configuration.

    Cron string
    Specifies the cron expression.
    ExpiredTime double
    Specifies the expiration timestamp of the policy. The unit is s, e.g. 1740560074.
    Name string
    Specifies the name of scheduled policy configuration. The valid length is limited from 1 to 60 characters, only letters, digits, hyphens (-), and underscores (_) are allowed. The name must start with a letter and ending with a letter or digit.
    StartTime double
    Specifies the effective timestamp of policy. The unit is s, e.g. 1740560074.
    Count float64

    Specifies the number of reserved instance to which the policy belongs. The valid value ranges from 0 to 1,000.

    The number of reserved instances must be greater than or equal to the number of reserved instances in the basic configuration.

    Cron string
    Specifies the cron expression.
    ExpiredTime float64
    Specifies the expiration timestamp of the policy. The unit is s, e.g. 1740560074.
    Name string
    Specifies the name of scheduled policy configuration. The valid length is limited from 1 to 60 characters, only letters, digits, hyphens (-), and underscores (_) are allowed. The name must start with a letter and ending with a letter or digit.
    StartTime float64
    Specifies the effective timestamp of policy. The unit is s, e.g. 1740560074.
    count Double

    Specifies the number of reserved instance to which the policy belongs. The valid value ranges from 0 to 1,000.

    The number of reserved instances must be greater than or equal to the number of reserved instances in the basic configuration.

    cron String
    Specifies the cron expression.
    expiredTime Double
    Specifies the expiration timestamp of the policy. The unit is s, e.g. 1740560074.
    name String
    Specifies the name of scheduled policy configuration. The valid length is limited from 1 to 60 characters, only letters, digits, hyphens (-), and underscores (_) are allowed. The name must start with a letter and ending with a letter or digit.
    startTime Double
    Specifies the effective timestamp of policy. The unit is s, e.g. 1740560074.
    count number

    Specifies the number of reserved instance to which the policy belongs. The valid value ranges from 0 to 1,000.

    The number of reserved instances must be greater than or equal to the number of reserved instances in the basic configuration.

    cron string
    Specifies the cron expression.
    expiredTime number
    Specifies the expiration timestamp of the policy. The unit is s, e.g. 1740560074.
    name string
    Specifies the name of scheduled policy configuration. The valid length is limited from 1 to 60 characters, only letters, digits, hyphens (-), and underscores (_) are allowed. The name must start with a letter and ending with a letter or digit.
    startTime number
    Specifies the effective timestamp of policy. The unit is s, e.g. 1740560074.
    count float

    Specifies the number of reserved instance to which the policy belongs. The valid value ranges from 0 to 1,000.

    The number of reserved instances must be greater than or equal to the number of reserved instances in the basic configuration.

    cron str
    Specifies the cron expression.
    expired_time float
    Specifies the expiration timestamp of the policy. The unit is s, e.g. 1740560074.
    name str
    Specifies the name of scheduled policy configuration. The valid length is limited from 1 to 60 characters, only letters, digits, hyphens (-), and underscores (_) are allowed. The name must start with a letter and ending with a letter or digit.
    start_time float
    Specifies the effective timestamp of policy. The unit is s, e.g. 1740560074.
    count Number

    Specifies the number of reserved instance to which the policy belongs. The valid value ranges from 0 to 1,000.

    The number of reserved instances must be greater than or equal to the number of reserved instances in the basic configuration.

    cron String
    Specifies the cron expression.
    expiredTime Number
    Specifies the expiration timestamp of the policy. The unit is s, e.g. 1740560074.
    name String
    Specifies the name of scheduled policy configuration. The valid length is limited from 1 to 60 characters, only letters, digits, hyphens (-), and underscores (_) are allowed. The name must start with a letter and ending with a letter or digit.
    startTime Number
    Specifies the effective timestamp of policy. The unit is s, e.g. 1740560074.

    FgsFunctionV2Timeouts, FgsFunctionV2TimeoutsArgs

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

    FgsFunctionV2Version, FgsFunctionV2VersionArgs

    Name string

    Specifies the version name.

    Currently, only supports the management of the default version (latest).

    Aliases FgsFunctionV2VersionAliases
    Specifies the aliases management for specified version. The aliases structure is documented below.
    Name string

    Specifies the version name.

    Currently, only supports the management of the default version (latest).

    Aliases FgsFunctionV2VersionAliases
    Specifies the aliases management for specified version. The aliases structure is documented below.
    name String

    Specifies the version name.

    Currently, only supports the management of the default version (latest).

    aliases FgsFunctionV2VersionAliases
    Specifies the aliases management for specified version. The aliases structure is documented below.
    name string

    Specifies the version name.

    Currently, only supports the management of the default version (latest).

    aliases FgsFunctionV2VersionAliases
    Specifies the aliases management for specified version. The aliases structure is documented below.
    name str

    Specifies the version name.

    Currently, only supports the management of the default version (latest).

    aliases FgsFunctionV2VersionAliases
    Specifies the aliases management for specified version. The aliases structure is documented below.
    name String

    Specifies the version name.

    Currently, only supports the management of the default version (latest).

    aliases Property Map
    Specifies the aliases management for specified version. The aliases structure is documented below.

    FgsFunctionV2VersionAliases, FgsFunctionV2VersionAliasesArgs

    Name string
    Specifies the name of the version alias.
    Description string
    Specifies the description of the version alias.
    Name string
    Specifies the name of the version alias.
    Description string
    Specifies the description of the version alias.
    name String
    Specifies the name of the version alias.
    description String
    Specifies the description of the version alias.
    name string
    Specifies the name of the version alias.
    description string
    Specifies the description of the version alias.
    name str
    Specifies the name of the version alias.
    description str
    Specifies the description of the version alias.
    name String
    Specifies the name of the version alias.
    description String
    Specifies the description of the version alias.

    Import

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

    bash

    $ pulumi import opentelekomcloud:index/fgsFunctionV2:FgsFunctionV2 test <id>
    

    Note that the imported state may not be identical to your resource definition, due to the attribute missing from the

    API response. The missing attributes are:

    app, func_code, agency, tags".

    It is generally recommended running pulumi preview after importing a function.

    You can then decide if changes should be applied to the function, or the resource definition should be updated to align

    with the function. Also you can ignore changes as below.

    hcl

    resource “opentelekomcloud_fgs_function_v2” “test” {

    lifecycle {

    ignore_changes = [
    
      app, func_code, agency, tags,
    
    ]
    

    }

    }

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

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud