1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ScfFunctionEventInvokeConfig
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.ScfFunctionEventInvokeConfig

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a scf function_event_invoke_config

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const functionEventInvokeConfig = new tencentcloud.ScfFunctionEventInvokeConfig("functionEventInvokeConfig", {
        asyncTriggerConfig: {
            msgTtl: 24,
            retryConfigs: [{
                retryNum: 2,
            }],
        },
        functionName: "keep-1676351130",
        namespace: "default",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    function_event_invoke_config = tencentcloud.ScfFunctionEventInvokeConfig("functionEventInvokeConfig",
        async_trigger_config={
            "msg_ttl": 24,
            "retry_configs": [{
                "retry_num": 2,
            }],
        },
        function_name="keep-1676351130",
        namespace="default")
    
    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 {
    		_, err := tencentcloud.NewScfFunctionEventInvokeConfig(ctx, "functionEventInvokeConfig", &tencentcloud.ScfFunctionEventInvokeConfigArgs{
    			AsyncTriggerConfig: &tencentcloud.ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs{
    				MsgTtl: pulumi.Float64(24),
    				RetryConfigs: tencentcloud.ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfigArray{
    					&tencentcloud.ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfigArgs{
    						RetryNum: pulumi.Float64(2),
    					},
    				},
    			},
    			FunctionName: pulumi.String("keep-1676351130"),
    			Namespace:    pulumi.String("default"),
    		})
    		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 functionEventInvokeConfig = new Tencentcloud.ScfFunctionEventInvokeConfig("functionEventInvokeConfig", new()
        {
            AsyncTriggerConfig = new Tencentcloud.Inputs.ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs
            {
                MsgTtl = 24,
                RetryConfigs = new[]
                {
                    new Tencentcloud.Inputs.ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfigArgs
                    {
                        RetryNum = 2,
                    },
                },
            },
            FunctionName = "keep-1676351130",
            Namespace = "default",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ScfFunctionEventInvokeConfig;
    import com.pulumi.tencentcloud.ScfFunctionEventInvokeConfigArgs;
    import com.pulumi.tencentcloud.inputs.ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs;
    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 functionEventInvokeConfig = new ScfFunctionEventInvokeConfig("functionEventInvokeConfig", ScfFunctionEventInvokeConfigArgs.builder()
                .asyncTriggerConfig(ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs.builder()
                    .msgTtl(24)
                    .retryConfigs(ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfigArgs.builder()
                        .retryNum(2)
                        .build())
                    .build())
                .functionName("keep-1676351130")
                .namespace("default")
                .build());
    
        }
    }
    
    resources:
      functionEventInvokeConfig:
        type: tencentcloud:ScfFunctionEventInvokeConfig
        properties:
          asyncTriggerConfig:
            msgTtl: 24
            retryConfigs:
              - retryNum: 2
          functionName: keep-1676351130
          namespace: default
    

    Create ScfFunctionEventInvokeConfig Resource

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

    Constructor syntax

    new ScfFunctionEventInvokeConfig(name: string, args: ScfFunctionEventInvokeConfigArgs, opts?: CustomResourceOptions);
    @overload
    def ScfFunctionEventInvokeConfig(resource_name: str,
                                     args: ScfFunctionEventInvokeConfigArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScfFunctionEventInvokeConfig(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     async_trigger_config: Optional[ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs] = None,
                                     function_name: Optional[str] = None,
                                     namespace: Optional[str] = None,
                                     scf_function_event_invoke_config_id: Optional[str] = None)
    func NewScfFunctionEventInvokeConfig(ctx *Context, name string, args ScfFunctionEventInvokeConfigArgs, opts ...ResourceOption) (*ScfFunctionEventInvokeConfig, error)
    public ScfFunctionEventInvokeConfig(string name, ScfFunctionEventInvokeConfigArgs args, CustomResourceOptions? opts = null)
    public ScfFunctionEventInvokeConfig(String name, ScfFunctionEventInvokeConfigArgs args)
    public ScfFunctionEventInvokeConfig(String name, ScfFunctionEventInvokeConfigArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ScfFunctionEventInvokeConfig
    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 ScfFunctionEventInvokeConfigArgs
    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 ScfFunctionEventInvokeConfigArgs
    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 ScfFunctionEventInvokeConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScfFunctionEventInvokeConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScfFunctionEventInvokeConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AsyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfig
    Async retry configuration information.
    FunctionName string
    Function name.
    Namespace string
    Function namespace. Default value: default.
    ScfFunctionEventInvokeConfigId string
    ID of the resource.
    AsyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs
    Async retry configuration information.
    FunctionName string
    Function name.
    Namespace string
    Function namespace. Default value: default.
    ScfFunctionEventInvokeConfigId string
    ID of the resource.
    asyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfig
    Async retry configuration information.
    functionName String
    Function name.
    namespace String
    Function namespace. Default value: default.
    scfFunctionEventInvokeConfigId String
    ID of the resource.
    asyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfig
    Async retry configuration information.
    functionName string
    Function name.
    namespace string
    Function namespace. Default value: default.
    scfFunctionEventInvokeConfigId string
    ID of the resource.
    async_trigger_config ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs
    Async retry configuration information.
    function_name str
    Function name.
    namespace str
    Function namespace. Default value: default.
    scf_function_event_invoke_config_id str
    ID of the resource.
    asyncTriggerConfig Property Map
    Async retry configuration information.
    functionName String
    Function name.
    namespace String
    Function namespace. Default value: default.
    scfFunctionEventInvokeConfigId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ScfFunctionEventInvokeConfig Resource

    Get an existing ScfFunctionEventInvokeConfig 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?: ScfFunctionEventInvokeConfigState, opts?: CustomResourceOptions): ScfFunctionEventInvokeConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            async_trigger_config: Optional[ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs] = None,
            function_name: Optional[str] = None,
            namespace: Optional[str] = None,
            scf_function_event_invoke_config_id: Optional[str] = None) -> ScfFunctionEventInvokeConfig
    func GetScfFunctionEventInvokeConfig(ctx *Context, name string, id IDInput, state *ScfFunctionEventInvokeConfigState, opts ...ResourceOption) (*ScfFunctionEventInvokeConfig, error)
    public static ScfFunctionEventInvokeConfig Get(string name, Input<string> id, ScfFunctionEventInvokeConfigState? state, CustomResourceOptions? opts = null)
    public static ScfFunctionEventInvokeConfig get(String name, Output<String> id, ScfFunctionEventInvokeConfigState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ScfFunctionEventInvokeConfig    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AsyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfig
    Async retry configuration information.
    FunctionName string
    Function name.
    Namespace string
    Function namespace. Default value: default.
    ScfFunctionEventInvokeConfigId string
    ID of the resource.
    AsyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs
    Async retry configuration information.
    FunctionName string
    Function name.
    Namespace string
    Function namespace. Default value: default.
    ScfFunctionEventInvokeConfigId string
    ID of the resource.
    asyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfig
    Async retry configuration information.
    functionName String
    Function name.
    namespace String
    Function namespace. Default value: default.
    scfFunctionEventInvokeConfigId String
    ID of the resource.
    asyncTriggerConfig ScfFunctionEventInvokeConfigAsyncTriggerConfig
    Async retry configuration information.
    functionName string
    Function name.
    namespace string
    Function namespace. Default value: default.
    scfFunctionEventInvokeConfigId string
    ID of the resource.
    async_trigger_config ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs
    Async retry configuration information.
    function_name str
    Function name.
    namespace str
    Function namespace. Default value: default.
    scf_function_event_invoke_config_id str
    ID of the resource.
    asyncTriggerConfig Property Map
    Async retry configuration information.
    functionName String
    Function name.
    namespace String
    Function namespace. Default value: default.
    scfFunctionEventInvokeConfigId String
    ID of the resource.

    Supporting Types

    ScfFunctionEventInvokeConfigAsyncTriggerConfig, ScfFunctionEventInvokeConfigAsyncTriggerConfigArgs

    MsgTtl double
    Message retention period.
    RetryConfigs List<ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfig>
    Async retry configuration of function upon user error.
    MsgTtl float64
    Message retention period.
    RetryConfigs []ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfig
    Async retry configuration of function upon user error.
    msgTtl Double
    Message retention period.
    retryConfigs List<ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfig>
    Async retry configuration of function upon user error.
    msgTtl number
    Message retention period.
    retryConfigs ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfig[]
    Async retry configuration of function upon user error.
    msg_ttl float
    Message retention period.
    retry_configs Sequence[ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfig]
    Async retry configuration of function upon user error.
    msgTtl Number
    Message retention period.
    retryConfigs List<Property Map>
    Async retry configuration of function upon user error.

    ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfig, ScfFunctionEventInvokeConfigAsyncTriggerConfigRetryConfigArgs

    RetryNum double
    Number of retry attempts.
    RetryNum float64
    Number of retry attempts.
    retryNum Double
    Number of retry attempts.
    retryNum number
    Number of retry attempts.
    retry_num float
    Number of retry attempts.
    retryNum Number
    Number of retry attempts.

    Import

    scf function_event_invoke_config can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/scfFunctionEventInvokeConfig:ScfFunctionEventInvokeConfig function_event_invoke_config function_name#namespace
    

    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 tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack