opentelekomcloud.FgsFunctionV2
Explore with Pulumi AI
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:
- Memory
Size 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
to900
. - 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.
- App
Agency string - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- Code
Filename string - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - Code
Type 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.
- Code
Url string - Specifies the code url.
Required if the
code_type
is set to obs. - Concurrency
Num double - Custom
Image FgsFunction V2Custom Image - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - Depend
Lists List<string> - Specifies the ID list of the dependencies.
- Description string
- Specifies the description of the function.
- Encrypted
User stringData - Specifies the key/value information defined to be encrypted for the function.
- Fgs
Function stringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - Func
Code 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. - Func
Mounts List<FgsFunction V2Func Mount> - Specifies the file system list. The
func_mounts
object structure is documented below. - Functiongraph
Version string - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- Gpu
Memory double - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - Handler string
- Specifies the entry point of the function.
- Initializer
Handler string - Specifies the initializer of the function.
- Initializer
Timeout double - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- Log
Group stringId - Specifies the ID of the LTS log group.
- Log
Group stringName - Specifies the name of the LTS log group.
- Log
Topic stringId - Specifies the ID of the LTS log stream.
- Log
Topic stringName - Specifies the name of the LTS stream.
- Max
Instance stringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- Mount
User doubleGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Mount
User doubleId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Name string
- Specifies the name of the function. Changing this will create a new resource.
- Network
Id string - Specifies the network ID of subnet.
- Reserved
Instances List<FgsFunction V2Reserved Instance> - Specifies the reserved instance policies of the function.
The
reserved_instances
structure is documented below. - Dictionary<string, string>
- Specifies the key/value pairs to associate with the function.
- Timeouts
Fgs
Function V2Timeouts - User
Data string - Specifies the Key/Value information defined for the function.
- Versions
List<Fgs
Function V2Version> - Specifies the versions management of the function.
The
versions
structure is documented below. - Vpc
Id string - Specifies the ID of VPC.
- Memory
Size 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
to900
. - 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.
- App
Agency string - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- Code
Filename string - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - Code
Type 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.
- Code
Url string - Specifies the code url.
Required if the
code_type
is set to obs. - Concurrency
Num float64 - Custom
Image FgsFunction V2Custom Image Args - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - Depend
Lists []string - Specifies the ID list of the dependencies.
- Description string
- Specifies the description of the function.
- Encrypted
User stringData - Specifies the key/value information defined to be encrypted for the function.
- Fgs
Function stringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - Func
Code 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. - Func
Mounts []FgsFunction V2Func Mount Args - Specifies the file system list. The
func_mounts
object structure is documented below. - Functiongraph
Version string - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- Gpu
Memory float64 - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - Handler string
- Specifies the entry point of the function.
- Initializer
Handler string - Specifies the initializer of the function.
- Initializer
Timeout float64 - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- Log
Group stringId - Specifies the ID of the LTS log group.
- Log
Group stringName - Specifies the name of the LTS log group.
- Log
Topic stringId - Specifies the ID of the LTS log stream.
- Log
Topic stringName - Specifies the name of the LTS stream.
- Max
Instance stringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- Mount
User float64Group Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Mount
User float64Id - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Name string
- Specifies the name of the function. Changing this will create a new resource.
- Network
Id string - Specifies the network ID of subnet.
- Reserved
Instances []FgsFunction V2Reserved Instance Args - Specifies the reserved instance policies of the function.
The
reserved_instances
structure is documented below. - map[string]string
- Specifies the key/value pairs to associate with the function.
- Timeouts
Fgs
Function V2Timeouts Args - User
Data string - Specifies the Key/Value information defined for the function.
- Versions
[]Fgs
Function V2Version Args - Specifies the versions management of the function.
The
versions
structure is documented below. - Vpc
Id string - Specifies the ID of VPC.
- memory
Size 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
to900
. - 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.
- app
Agency String - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- code
Filename String - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - code
Type 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.
- code
Url String - Specifies the code url.
Required if the
code_type
is set to obs. - concurrency
Num Double - custom
Image FgsFunction V2Custom Image - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - depend
Lists List<String> - Specifies the ID list of the dependencies.
- description String
- Specifies the description of the function.
- encrypted
User StringData - Specifies the key/value information defined to be encrypted for the function.
- fgs
Function StringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - func
Code 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. - func
Mounts List<FgsFunction V2Func Mount> - Specifies the file system list. The
func_mounts
object structure is documented below. - functiongraph
Version String - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- gpu
Memory Double - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - handler String
- Specifies the entry point of the function.
- initializer
Handler String - Specifies the initializer of the function.
- initializer
Timeout Double - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- log
Group StringId - Specifies the ID of the LTS log group.
- log
Group StringName - Specifies the name of the LTS log group.
- log
Topic StringId - Specifies the ID of the LTS log stream.
- log
Topic StringName - Specifies the name of the LTS stream.
- max
Instance StringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- mount
User DoubleGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount
User DoubleId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - name String
- Specifies the name of the function. Changing this will create a new resource.
- network
Id String - Specifies the network ID of subnet.
- reserved
Instances List<FgsFunction V2Reserved Instance> - Specifies the reserved instance policies of the function.
The
reserved_instances
structure is documented below. - Map<String,String>
- Specifies the key/value pairs to associate with the function.
- timeouts
Fgs
Function V2Timeouts - user
Data String - Specifies the Key/Value information defined for the function.
- versions
List<Fgs
Function V2Version> - Specifies the versions management of the function.
The
versions
structure is documented below. - vpc
Id String - Specifies the ID of VPC.
- memory
Size 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
to900
. - 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.
- app
Agency string - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- code
Filename string - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - code
Type 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.
- code
Url string - Specifies the code url.
Required if the
code_type
is set to obs. - concurrency
Num number - custom
Image FgsFunction V2Custom Image - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - depend
Lists string[] - Specifies the ID list of the dependencies.
- description string
- Specifies the description of the function.
- encrypted
User stringData - Specifies the key/value information defined to be encrypted for the function.
- fgs
Function stringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - func
Code 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. - func
Mounts FgsFunction V2Func Mount[] - Specifies the file system list. The
func_mounts
object structure is documented below. - functiongraph
Version string - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- gpu
Memory number - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - handler string
- Specifies the entry point of the function.
- initializer
Handler string - Specifies the initializer of the function.
- initializer
Timeout number - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- log
Group stringId - Specifies the ID of the LTS log group.
- log
Group stringName - Specifies the name of the LTS log group.
- log
Topic stringId - Specifies the ID of the LTS log stream.
- log
Topic stringName - Specifies the name of the LTS stream.
- max
Instance stringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- mount
User numberGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount
User numberId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - name string
- Specifies the name of the function. Changing this will create a new resource.
- network
Id string - Specifies the network ID of subnet.
- reserved
Instances FgsFunction V2Reserved Instance[] - Specifies the reserved instance policies of the function.
The
reserved_instances
structure is documented below. - {[key: string]: string}
- Specifies the key/value pairs to associate with the function.
- timeouts
Fgs
Function V2Timeouts - user
Data string - Specifies the Key/Value information defined for the function.
- versions
Fgs
Function V2Version[] - Specifies the versions management of the function.
The
versions
structure is documented below. - vpc
Id 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
to900
. - 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 FgsFunction V2Custom Image Args - 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_ strdata - Specifies the key/value information defined to be encrypted for the function.
- fgs_
function_ strv2_ id - The resource ID, consist of
urn
and currentversion
, 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[FgsFunction V2Func Mount Args] - 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
to16,384
, the value must be a multiple of1,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_ strid - Specifies the ID of the LTS log group.
- log_
group_ strname - Specifies the name of the LTS log group.
- log_
topic_ strid - Specifies the ID of the LTS log stream.
- log_
topic_ strname - Specifies the name of the LTS stream.
- max_
instance_ strnum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- mount_
user_ floatgroup_ id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount_
user_ floatid - Specifies the user ID, a non-0 integer from
–1
to65,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[FgsFunction V2Reserved Instance Args] - Specifies the reserved instance policies of the function.
The
reserved_instances
structure is documented below. - Mapping[str, str]
- Specifies the key/value pairs to associate with the function.
- timeouts
Fgs
Function V2Timeouts Args - user_
data str - Specifies the Key/Value information defined for the function.
- versions
Sequence[Fgs
Function V2Version Args] - Specifies the versions management of the function.
The
versions
structure is documented below. - vpc_
id str - Specifies the ID of VPC.
- memory
Size 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
to900
. - 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.
- app
Agency String - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- code
Filename String - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - code
Type 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.
- code
Url String - Specifies the code url.
Required if the
code_type
is set to obs. - concurrency
Num Number - custom
Image Property Map - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - depend
Lists List<String> - Specifies the ID list of the dependencies.
- description String
- Specifies the description of the function.
- encrypted
User StringData - Specifies the key/value information defined to be encrypted for the function.
- fgs
Function StringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - func
Code 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. - func
Mounts List<Property Map> - Specifies the file system list. The
func_mounts
object structure is documented below. - functiongraph
Version String - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- gpu
Memory Number - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - handler String
- Specifies the entry point of the function.
- initializer
Handler String - Specifies the initializer of the function.
- initializer
Timeout Number - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- log
Group StringId - Specifies the ID of the LTS log group.
- log
Group StringName - Specifies the name of the LTS log group.
- log
Topic StringId - Specifies the ID of the LTS log stream.
- log
Topic StringName - Specifies the name of the LTS stream.
- max
Instance StringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- mount
User NumberGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount
User NumberId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - name String
- Specifies the name of the function. Changing this will create a new resource.
- network
Id String - Specifies the network ID of subnet.
- reserved
Instances List<Property Map> - Specifies the reserved instance policies of the function.
The
reserved_instances
structure is documented below. - Map<String>
- Specifies the key/value pairs to associate with the function.
- timeouts Property Map
- user
Data 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. - vpc
Id 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:
- Dns
List string - The private DNS configuration of the function network.
- Gpu
Type string - Id string
- The provider-assigned unique ID for this managed resource.
- Opentelekomcloud
Urn string - Uniform Resource Name.
- Region string
- The region in which function graph resource is created.
- Version string
- The version of the function.
- Dns
List string - The private DNS configuration of the function network.
- Gpu
Type string - Id string
- The provider-assigned unique ID for this managed resource.
- Opentelekomcloud
Urn string - Uniform Resource Name.
- Region string
- The region in which function graph resource is created.
- Version string
- The version of the function.
- dns
List String - The private DNS configuration of the function network.
- gpu
Type String - id String
- The provider-assigned unique ID for this managed resource.
- opentelekomcloud
Urn String - Uniform Resource Name.
- region String
- The region in which function graph resource is created.
- version String
- The version of the function.
- dns
List string - The private DNS configuration of the function network.
- gpu
Type string - id string
- The provider-assigned unique ID for this managed resource.
- opentelekomcloud
Urn string - Uniform Resource Name.
- region string
- The region in which function graph resource is created.
- version string
- The version of the function.
- dns
List String - The private DNS configuration of the function network.
- gpu
Type String - id String
- The provider-assigned unique ID for this managed resource.
- opentelekomcloud
Urn 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.
- 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.
- App
Agency string - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- Code
Filename string - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - Code
Type 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.
- Code
Url string - Specifies the code url.
Required if the
code_type
is set to obs. - Concurrency
Num double - Custom
Image FgsFunction V2Custom Image - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - Depend
Lists List<string> - Specifies the ID list of the dependencies.
- Description string
- Specifies the description of the function.
- Dns
List string - The private DNS configuration of the function network.
- Encrypted
User stringData - Specifies the key/value information defined to be encrypted for the function.
- Fgs
Function stringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - Func
Code 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. - Func
Mounts List<FgsFunction V2Func Mount> - Specifies the file system list. The
func_mounts
object structure is documented below. - Functiongraph
Version string - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- Gpu
Memory double - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - Gpu
Type string - Handler string
- Specifies the entry point of the function.
- Initializer
Handler string - Specifies the initializer of the function.
- Initializer
Timeout double - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- Log
Group stringId - Specifies the ID of the LTS log group.
- Log
Group stringName - Specifies the name of the LTS log group.
- Log
Topic stringId - Specifies the ID of the LTS log stream.
- Log
Topic stringName - Specifies the name of the LTS stream.
- Max
Instance stringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- Memory
Size double - Specifies the memory size allocated to the function, in MByte (MB).
- Mount
User doubleGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Mount
User doubleId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Name string
- Specifies the name of the function. Changing this will create a new resource.
- Network
Id string - Specifies the network ID of subnet.
- Opentelekomcloud
Urn string - Uniform Resource Name.
- Region string
- The region in which function graph resource is created.
- Reserved
Instances List<FgsFunction V2Reserved Instance> - 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
- 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
to900
. - Timeouts
Fgs
Function V2Timeouts - User
Data string - Specifies the Key/Value information defined for the function.
- Version string
- The version of the function.
- Versions
List<Fgs
Function V2Version> - Specifies the versions management of the function.
The
versions
structure is documented below. - Vpc
Id 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.
- App
Agency string - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- Code
Filename string - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - Code
Type 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.
- Code
Url string - Specifies the code url.
Required if the
code_type
is set to obs. - Concurrency
Num float64 - Custom
Image FgsFunction V2Custom Image Args - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - Depend
Lists []string - Specifies the ID list of the dependencies.
- Description string
- Specifies the description of the function.
- Dns
List string - The private DNS configuration of the function network.
- Encrypted
User stringData - Specifies the key/value information defined to be encrypted for the function.
- Fgs
Function stringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - Func
Code 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. - Func
Mounts []FgsFunction V2Func Mount Args - Specifies the file system list. The
func_mounts
object structure is documented below. - Functiongraph
Version string - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- Gpu
Memory float64 - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - Gpu
Type string - Handler string
- Specifies the entry point of the function.
- Initializer
Handler string - Specifies the initializer of the function.
- Initializer
Timeout float64 - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- Log
Group stringId - Specifies the ID of the LTS log group.
- Log
Group stringName - Specifies the name of the LTS log group.
- Log
Topic stringId - Specifies the ID of the LTS log stream.
- Log
Topic stringName - Specifies the name of the LTS stream.
- Max
Instance stringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- Memory
Size float64 - Specifies the memory size allocated to the function, in MByte (MB).
- Mount
User float64Group Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Mount
User float64Id - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - Name string
- Specifies the name of the function. Changing this will create a new resource.
- Network
Id string - Specifies the network ID of subnet.
- Opentelekomcloud
Urn string - Uniform Resource Name.
- Region string
- The region in which function graph resource is created.
- Reserved
Instances []FgsFunction V2Reserved Instance Args - 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
- 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
to900
. - Timeouts
Fgs
Function V2Timeouts Args - User
Data string - Specifies the Key/Value information defined for the function.
- Version string
- The version of the function.
- Versions
[]Fgs
Function V2Version Args - Specifies the versions management of the function.
The
versions
structure is documented below. - Vpc
Id 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.
- app
Agency String - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- code
Filename String - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - code
Type 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.
- code
Url String - Specifies the code url.
Required if the
code_type
is set to obs. - concurrency
Num Double - custom
Image FgsFunction V2Custom Image - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - depend
Lists List<String> - Specifies the ID list of the dependencies.
- description String
- Specifies the description of the function.
- dns
List String - The private DNS configuration of the function network.
- encrypted
User StringData - Specifies the key/value information defined to be encrypted for the function.
- fgs
Function StringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - func
Code 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. - func
Mounts List<FgsFunction V2Func Mount> - Specifies the file system list. The
func_mounts
object structure is documented below. - functiongraph
Version String - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- gpu
Memory Double - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - gpu
Type String - handler String
- Specifies the entry point of the function.
- initializer
Handler String - Specifies the initializer of the function.
- initializer
Timeout Double - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- log
Group StringId - Specifies the ID of the LTS log group.
- log
Group StringName - Specifies the name of the LTS log group.
- log
Topic StringId - Specifies the ID of the LTS log stream.
- log
Topic StringName - Specifies the name of the LTS stream.
- max
Instance StringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- memory
Size Double - Specifies the memory size allocated to the function, in MByte (MB).
- mount
User DoubleGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount
User DoubleId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - name String
- Specifies the name of the function. Changing this will create a new resource.
- network
Id String - Specifies the network ID of subnet.
- opentelekomcloud
Urn String - Uniform Resource Name.
- region String
- The region in which function graph resource is created.
- reserved
Instances List<FgsFunction V2Reserved Instance> - 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
- 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
to900
. - timeouts
Fgs
Function V2Timeouts - user
Data String - Specifies the Key/Value information defined for the function.
- version String
- The version of the function.
- versions
List<Fgs
Function V2Version> - Specifies the versions management of the function.
The
versions
structure is documented below. - vpc
Id 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.
- app
Agency string - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- code
Filename string - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - code
Type 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.
- code
Url string - Specifies the code url.
Required if the
code_type
is set to obs. - concurrency
Num number - custom
Image FgsFunction V2Custom Image - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - depend
Lists string[] - Specifies the ID list of the dependencies.
- description string
- Specifies the description of the function.
- dns
List string - The private DNS configuration of the function network.
- encrypted
User stringData - Specifies the key/value information defined to be encrypted for the function.
- fgs
Function stringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - func
Code 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. - func
Mounts FgsFunction V2Func Mount[] - Specifies the file system list. The
func_mounts
object structure is documented below. - functiongraph
Version string - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- gpu
Memory number - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - gpu
Type string - handler string
- Specifies the entry point of the function.
- initializer
Handler string - Specifies the initializer of the function.
- initializer
Timeout number - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- log
Group stringId - Specifies the ID of the LTS log group.
- log
Group stringName - Specifies the name of the LTS log group.
- log
Topic stringId - Specifies the ID of the LTS log stream.
- log
Topic stringName - Specifies the name of the LTS stream.
- max
Instance stringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- memory
Size number - Specifies the memory size allocated to the function, in MByte (MB).
- mount
User numberGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount
User numberId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - name string
- Specifies the name of the function. Changing this will create a new resource.
- network
Id string - Specifies the network ID of subnet.
- opentelekomcloud
Urn string - Uniform Resource Name.
- region string
- The region in which function graph resource is created.
- reserved
Instances FgsFunction V2Reserved Instance[] - 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
- {[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
to900
. - timeouts
Fgs
Function V2Timeouts - user
Data string - Specifies the Key/Value information defined for the function.
- version string
- The version of the function.
- versions
Fgs
Function V2Version[] - Specifies the versions management of the function.
The
versions
structure is documented below. - vpc
Id 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 FgsFunction V2Custom Image Args - 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_ strdata - Specifies the key/value information defined to be encrypted for the function.
- fgs_
function_ strv2_ id - The resource ID, consist of
urn
and currentversion
, 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[FgsFunction V2Func Mount Args] - 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
to16,384
, the value must be a multiple of1,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_ strid - Specifies the ID of the LTS log group.
- log_
group_ strname - Specifies the name of the LTS log group.
- log_
topic_ strid - Specifies the ID of the LTS log stream.
- log_
topic_ strname - Specifies the name of the LTS stream.
- max_
instance_ strnum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- memory_
size float - Specifies the memory size allocated to the function, in MByte (MB).
- mount_
user_ floatgroup_ id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount_
user_ floatid - Specifies the user ID, a non-0 integer from
–1
to65,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[FgsFunction V2Reserved Instance Args] - 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
- 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
to900
. - timeouts
Fgs
Function V2Timeouts Args - user_
data str - Specifies the Key/Value information defined for the function.
- version str
- The version of the function.
- versions
Sequence[Fgs
Function V2Version Args] - 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.
- app
Agency String - Specifies the execution agency enables you to obtain a token or an AK/SK for accessing other cloud services.
- code
Filename String - Specifies the name of a function file.
Required if the
code_type
is set to jar or zip. - code
Type 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.
- code
Url String - Specifies the code url.
Required if the
code_type
is set to obs. - concurrency
Num Number - custom
Image Property Map - Specifies the custom image configuration for creating function.
The
custom_image
structure is documented below. - depend
Lists List<String> - Specifies the ID list of the dependencies.
- description String
- Specifies the description of the function.
- dns
List String - The private DNS configuration of the function network.
- encrypted
User StringData - Specifies the key/value information defined to be encrypted for the function.
- fgs
Function StringV2Id - The resource ID, consist of
urn
and currentversion
, the format is<urn>:<version>
. - func
Code 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. - func
Mounts List<Property Map> - Specifies the file system list. The
func_mounts
object structure is documented below. - functiongraph
Version String - Specifies the FunctionGraph version, default value is v2.
The valid values are as follows:
- v1
- v2
- gpu
Memory Number - Specifies the GPU memory size allocated to the function, in MByte (MB).
The valid value ranges form
1,024
to16,384
, the value must be a multiple of1,024
. If not specified, the GPU function is disabled. - gpu
Type String - handler String
- Specifies the entry point of the function.
- initializer
Handler String - Specifies the initializer of the function.
- initializer
Timeout Number - Specifies the maximum duration the function can be initialized. Value range: 1s to 300s.
- log
Group StringId - Specifies the ID of the LTS log group.
- log
Group StringName - Specifies the name of the LTS log group.
- log
Topic StringId - Specifies the ID of the LTS log stream.
- log
Topic StringName - Specifies the name of the LTS stream.
- max
Instance StringNum - Specifies the maximum number of instances of the function.
The valid value ranges from
-1
to1,000
, defaults to400
.- The minimum value is
-1
and means the number of instances is unlimited.
- The minimum value is
- memory
Size Number - Specifies the memory size allocated to the function, in MByte (MB).
- mount
User NumberGroup Id - Specifies the user group ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - mount
User NumberId - Specifies the user ID, a non-0 integer from
–1
to65,534
. Defaults to-1
. - name String
- Specifies the name of the function. Changing this will create a new resource.
- network
Id String - Specifies the network ID of subnet.
- opentelekomcloud
Urn String - Uniform Resource Name.
- region String
- The region in which function graph resource is created.
- reserved
Instances 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
- 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
to900
. - timeouts Property Map
- user
Data 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. - vpc
Id 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
- Local
Mount stringPath - Specifies the function access path.
- Mount
Resource string - Specifies the ID of the mounted resource (corresponding cloud service).
- string
- Specifies the remote mount path. Example: 192.168.0.12:/data.
- Mount
Type string - Specifies the mount type.
- sfs
- sfsTurbo
- ecs
- Local
Mount stringPath - Specifies the function access path.
- Mount
Resource string - Specifies the ID of the mounted resource (corresponding cloud service).
- string
- Specifies the remote mount path. Example: 192.168.0.12:/data.
- Mount
Type string - Specifies the mount type.
- sfs
- sfsTurbo
- ecs
- local
Mount StringPath - Specifies the function access path.
- mount
Resource String - Specifies the ID of the mounted resource (corresponding cloud service).
- String
- Specifies the remote mount path. Example: 192.168.0.12:/data.
- mount
Type String - Specifies the mount type.
- sfs
- sfsTurbo
- ecs
- local
Mount stringPath - Specifies the function access path.
- mount
Resource string - Specifies the ID of the mounted resource (corresponding cloud service).
- string
- Specifies the remote mount path. Example: 192.168.0.12:/data.
- mount
Type string - Specifies the mount type.
- sfs
- sfsTurbo
- ecs
- local_
mount_ strpath - Specifies the function access path.
- mount_
resource str - Specifies the ID of the mounted resource (corresponding cloud service).
- str
- Specifies the remote mount path. Example: 192.168.0.12:/data.
- mount_
type str - Specifies the mount type.
- sfs
- sfsTurbo
- ecs
- local
Mount StringPath - Specifies the function access path.
- mount
Resource String - Specifies the ID of the mounted resource (corresponding cloud service).
- String
- Specifies the remote mount path. Example: 192.168.0.12:/data.
- mount
Type String - Specifies the mount type.
- sfs
- sfsTurbo
- ecs
FgsFunctionV2ReservedInstance, FgsFunctionV2ReservedInstanceArgs
- Count double
- Specifies the number of reserved instance.
The valid value ranges from
0
to1,000
. If this parameter is set to0
, the reserved instance will not run. - Qualifier
Name string - Specifies the version name or alias name.
- Qualifier
Type 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 is1.0
and reserved instances have been configured for this version, no more instances can be configured for alias1.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 FgsFunction V2Reserved Instance Tactics Config - 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
to1,000
. If this parameter is set to0
, the reserved instance will not run. - Qualifier
Name string - Specifies the version name or alias name.
- Qualifier
Type 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 is1.0
and reserved instances have been configured for this version, no more instances can be configured for alias1.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 FgsFunction V2Reserved Instance Tactics Config - 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
to1,000
. If this parameter is set to0
, the reserved instance will not run. - qualifier
Name String - Specifies the version name or alias name.
- qualifier
Type 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 is1.0
and reserved instances have been configured for this version, no more instances can be configured for alias1.0
.- idle
Mode 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. - tactics
Config FgsFunction V2Reserved Instance Tactics Config - 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
to1,000
. If this parameter is set to0
, the reserved instance will not run. - qualifier
Name string - Specifies the version name or alias name.
- qualifier
Type 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 is1.0
and reserved instances have been configured for this version, no more instances can be configured for alias1.0
.- idle
Mode 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. - tactics
Config FgsFunction V2Reserved Instance Tactics Config - 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
to1,000
. If this parameter is set to0
, 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 is1.0
and reserved instances have been configured for this version, no more instances can be configured for alias1.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 FgsFunction V2Reserved Instance Tactics Config - 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
to1,000
. If this parameter is set to0
, the reserved instance will not run. - qualifier
Name String - Specifies the version name or alias name.
- qualifier
Type 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 is1.0
and reserved instances have been configured for this version, no more instances can be configured for alias1.0
.- idle
Mode 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. - tactics
Config Property Map - Specifies the auto scaling policies for reserved instance.
The
tactics_config
structure is documented below.
FgsFunctionV2ReservedInstanceTacticsConfig, FgsFunctionV2ReservedInstanceTacticsConfigArgs
- Cron
Configs List<FgsFunction V2Reserved Instance Tactics Config Cron Config> - Specifies the list of scheduled policy configurations.
The
cron_configs
structure is documented below.
- Cron
Configs []FgsFunction V2Reserved Instance Tactics Config Cron Config - Specifies the list of scheduled policy configurations.
The
cron_configs
structure is documented below.
- cron
Configs List<FgsFunction V2Reserved Instance Tactics Config Cron Config> - Specifies the list of scheduled policy configurations.
The
cron_configs
structure is documented below.
- cron
Configs FgsFunction V2Reserved Instance Tactics Config Cron Config[] - Specifies the list of scheduled policy configurations.
The
cron_configs
structure is documented below.
- cron_
configs Sequence[FgsFunction V2Reserved Instance Tactics Config Cron Config] - Specifies the list of scheduled policy configurations.
The
cron_configs
structure is documented below.
- cron
Configs 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
to1,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.
- Expired
Time 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
to60
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 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
to1,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.
- Expired
Time 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
to60
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 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
to1,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.
- expired
Time 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
to60
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 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
to1,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.
- expired
Time 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
to60
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 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
to1,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
to60
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
to1,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.
- expired
Time 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
to60
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 Number - Specifies the effective timestamp of policy. The unit is
s
, e.g. 1740560074.
FgsFunctionV2Timeouts, FgsFunctionV2TimeoutsArgs
FgsFunctionV2Version, FgsFunctionV2VersionArgs
- Name string
Specifies the version name.
Currently, only supports the management of the default version (latest).
- Aliases
Fgs
Function V2Version Aliases - 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
Fgs
Function V2Version Aliases - 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
Fgs
Function V2Version Aliases - 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
Fgs
Function V2Version Aliases - 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
Fgs
Function V2Version Aliases - 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.