published on Friday, Aug 14, 2026 by tencentcloudstack
published on Friday, Aug 14, 2026 by tencentcloudstack
Provides a resource to create a SCF (Serverless Cloud Function) trigger.
NOTE: Using it alongside
tencentcloud_scf_function.triggerwill cause a conflict.
NOTE: Using it alongside
tencentcloud.ScfTriggerConfigwill cause a conflict.
Example Usage
Create an HTTP-type trigger
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.ScfFunction("foo", {
asyncRunEnable: "FALSE",
cosBucketName: "tf-test-1308726196",
cosBucketRegion: "ap-guangzhou",
cosObjectName: "/tf-test.zip",
description: "helloworld-tftest",
dnsCache: false,
enableEipConfig: false,
enablePublicNet: true,
environment: {},
funcType: "Event",
handler: "index.main_handler",
l5Enable: false,
memSize: 128,
name: "helloworld-tf",
namespace: "default",
role: null,
runtime: "Python3.9",
subnetId: null,
tags: {},
timeout: 3,
vpcId: null,
zipFile: null,
intranetConfig: {
ipFixed: "DISABLE",
},
});
const functionVersion = new tencentcloud.ScfFunctionVersion("function_version", {
functionName: foo.name,
namespace: foo.namespace,
description: "tftest1",
});
const http = new tencentcloud.ScfTrigger("http", {
enable: "OPEN",
functionName: foo.name,
namespace: foo.namespace,
qualifier: functionVersion.functionVersion,
triggerDesc: JSON.stringify({
ApiGwCompatible: true,
AuthType: "NONE",
CorsConfig: {
Credentials: false,
Enable: false,
MaxAge: 0,
},
EnableSimpleMode: false,
NetConfig: {
EnableExtranet: false,
EnableIntranet: true,
},
}),
type: "http",
});
import pulumi
import json
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.ScfFunction("foo",
async_run_enable="FALSE",
cos_bucket_name="tf-test-1308726196",
cos_bucket_region="ap-guangzhou",
cos_object_name="/tf-test.zip",
description="helloworld-tftest",
dns_cache=False,
enable_eip_config=False,
enable_public_net=True,
environment={},
func_type="Event",
handler="index.main_handler",
l5_enable=False,
mem_size=128,
name="helloworld-tf",
namespace="default",
role=None,
runtime="Python3.9",
subnet_id=None,
tags={},
timeout=3,
vpc_id=None,
zip_file=None,
intranet_config={
"ip_fixed": "DISABLE",
})
function_version = tencentcloud.ScfFunctionVersion("function_version",
function_name=foo.name,
namespace=foo.namespace,
description="tftest1")
http = tencentcloud.ScfTrigger("http",
enable="OPEN",
function_name=foo.name,
namespace=foo.namespace,
qualifier=function_version.function_version,
trigger_desc=json.dumps({
"ApiGwCompatible": True,
"AuthType": "NONE",
"CorsConfig": {
"Credentials": False,
"Enable": False,
"MaxAge": 0,
},
"EnableSimpleMode": False,
"NetConfig": {
"EnableExtranet": False,
"EnableIntranet": True,
},
}),
type="http")
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := tencentcloud.NewScfFunction(ctx, "foo", &tencentcloud.ScfFunctionArgs{
AsyncRunEnable: pulumi.String("FALSE"),
CosBucketName: pulumi.String("tf-test-1308726196"),
CosBucketRegion: pulumi.String("ap-guangzhou"),
CosObjectName: pulumi.String("/tf-test.zip"),
Description: pulumi.String("helloworld-tftest"),
DnsCache: pulumi.Bool(false),
EnableEipConfig: pulumi.Bool(false),
EnablePublicNet: pulumi.Bool(true),
Environment: pulumi.StringMap{},
FuncType: pulumi.String("Event"),
Handler: pulumi.String("index.main_handler"),
L5Enable: pulumi.Bool(false),
MemSize: pulumi.Float64(128),
Name: pulumi.String("helloworld-tf"),
Namespace: pulumi.String("default"),
Role: nil,
Runtime: pulumi.String("Python3.9"),
SubnetId: nil,
Tags: pulumi.StringMap{},
Timeout: pulumi.Float64(3),
VpcId: nil,
ZipFile: nil,
IntranetConfig: &tencentcloud.ScfFunctionIntranetConfigArgs{
IpFixed: pulumi.String("DISABLE"),
},
})
if err != nil {
return err
}
functionVersion, err := tencentcloud.NewScfFunctionVersion(ctx, "function_version", &tencentcloud.ScfFunctionVersionArgs{
FunctionName: foo.Name,
Namespace: foo.Namespace,
Description: pulumi.String("tftest1"),
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"ApiGwCompatible": true,
"AuthType": "NONE",
"CorsConfig": map[string]interface{}{
"Credentials": false,
"Enable": false,
"MaxAge": 0,
},
"EnableSimpleMode": false,
"NetConfig": map[string]interface{}{
"EnableExtranet": false,
"EnableIntranet": true,
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = tencentcloud.NewScfTrigger(ctx, "http", &tencentcloud.ScfTriggerArgs{
Enable: pulumi.String("OPEN"),
FunctionName: foo.Name,
Namespace: foo.Namespace,
Qualifier: functionVersion.FunctionVersion,
TriggerDesc: pulumi.String(json0),
Type: pulumi.String("http"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var foo = new Tencentcloud.ScfFunction("foo", new()
{
AsyncRunEnable = "FALSE",
CosBucketName = "tf-test-1308726196",
CosBucketRegion = "ap-guangzhou",
CosObjectName = "/tf-test.zip",
Description = "helloworld-tftest",
DnsCache = false,
EnableEipConfig = false,
EnablePublicNet = true,
Environment = null,
FuncType = "Event",
Handler = "index.main_handler",
L5Enable = false,
MemSize = 128,
Name = "helloworld-tf",
Namespace = "default",
Role = null,
Runtime = "Python3.9",
SubnetId = null,
Tags = null,
Timeout = 3,
VpcId = null,
ZipFile = null,
IntranetConfig = new Tencentcloud.Inputs.ScfFunctionIntranetConfigArgs
{
IpFixed = "DISABLE",
},
});
var functionVersion = new Tencentcloud.ScfFunctionVersion("function_version", new()
{
FunctionName = foo.Name,
Namespace = foo.Namespace,
Description = "tftest1",
});
var http = new Tencentcloud.ScfTrigger("http", new()
{
Enable = "OPEN",
FunctionName = foo.Name,
Namespace = foo.Namespace,
Qualifier = functionVersion.FunctionVersion,
TriggerDesc = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["ApiGwCompatible"] = true,
["AuthType"] = "NONE",
["CorsConfig"] = new Dictionary<string, object?>
{
["Credentials"] = false,
["Enable"] = false,
["MaxAge"] = 0,
},
["EnableSimpleMode"] = false,
["NetConfig"] = new Dictionary<string, object?>
{
["EnableExtranet"] = false,
["EnableIntranet"] = true,
},
}),
Type = "http",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ScfFunction;
import com.pulumi.tencentcloud.ScfFunctionArgs;
import com.pulumi.tencentcloud.inputs.ScfFunctionIntranetConfigArgs;
import com.pulumi.tencentcloud.ScfFunctionVersion;
import com.pulumi.tencentcloud.ScfFunctionVersionArgs;
import com.pulumi.tencentcloud.ScfTrigger;
import com.pulumi.tencentcloud.ScfTriggerArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new ScfFunction("foo", ScfFunctionArgs.builder()
.asyncRunEnable("FALSE")
.cosBucketName("tf-test-1308726196")
.cosBucketRegion("ap-guangzhou")
.cosObjectName("/tf-test.zip")
.description("helloworld-tftest")
.dnsCache(false)
.enableEipConfig(false)
.enablePublicNet(true)
.environment(Map.ofEntries(
))
.funcType("Event")
.handler("index.main_handler")
.l5Enable(false)
.memSize(128.0)
.name("helloworld-tf")
.namespace("default")
.role(null)
.runtime("Python3.9")
.subnetId(null)
.tags(Map.ofEntries(
))
.timeout(3.0)
.vpcId(null)
.zipFile(null)
.intranetConfig(ScfFunctionIntranetConfigArgs.builder()
.ipFixed("DISABLE")
.build())
.build());
var functionVersion = new ScfFunctionVersion("functionVersion", ScfFunctionVersionArgs.builder()
.functionName(foo.name())
.namespace(foo.namespace())
.description("tftest1")
.build());
var http = new ScfTrigger("http", ScfTriggerArgs.builder()
.enable("OPEN")
.functionName(foo.name())
.namespace(foo.namespace())
.qualifier(functionVersion.functionVersion())
.triggerDesc(serializeJson(
jsonObject(
jsonProperty("ApiGwCompatible", true),
jsonProperty("AuthType", "NONE"),
jsonProperty("CorsConfig", jsonObject(
jsonProperty("Credentials", false),
jsonProperty("Enable", false),
jsonProperty("MaxAge", 0)
)),
jsonProperty("EnableSimpleMode", false),
jsonProperty("NetConfig", jsonObject(
jsonProperty("EnableExtranet", false),
jsonProperty("EnableIntranet", true)
))
)))
.type("http")
.build());
}
}
resources:
foo:
type: tencentcloud:ScfFunction
properties:
asyncRunEnable: FALSE
cosBucketName: tf-test-1308726196
cosBucketRegion: ap-guangzhou
cosObjectName: /tf-test.zip
description: helloworld-tftest
dnsCache: false
enableEipConfig: false
enablePublicNet: true
environment: {}
funcType: Event
handler: index.main_handler
l5Enable: false
memSize: 128
name: helloworld-tf
namespace: default
role: null
runtime: Python3.9
subnetId: null
tags: {}
timeout: 3
vpcId: null
zipFile: null
intranetConfig:
ipFixed: DISABLE
functionVersion:
type: tencentcloud:ScfFunctionVersion
name: function_version
properties:
functionName: ${foo.name}
namespace: ${foo.namespace}
description: tftest1
http:
type: tencentcloud:ScfTrigger
properties:
enable: OPEN
functionName: ${foo.name}
namespace: ${foo.namespace}
qualifier: ${functionVersion.functionVersion}
triggerDesc:
fn::toJSON:
ApiGwCompatible: true
AuthType: NONE
CorsConfig:
Credentials: false
Enable: false
MaxAge: 0
EnableSimpleMode: false
NetConfig:
EnableExtranet: false
EnableIntranet: true
type: http
Example coming soon!
Create a timer-type trigger.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.ScfFunction("foo", {
asyncRunEnable: "FALSE",
cosBucketName: "tf-test-1308726196",
cosBucketRegion: "ap-guangzhou",
cosObjectName: "/tf-test.zip",
description: "helloworld-tftest",
dnsCache: false,
enableEipConfig: false,
enablePublicNet: true,
environment: {},
funcType: "Event",
handler: "index.main_handler",
l5Enable: false,
memSize: 128,
name: "helloworld-tf",
namespace: "default",
role: null,
runtime: "Python3.9",
subnetId: null,
tags: {},
timeout: 3,
vpcId: null,
zipFile: null,
intranetConfig: {
ipFixed: "DISABLE",
},
});
const functionVersion = new tencentcloud.ScfFunctionVersion("function_version", {
functionName: foo.name,
namespace: foo.namespace,
description: "tftest1",
});
const timer = new tencentcloud.ScfTrigger("timer", {
functionName: foo.name,
namespace: foo.namespace,
qualifier: functionVersion.functionVersion,
customArgument: null,
description: null,
enable: "OPEN",
triggerDesc: "0 0 0 */1 * * *",
triggerName: "tf-test-timer",
type: "timer",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.ScfFunction("foo",
async_run_enable="FALSE",
cos_bucket_name="tf-test-1308726196",
cos_bucket_region="ap-guangzhou",
cos_object_name="/tf-test.zip",
description="helloworld-tftest",
dns_cache=False,
enable_eip_config=False,
enable_public_net=True,
environment={},
func_type="Event",
handler="index.main_handler",
l5_enable=False,
mem_size=128,
name="helloworld-tf",
namespace="default",
role=None,
runtime="Python3.9",
subnet_id=None,
tags={},
timeout=3,
vpc_id=None,
zip_file=None,
intranet_config={
"ip_fixed": "DISABLE",
})
function_version = tencentcloud.ScfFunctionVersion("function_version",
function_name=foo.name,
namespace=foo.namespace,
description="tftest1")
timer = tencentcloud.ScfTrigger("timer",
function_name=foo.name,
namespace=foo.namespace,
qualifier=function_version.function_version,
custom_argument=None,
description=None,
enable="OPEN",
trigger_desc="0 0 0 */1 * * *",
trigger_name="tf-test-timer",
type="timer")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := tencentcloud.NewScfFunction(ctx, "foo", &tencentcloud.ScfFunctionArgs{
AsyncRunEnable: pulumi.String("FALSE"),
CosBucketName: pulumi.String("tf-test-1308726196"),
CosBucketRegion: pulumi.String("ap-guangzhou"),
CosObjectName: pulumi.String("/tf-test.zip"),
Description: pulumi.String("helloworld-tftest"),
DnsCache: pulumi.Bool(false),
EnableEipConfig: pulumi.Bool(false),
EnablePublicNet: pulumi.Bool(true),
Environment: pulumi.StringMap{},
FuncType: pulumi.String("Event"),
Handler: pulumi.String("index.main_handler"),
L5Enable: pulumi.Bool(false),
MemSize: pulumi.Float64(128),
Name: pulumi.String("helloworld-tf"),
Namespace: pulumi.String("default"),
Role: nil,
Runtime: pulumi.String("Python3.9"),
SubnetId: nil,
Tags: pulumi.StringMap{},
Timeout: pulumi.Float64(3),
VpcId: nil,
ZipFile: nil,
IntranetConfig: &tencentcloud.ScfFunctionIntranetConfigArgs{
IpFixed: pulumi.String("DISABLE"),
},
})
if err != nil {
return err
}
functionVersion, err := tencentcloud.NewScfFunctionVersion(ctx, "function_version", &tencentcloud.ScfFunctionVersionArgs{
FunctionName: foo.Name,
Namespace: foo.Namespace,
Description: pulumi.String("tftest1"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewScfTrigger(ctx, "timer", &tencentcloud.ScfTriggerArgs{
FunctionName: foo.Name,
Namespace: foo.Namespace,
Qualifier: functionVersion.FunctionVersion,
CustomArgument: nil,
Description: nil,
Enable: pulumi.String("OPEN"),
TriggerDesc: pulumi.String("0 0 0 */1 * * *"),
TriggerName: pulumi.String("tf-test-timer"),
Type: pulumi.String("timer"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var foo = new Tencentcloud.ScfFunction("foo", new()
{
AsyncRunEnable = "FALSE",
CosBucketName = "tf-test-1308726196",
CosBucketRegion = "ap-guangzhou",
CosObjectName = "/tf-test.zip",
Description = "helloworld-tftest",
DnsCache = false,
EnableEipConfig = false,
EnablePublicNet = true,
Environment = null,
FuncType = "Event",
Handler = "index.main_handler",
L5Enable = false,
MemSize = 128,
Name = "helloworld-tf",
Namespace = "default",
Role = null,
Runtime = "Python3.9",
SubnetId = null,
Tags = null,
Timeout = 3,
VpcId = null,
ZipFile = null,
IntranetConfig = new Tencentcloud.Inputs.ScfFunctionIntranetConfigArgs
{
IpFixed = "DISABLE",
},
});
var functionVersion = new Tencentcloud.ScfFunctionVersion("function_version", new()
{
FunctionName = foo.Name,
Namespace = foo.Namespace,
Description = "tftest1",
});
var timer = new Tencentcloud.ScfTrigger("timer", new()
{
FunctionName = foo.Name,
Namespace = foo.Namespace,
Qualifier = functionVersion.FunctionVersion,
CustomArgument = null,
Description = null,
Enable = "OPEN",
TriggerDesc = "0 0 0 */1 * * *",
TriggerName = "tf-test-timer",
Type = "timer",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ScfFunction;
import com.pulumi.tencentcloud.ScfFunctionArgs;
import com.pulumi.tencentcloud.inputs.ScfFunctionIntranetConfigArgs;
import com.pulumi.tencentcloud.ScfFunctionVersion;
import com.pulumi.tencentcloud.ScfFunctionVersionArgs;
import com.pulumi.tencentcloud.ScfTrigger;
import com.pulumi.tencentcloud.ScfTriggerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new ScfFunction("foo", ScfFunctionArgs.builder()
.asyncRunEnable("FALSE")
.cosBucketName("tf-test-1308726196")
.cosBucketRegion("ap-guangzhou")
.cosObjectName("/tf-test.zip")
.description("helloworld-tftest")
.dnsCache(false)
.enableEipConfig(false)
.enablePublicNet(true)
.environment(Map.ofEntries(
))
.funcType("Event")
.handler("index.main_handler")
.l5Enable(false)
.memSize(128.0)
.name("helloworld-tf")
.namespace("default")
.role(null)
.runtime("Python3.9")
.subnetId(null)
.tags(Map.ofEntries(
))
.timeout(3.0)
.vpcId(null)
.zipFile(null)
.intranetConfig(ScfFunctionIntranetConfigArgs.builder()
.ipFixed("DISABLE")
.build())
.build());
var functionVersion = new ScfFunctionVersion("functionVersion", ScfFunctionVersionArgs.builder()
.functionName(foo.name())
.namespace(foo.namespace())
.description("tftest1")
.build());
var timer = new ScfTrigger("timer", ScfTriggerArgs.builder()
.functionName(foo.name())
.namespace(foo.namespace())
.qualifier(functionVersion.functionVersion())
.customArgument(null)
.description(null)
.enable("OPEN")
.triggerDesc("0 0 0 */1 * * *")
.triggerName("tf-test-timer")
.type("timer")
.build());
}
}
resources:
foo:
type: tencentcloud:ScfFunction
properties:
asyncRunEnable: FALSE
cosBucketName: tf-test-1308726196
cosBucketRegion: ap-guangzhou
cosObjectName: /tf-test.zip
description: helloworld-tftest
dnsCache: false
enableEipConfig: false
enablePublicNet: true
environment: {}
funcType: Event
handler: index.main_handler
l5Enable: false
memSize: 128
name: helloworld-tf
namespace: default
role: null
runtime: Python3.9
subnetId: null
tags: {}
timeout: 3
vpcId: null
zipFile: null
intranetConfig:
ipFixed: DISABLE
functionVersion:
type: tencentcloud:ScfFunctionVersion
name: function_version
properties:
functionName: ${foo.name}
namespace: ${foo.namespace}
description: tftest1
timer:
type: tencentcloud:ScfTrigger
properties:
functionName: ${foo.name}
namespace: ${foo.namespace}
qualifier: ${functionVersion.functionVersion}
customArgument: null
description: null
enable: OPEN
triggerDesc: 0 0 0 */1 * * *
triggerName: tf-test-timer
type: timer
Example coming soon!
Create a ckafka-type trigger.
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.ScfFunction("foo", {
asyncRunEnable: "FALSE",
cosBucketName: "tf-test-1308726196",
cosBucketRegion: "ap-guangzhou",
cosObjectName: "/tf-test.zip",
description: "helloworld-tftest",
dnsCache: false,
enableEipConfig: false,
enablePublicNet: true,
environment: {},
funcType: "Event",
handler: "index.main_handler",
l5Enable: false,
memSize: 128,
name: "helloworld-tf",
namespace: "default",
role: null,
runtime: "Python3.9",
subnetId: null,
tags: {},
timeout: 3,
vpcId: null,
zipFile: null,
intranetConfig: {
ipFixed: "DISABLE",
},
});
const functionVersion = new tencentcloud.ScfFunctionVersion("function_version", {
functionName: foo.name,
namespace: foo.namespace,
description: "tftest1",
});
const kafka = new tencentcloud.ScfTrigger("kafka", {
customArgument: null,
description: "tf test",
enable: "OPEN",
functionName: foo.name,
namespace: foo.namespace,
qualifier: functionVersion.functionVersion,
triggerDesc: JSON.stringify({
VIPList: ["11.135.14.109:26246"],
consumerGroupName: "scf_ckafka-4kdjmwvztf-testhelloworld-tf_DEFAULT",
instanceId: "ckafka-4kdjmwvz",
isInSequence: "Yes",
kafkaStatus: "NORMAL",
maxMsgNum: 100,
maxSingleMsgSize: 100,
maxTotalMsgSize: 100,
offset: "latest",
partitionNum: 3,
retry: 10000,
timeOut: 50,
topicId: "topic-bjmcknbs",
topicName: "tf-test",
topicStatus: "NORMAL",
}),
triggerName: "ckafka-4kdjmwvz-tf-test",
type: "ckafka",
});
import pulumi
import json
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.ScfFunction("foo",
async_run_enable="FALSE",
cos_bucket_name="tf-test-1308726196",
cos_bucket_region="ap-guangzhou",
cos_object_name="/tf-test.zip",
description="helloworld-tftest",
dns_cache=False,
enable_eip_config=False,
enable_public_net=True,
environment={},
func_type="Event",
handler="index.main_handler",
l5_enable=False,
mem_size=128,
name="helloworld-tf",
namespace="default",
role=None,
runtime="Python3.9",
subnet_id=None,
tags={},
timeout=3,
vpc_id=None,
zip_file=None,
intranet_config={
"ip_fixed": "DISABLE",
})
function_version = tencentcloud.ScfFunctionVersion("function_version",
function_name=foo.name,
namespace=foo.namespace,
description="tftest1")
kafka = tencentcloud.ScfTrigger("kafka",
custom_argument=None,
description="tf test",
enable="OPEN",
function_name=foo.name,
namespace=foo.namespace,
qualifier=function_version.function_version,
trigger_desc=json.dumps({
"VIPList": ["11.135.14.109:26246"],
"consumerGroupName": "scf_ckafka-4kdjmwvztf-testhelloworld-tf_DEFAULT",
"instanceId": "ckafka-4kdjmwvz",
"isInSequence": "Yes",
"kafkaStatus": "NORMAL",
"maxMsgNum": 100,
"maxSingleMsgSize": 100,
"maxTotalMsgSize": 100,
"offset": "latest",
"partitionNum": 3,
"retry": 10000,
"timeOut": 50,
"topicId": "topic-bjmcknbs",
"topicName": "tf-test",
"topicStatus": "NORMAL",
}),
trigger_name="ckafka-4kdjmwvz-tf-test",
type="ckafka")
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := tencentcloud.NewScfFunction(ctx, "foo", &tencentcloud.ScfFunctionArgs{
AsyncRunEnable: pulumi.String("FALSE"),
CosBucketName: pulumi.String("tf-test-1308726196"),
CosBucketRegion: pulumi.String("ap-guangzhou"),
CosObjectName: pulumi.String("/tf-test.zip"),
Description: pulumi.String("helloworld-tftest"),
DnsCache: pulumi.Bool(false),
EnableEipConfig: pulumi.Bool(false),
EnablePublicNet: pulumi.Bool(true),
Environment: pulumi.StringMap{},
FuncType: pulumi.String("Event"),
Handler: pulumi.String("index.main_handler"),
L5Enable: pulumi.Bool(false),
MemSize: pulumi.Float64(128),
Name: pulumi.String("helloworld-tf"),
Namespace: pulumi.String("default"),
Role: nil,
Runtime: pulumi.String("Python3.9"),
SubnetId: nil,
Tags: pulumi.StringMap{},
Timeout: pulumi.Float64(3),
VpcId: nil,
ZipFile: nil,
IntranetConfig: &tencentcloud.ScfFunctionIntranetConfigArgs{
IpFixed: pulumi.String("DISABLE"),
},
})
if err != nil {
return err
}
functionVersion, err := tencentcloud.NewScfFunctionVersion(ctx, "function_version", &tencentcloud.ScfFunctionVersionArgs{
FunctionName: foo.Name,
Namespace: foo.Namespace,
Description: pulumi.String("tftest1"),
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"VIPList": []string{
"11.135.14.109:26246",
},
"consumerGroupName": "scf_ckafka-4kdjmwvztf-testhelloworld-tf_DEFAULT",
"instanceId": "ckafka-4kdjmwvz",
"isInSequence": "Yes",
"kafkaStatus": "NORMAL",
"maxMsgNum": 100,
"maxSingleMsgSize": 100,
"maxTotalMsgSize": 100,
"offset": "latest",
"partitionNum": 3,
"retry": 10000,
"timeOut": 50,
"topicId": "topic-bjmcknbs",
"topicName": "tf-test",
"topicStatus": "NORMAL",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = tencentcloud.NewScfTrigger(ctx, "kafka", &tencentcloud.ScfTriggerArgs{
CustomArgument: nil,
Description: pulumi.String("tf test"),
Enable: pulumi.String("OPEN"),
FunctionName: foo.Name,
Namespace: foo.Namespace,
Qualifier: functionVersion.FunctionVersion,
TriggerDesc: pulumi.String(json0),
TriggerName: pulumi.String("ckafka-4kdjmwvz-tf-test"),
Type: pulumi.String("ckafka"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var foo = new Tencentcloud.ScfFunction("foo", new()
{
AsyncRunEnable = "FALSE",
CosBucketName = "tf-test-1308726196",
CosBucketRegion = "ap-guangzhou",
CosObjectName = "/tf-test.zip",
Description = "helloworld-tftest",
DnsCache = false,
EnableEipConfig = false,
EnablePublicNet = true,
Environment = null,
FuncType = "Event",
Handler = "index.main_handler",
L5Enable = false,
MemSize = 128,
Name = "helloworld-tf",
Namespace = "default",
Role = null,
Runtime = "Python3.9",
SubnetId = null,
Tags = null,
Timeout = 3,
VpcId = null,
ZipFile = null,
IntranetConfig = new Tencentcloud.Inputs.ScfFunctionIntranetConfigArgs
{
IpFixed = "DISABLE",
},
});
var functionVersion = new Tencentcloud.ScfFunctionVersion("function_version", new()
{
FunctionName = foo.Name,
Namespace = foo.Namespace,
Description = "tftest1",
});
var kafka = new Tencentcloud.ScfTrigger("kafka", new()
{
CustomArgument = null,
Description = "tf test",
Enable = "OPEN",
FunctionName = foo.Name,
Namespace = foo.Namespace,
Qualifier = functionVersion.FunctionVersion,
TriggerDesc = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["VIPList"] = new[]
{
"11.135.14.109:26246",
},
["consumerGroupName"] = "scf_ckafka-4kdjmwvztf-testhelloworld-tf_DEFAULT",
["instanceId"] = "ckafka-4kdjmwvz",
["isInSequence"] = "Yes",
["kafkaStatus"] = "NORMAL",
["maxMsgNum"] = 100,
["maxSingleMsgSize"] = 100,
["maxTotalMsgSize"] = 100,
["offset"] = "latest",
["partitionNum"] = 3,
["retry"] = 10000,
["timeOut"] = 50,
["topicId"] = "topic-bjmcknbs",
["topicName"] = "tf-test",
["topicStatus"] = "NORMAL",
}),
TriggerName = "ckafka-4kdjmwvz-tf-test",
Type = "ckafka",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ScfFunction;
import com.pulumi.tencentcloud.ScfFunctionArgs;
import com.pulumi.tencentcloud.inputs.ScfFunctionIntranetConfigArgs;
import com.pulumi.tencentcloud.ScfFunctionVersion;
import com.pulumi.tencentcloud.ScfFunctionVersionArgs;
import com.pulumi.tencentcloud.ScfTrigger;
import com.pulumi.tencentcloud.ScfTriggerArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new ScfFunction("foo", ScfFunctionArgs.builder()
.asyncRunEnable("FALSE")
.cosBucketName("tf-test-1308726196")
.cosBucketRegion("ap-guangzhou")
.cosObjectName("/tf-test.zip")
.description("helloworld-tftest")
.dnsCache(false)
.enableEipConfig(false)
.enablePublicNet(true)
.environment(Map.ofEntries(
))
.funcType("Event")
.handler("index.main_handler")
.l5Enable(false)
.memSize(128.0)
.name("helloworld-tf")
.namespace("default")
.role(null)
.runtime("Python3.9")
.subnetId(null)
.tags(Map.ofEntries(
))
.timeout(3.0)
.vpcId(null)
.zipFile(null)
.intranetConfig(ScfFunctionIntranetConfigArgs.builder()
.ipFixed("DISABLE")
.build())
.build());
var functionVersion = new ScfFunctionVersion("functionVersion", ScfFunctionVersionArgs.builder()
.functionName(foo.name())
.namespace(foo.namespace())
.description("tftest1")
.build());
var kafka = new ScfTrigger("kafka", ScfTriggerArgs.builder()
.customArgument(null)
.description("tf test")
.enable("OPEN")
.functionName(foo.name())
.namespace(foo.namespace())
.qualifier(functionVersion.functionVersion())
.triggerDesc(serializeJson(
jsonObject(
jsonProperty("VIPList", jsonArray("11.135.14.109:26246")),
jsonProperty("consumerGroupName", "scf_ckafka-4kdjmwvztf-testhelloworld-tf_DEFAULT"),
jsonProperty("instanceId", "ckafka-4kdjmwvz"),
jsonProperty("isInSequence", "Yes"),
jsonProperty("kafkaStatus", "NORMAL"),
jsonProperty("maxMsgNum", 100),
jsonProperty("maxSingleMsgSize", 100),
jsonProperty("maxTotalMsgSize", 100),
jsonProperty("offset", "latest"),
jsonProperty("partitionNum", 3),
jsonProperty("retry", 10000),
jsonProperty("timeOut", 50),
jsonProperty("topicId", "topic-bjmcknbs"),
jsonProperty("topicName", "tf-test"),
jsonProperty("topicStatus", "NORMAL")
)))
.triggerName("ckafka-4kdjmwvz-tf-test")
.type("ckafka")
.build());
}
}
resources:
foo:
type: tencentcloud:ScfFunction
properties:
asyncRunEnable: FALSE
cosBucketName: tf-test-1308726196
cosBucketRegion: ap-guangzhou
cosObjectName: /tf-test.zip
description: helloworld-tftest
dnsCache: false
enableEipConfig: false
enablePublicNet: true
environment: {}
funcType: Event
handler: index.main_handler
l5Enable: false
memSize: 128
name: helloworld-tf
namespace: default
role: null
runtime: Python3.9
subnetId: null
tags: {}
timeout: 3
vpcId: null
zipFile: null
intranetConfig:
ipFixed: DISABLE
functionVersion:
type: tencentcloud:ScfFunctionVersion
name: function_version
properties:
functionName: ${foo.name}
namespace: ${foo.namespace}
description: tftest1
kafka:
type: tencentcloud:ScfTrigger
properties:
customArgument: null
description: tf test
enable: OPEN
functionName: ${foo.name}
namespace: ${foo.namespace}
qualifier: ${functionVersion.functionVersion}
triggerDesc:
fn::toJSON:
VIPList:
- 11.135.14.109:26246
consumerGroupName: scf_ckafka-4kdjmwvztf-testhelloworld-tf_DEFAULT
instanceId: ckafka-4kdjmwvz
isInSequence: Yes
kafkaStatus: NORMAL
maxMsgNum: 100
maxSingleMsgSize: 100
maxTotalMsgSize: 100
offset: latest
partitionNum: 3
retry: 10000
timeOut: 50
topicId: topic-bjmcknbs
topicName: tf-test
topicStatus: NORMAL
triggerName: ckafka-4kdjmwvz-tf-test
type: ckafka
Example coming soon!
Create ScfTrigger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScfTrigger(name: string, args: ScfTriggerArgs, opts?: CustomResourceOptions);@overload
def ScfTrigger(resource_name: str,
args: ScfTriggerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScfTrigger(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_name: Optional[str] = None,
namespace: Optional[str] = None,
type: Optional[str] = None,
custom_argument: Optional[str] = None,
description: Optional[str] = None,
enable: Optional[str] = None,
qualifier: Optional[str] = None,
scf_trigger_id: Optional[str] = None,
trigger_desc: Optional[str] = None,
trigger_name: Optional[str] = None)func NewScfTrigger(ctx *Context, name string, args ScfTriggerArgs, opts ...ResourceOption) (*ScfTrigger, error)public ScfTrigger(string name, ScfTriggerArgs args, CustomResourceOptions? opts = null)
public ScfTrigger(String name, ScfTriggerArgs args)
public ScfTrigger(String name, ScfTriggerArgs args, CustomResourceOptions options)
type: tencentcloud:ScfTrigger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_scf_trigger" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ScfTriggerArgs
- 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 ScfTriggerArgs
- 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 ScfTriggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScfTriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScfTriggerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ScfTrigger 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 ScfTrigger resource accepts the following input properties:
- Function
Name string - Name of the SCF function that the trigger binds to.
- Namespace string
- Function namespace. Defaults to
default. - Type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF). - Custom
Argument string - User custom parameter, only supported by timer trigger.
- Description string
- Trigger description.
- Enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - Qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - Scf
Trigger stringId - ID of the resource.
- Trigger
Desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- Trigger
Name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com.
- Function
Name string - Name of the SCF function that the trigger binds to.
- Namespace string
- Function namespace. Defaults to
default. - Type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF). - Custom
Argument string - User custom parameter, only supported by timer trigger.
- Description string
- Trigger description.
- Enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - Qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - Scf
Trigger stringId - ID of the resource.
- Trigger
Desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- Trigger
Name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com.
- function_
name string - Name of the SCF function that the trigger binds to.
- namespace string
- Function namespace. Defaults to
default. - type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF). - custom_
argument string - User custom parameter, only supported by timer trigger.
- description string
- Trigger description.
- enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf_
trigger_ stringid - ID of the resource.
- trigger_
desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger_
name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com.
- function
Name String - Name of the SCF function that the trigger binds to.
- namespace String
- Function namespace. Defaults to
default. - type String
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF). - custom
Argument String - User custom parameter, only supported by timer trigger.
- description String
- Trigger description.
- enable String
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - qualifier String
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf
Trigger StringId - ID of the resource.
- trigger
Desc String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Name String - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com.
- function
Name string - Name of the SCF function that the trigger binds to.
- namespace string
- Function namespace. Defaults to
default. - type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF). - custom
Argument string - User custom parameter, only supported by timer trigger.
- description string
- Trigger description.
- enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf
Trigger stringId - ID of the resource.
- trigger
Desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com.
- function_
name str - Name of the SCF function that the trigger binds to.
- namespace str
- Function namespace. Defaults to
default. - type str
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF). - custom_
argument str - User custom parameter, only supported by timer trigger.
- description str
- Trigger description.
- enable str
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - qualifier str
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf_
trigger_ strid - ID of the resource.
- trigger_
desc str - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger_
name str - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com.
- function
Name String - Name of the SCF function that the trigger binds to.
- namespace String
- Function namespace. Defaults to
default. - type String
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF). - custom
Argument String - User custom parameter, only supported by timer trigger.
- description String
- Trigger description.
- enable String
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - qualifier String
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf
Trigger StringId - ID of the resource.
- trigger
Desc String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Name String - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScfTrigger resource produces the following output properties:
- Add
Time string - Trigger creation time.
- Available
Status string - Trigger available status.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mod
Time string - Trigger last modified time.
- Trigger
Attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- Add
Time string - Trigger creation time.
- Available
Status string - Trigger available status.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mod
Time string - Trigger last modified time.
- Trigger
Attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- add_
time string - Trigger creation time.
- available_
status string - Trigger available status.
- id string
- The provider-assigned unique ID for this managed resource.
- mod_
time string - Trigger last modified time.
- trigger_
attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- add
Time String - Trigger creation time.
- available
Status String - Trigger available status.
- id String
- The provider-assigned unique ID for this managed resource.
- mod
Time String - Trigger last modified time.
- trigger
Attribute String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- add
Time string - Trigger creation time.
- available
Status string - Trigger available status.
- id string
- The provider-assigned unique ID for this managed resource.
- mod
Time string - Trigger last modified time.
- trigger
Attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- add_
time str - Trigger creation time.
- available_
status str - Trigger available status.
- id str
- The provider-assigned unique ID for this managed resource.
- mod_
time str - Trigger last modified time.
- trigger_
attribute str - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- add
Time String - Trigger creation time.
- available
Status String - Trigger available status.
- id String
- The provider-assigned unique ID for this managed resource.
- mod
Time String - Trigger last modified time.
- trigger
Attribute String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
Look up Existing ScfTrigger Resource
Get an existing ScfTrigger 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?: ScfTriggerState, opts?: CustomResourceOptions): ScfTrigger@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
add_time: Optional[str] = None,
available_status: Optional[str] = None,
custom_argument: Optional[str] = None,
description: Optional[str] = None,
enable: Optional[str] = None,
function_name: Optional[str] = None,
mod_time: Optional[str] = None,
namespace: Optional[str] = None,
qualifier: Optional[str] = None,
scf_trigger_id: Optional[str] = None,
trigger_attribute: Optional[str] = None,
trigger_desc: Optional[str] = None,
trigger_name: Optional[str] = None,
type: Optional[str] = None) -> ScfTriggerfunc GetScfTrigger(ctx *Context, name string, id IDInput, state *ScfTriggerState, opts ...ResourceOption) (*ScfTrigger, error)public static ScfTrigger Get(string name, Input<string> id, ScfTriggerState? state, CustomResourceOptions? opts = null)public static ScfTrigger get(String name, Output<String> id, ScfTriggerState state, CustomResourceOptions options)resources: _: type: tencentcloud:ScfTrigger get: id: ${id}import {
to = tencentcloud_scf_trigger.example
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.
- Add
Time string - Trigger creation time.
- Available
Status string - Trigger available status.
- Custom
Argument string - User custom parameter, only supported by timer trigger.
- Description string
- Trigger description.
- Enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - Function
Name string - Name of the SCF function that the trigger binds to.
- Mod
Time string - Trigger last modified time.
- Namespace string
- Function namespace. Defaults to
default. - Qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - Scf
Trigger stringId - ID of the resource.
- Trigger
Attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- Trigger
Desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- Trigger
Name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com. - Type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF).
- Add
Time string - Trigger creation time.
- Available
Status string - Trigger available status.
- Custom
Argument string - User custom parameter, only supported by timer trigger.
- Description string
- Trigger description.
- Enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - Function
Name string - Name of the SCF function that the trigger binds to.
- Mod
Time string - Trigger last modified time.
- Namespace string
- Function namespace. Defaults to
default. - Qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - Scf
Trigger stringId - ID of the resource.
- Trigger
Attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- Trigger
Desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- Trigger
Name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com. - Type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF).
- add_
time string - Trigger creation time.
- available_
status string - Trigger available status.
- custom_
argument string - User custom parameter, only supported by timer trigger.
- description string
- Trigger description.
- enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - function_
name string - Name of the SCF function that the trigger binds to.
- mod_
time string - Trigger last modified time.
- namespace string
- Function namespace. Defaults to
default. - qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf_
trigger_ stringid - ID of the resource.
- trigger_
attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger_
desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger_
name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com. - type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF).
- add
Time String - Trigger creation time.
- available
Status String - Trigger available status.
- custom
Argument String - User custom parameter, only supported by timer trigger.
- description String
- Trigger description.
- enable String
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - function
Name String - Name of the SCF function that the trigger binds to.
- mod
Time String - Trigger last modified time.
- namespace String
- Function namespace. Defaults to
default. - qualifier String
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf
Trigger StringId - ID of the resource.
- trigger
Attribute String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Desc String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Name String - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com. - type String
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF).
- add
Time string - Trigger creation time.
- available
Status string - Trigger available status.
- custom
Argument string - User custom parameter, only supported by timer trigger.
- description string
- Trigger description.
- enable string
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - function
Name string - Name of the SCF function that the trigger binds to.
- mod
Time string - Trigger last modified time.
- namespace string
- Function namespace. Defaults to
default. - qualifier string
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf
Trigger stringId - ID of the resource.
- trigger
Attribute string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Desc string - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Name string - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com. - type string
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF).
- add_
time str - Trigger creation time.
- available_
status str - Trigger available status.
- custom_
argument str - User custom parameter, only supported by timer trigger.
- description str
- Trigger description.
- enable str
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - function_
name str - Name of the SCF function that the trigger binds to.
- mod_
time str - Trigger last modified time.
- namespace str
- Function namespace. Defaults to
default. - qualifier str
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf_
trigger_ strid - ID of the resource.
- trigger_
attribute str - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger_
desc str - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger_
name str - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com. - type str
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF).
- add
Time String - Trigger creation time.
- available
Status String - Trigger available status.
- custom
Argument String - User custom parameter, only supported by timer trigger.
- description String
- Trigger description.
- enable String
- Trigger enable status. Valid values:
OPEN(enabled),CLOSE(disabled). - function
Name String - Name of the SCF function that the trigger binds to.
- mod
Time String - Trigger last modified time.
- namespace String
- Function namespace. Defaults to
default. - qualifier String
- Function version or alias that the trigger points to. Defaults to
$LATEST. - scf
Trigger StringId - ID of the resource.
- trigger
Attribute String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Desc String - Trigger description parameter, see the trigger description documentation for details: https://www.tencentcloud.com/document/product/583/34880.
- trigger
Name String - Name of the trigger. It must not be specified when
typeishttp; it must be specified whentypeis nothttp; whentypeiscos, it must match<bucket>.cos.<region>.myqcloud.com. - type String
- Trigger type. Valid values:
cos,timer,ckafka,http.To create Function URL please refer to Creating a Function URL; To create a CLS trigger, please refer to Create Deliver CloudFunction (SCF).
Import
SCF trigger can be imported using the composite id function_name#namespace#trigger_name, e.g.
$ pulumi import tencentcloud:index/scfTrigger:ScfTrigger timer tf-example-function#default#tf-example-trigger
Or use Terraform 1.5+ import block:
hcl
import {
to = tencentcloud_scf_trigger.http
id = “tf-example-function#default#tf-example-trigger”
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Friday, Aug 14, 2026 by tencentcloudstack