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

tencentcloud.ScfInvokeFunction

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 invoke_function

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const invokeFunction = new tencentcloud.ScfInvokeFunction("invokeFunction", {
        functionName: "keep-1676351130",
        namespace: "default",
        qualifier: "2",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    invoke_function = tencentcloud.ScfInvokeFunction("invokeFunction",
        function_name="keep-1676351130",
        namespace="default",
        qualifier="2")
    
    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.NewScfInvokeFunction(ctx, "invokeFunction", &tencentcloud.ScfInvokeFunctionArgs{
    			FunctionName: pulumi.String("keep-1676351130"),
    			Namespace:    pulumi.String("default"),
    			Qualifier:    pulumi.String("2"),
    		})
    		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 invokeFunction = new Tencentcloud.ScfInvokeFunction("invokeFunction", new()
        {
            FunctionName = "keep-1676351130",
            Namespace = "default",
            Qualifier = "2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ScfInvokeFunction;
    import com.pulumi.tencentcloud.ScfInvokeFunctionArgs;
    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 invokeFunction = new ScfInvokeFunction("invokeFunction", ScfInvokeFunctionArgs.builder()
                .functionName("keep-1676351130")
                .namespace("default")
                .qualifier("2")
                .build());
    
        }
    }
    
    resources:
      invokeFunction:
        type: tencentcloud:ScfInvokeFunction
        properties:
          functionName: keep-1676351130
          namespace: default
          qualifier: '2'
    

    Create ScfInvokeFunction Resource

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

    Constructor syntax

    new ScfInvokeFunction(name: string, args: ScfInvokeFunctionArgs, opts?: CustomResourceOptions);
    @overload
    def ScfInvokeFunction(resource_name: str,
                          args: ScfInvokeFunctionArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScfInvokeFunction(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          function_name: Optional[str] = None,
                          client_context: Optional[str] = None,
                          invocation_type: Optional[str] = None,
                          log_type: Optional[str] = None,
                          namespace: Optional[str] = None,
                          qualifier: Optional[str] = None,
                          routing_key: Optional[str] = None,
                          scf_invoke_function_id: Optional[str] = None)
    func NewScfInvokeFunction(ctx *Context, name string, args ScfInvokeFunctionArgs, opts ...ResourceOption) (*ScfInvokeFunction, error)
    public ScfInvokeFunction(string name, ScfInvokeFunctionArgs args, CustomResourceOptions? opts = null)
    public ScfInvokeFunction(String name, ScfInvokeFunctionArgs args)
    public ScfInvokeFunction(String name, ScfInvokeFunctionArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ScfInvokeFunction
    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 ScfInvokeFunctionArgs
    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 ScfInvokeFunctionArgs
    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 ScfInvokeFunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScfInvokeFunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScfInvokeFunctionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    FunctionName string
    Function name.
    ClientContext string
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    InvocationType string
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    LogType string
    Null for async invocations.
    Namespace string
    Namespace.
    Qualifier string
    The version or alias of the triggered function. It defaults to $LATEST.
    RoutingKey string
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    ScfInvokeFunctionId string
    ID of the resource.
    FunctionName string
    Function name.
    ClientContext string
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    InvocationType string
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    LogType string
    Null for async invocations.
    Namespace string
    Namespace.
    Qualifier string
    The version or alias of the triggered function. It defaults to $LATEST.
    RoutingKey string
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    ScfInvokeFunctionId string
    ID of the resource.
    functionName String
    Function name.
    clientContext String
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    invocationType String
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    logType String
    Null for async invocations.
    namespace String
    Namespace.
    qualifier String
    The version or alias of the triggered function. It defaults to $LATEST.
    routingKey String
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scfInvokeFunctionId String
    ID of the resource.
    functionName string
    Function name.
    clientContext string
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    invocationType string
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    logType string
    Null for async invocations.
    namespace string
    Namespace.
    qualifier string
    The version or alias of the triggered function. It defaults to $LATEST.
    routingKey string
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scfInvokeFunctionId string
    ID of the resource.
    function_name str
    Function name.
    client_context str
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    invocation_type str
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    log_type str
    Null for async invocations.
    namespace str
    Namespace.
    qualifier str
    The version or alias of the triggered function. It defaults to $LATEST.
    routing_key str
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scf_invoke_function_id str
    ID of the resource.
    functionName String
    Function name.
    clientContext String
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    invocationType String
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    logType String
    Null for async invocations.
    namespace String
    Namespace.
    qualifier String
    The version or alias of the triggered function. It defaults to $LATEST.
    routingKey String
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scfInvokeFunctionId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ScfInvokeFunction 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 ScfInvokeFunction Resource

    Get an existing ScfInvokeFunction 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?: ScfInvokeFunctionState, opts?: CustomResourceOptions): ScfInvokeFunction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            client_context: Optional[str] = None,
            function_name: Optional[str] = None,
            invocation_type: Optional[str] = None,
            log_type: Optional[str] = None,
            namespace: Optional[str] = None,
            qualifier: Optional[str] = None,
            routing_key: Optional[str] = None,
            scf_invoke_function_id: Optional[str] = None) -> ScfInvokeFunction
    func GetScfInvokeFunction(ctx *Context, name string, id IDInput, state *ScfInvokeFunctionState, opts ...ResourceOption) (*ScfInvokeFunction, error)
    public static ScfInvokeFunction Get(string name, Input<string> id, ScfInvokeFunctionState? state, CustomResourceOptions? opts = null)
    public static ScfInvokeFunction get(String name, Output<String> id, ScfInvokeFunctionState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ScfInvokeFunction    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:
    ClientContext string
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    FunctionName string
    Function name.
    InvocationType string
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    LogType string
    Null for async invocations.
    Namespace string
    Namespace.
    Qualifier string
    The version or alias of the triggered function. It defaults to $LATEST.
    RoutingKey string
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    ScfInvokeFunctionId string
    ID of the resource.
    ClientContext string
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    FunctionName string
    Function name.
    InvocationType string
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    LogType string
    Null for async invocations.
    Namespace string
    Namespace.
    Qualifier string
    The version or alias of the triggered function. It defaults to $LATEST.
    RoutingKey string
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    ScfInvokeFunctionId string
    ID of the resource.
    clientContext String
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    functionName String
    Function name.
    invocationType String
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    logType String
    Null for async invocations.
    namespace String
    Namespace.
    qualifier String
    The version or alias of the triggered function. It defaults to $LATEST.
    routingKey String
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scfInvokeFunctionId String
    ID of the resource.
    clientContext string
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    functionName string
    Function name.
    invocationType string
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    logType string
    Null for async invocations.
    namespace string
    Namespace.
    qualifier string
    The version or alias of the triggered function. It defaults to $LATEST.
    routingKey string
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scfInvokeFunctionId string
    ID of the resource.
    client_context str
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    function_name str
    Function name.
    invocation_type str
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    log_type str
    Null for async invocations.
    namespace str
    Namespace.
    qualifier str
    The version or alias of the triggered function. It defaults to $LATEST.
    routing_key str
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scf_invoke_function_id str
    ID of the resource.
    clientContext String
    Function running parameter, which is in the JSON format. The maximum parameter size is 6 MB for synchronized invocations and 128KB for asynchronized invocations. This field corresponds to event input parameter.
    functionName String
    Function name.
    invocationType String
    Fill in RequestResponse for synchronized invocations (default and recommended) and Event for asychronized invocations. Note that for synchronized invocations, the max timeout period is 300s. Choose asychronized invocations if the required timeout period is longer than 300 seconds. You can also use InvokeFunction for synchronized invocations.
    logType String
    Null for async invocations.
    namespace String
    Namespace.
    qualifier String
    The version or alias of the triggered function. It defaults to $LATEST.
    routingKey String
    Traffic routing config in json format, e.g., {k:v}. Please note that both k and v must be strings. Up to 1024 bytes allowed.
    scfInvokeFunctionId String
    ID of the resource.

    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