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

tencentcloud.ScfTerminateAsyncEvent

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 terminate_async_event

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const terminateAsyncEvent = new tencentcloud.ScfTerminateAsyncEvent("terminateAsyncEvent", {
        functionName: "keep-1676351130",
        graceShutdown: true,
        invokeRequestId: "9de9405a-e33a-498d-bb59-e80b7bed1191",
        namespace: "default",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    terminate_async_event = tencentcloud.ScfTerminateAsyncEvent("terminateAsyncEvent",
        function_name="keep-1676351130",
        grace_shutdown=True,
        invoke_request_id="9de9405a-e33a-498d-bb59-e80b7bed1191",
        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.NewScfTerminateAsyncEvent(ctx, "terminateAsyncEvent", &tencentcloud.ScfTerminateAsyncEventArgs{
    			FunctionName:    pulumi.String("keep-1676351130"),
    			GraceShutdown:   pulumi.Bool(true),
    			InvokeRequestId: pulumi.String("9de9405a-e33a-498d-bb59-e80b7bed1191"),
    			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 terminateAsyncEvent = new Tencentcloud.ScfTerminateAsyncEvent("terminateAsyncEvent", new()
        {
            FunctionName = "keep-1676351130",
            GraceShutdown = true,
            InvokeRequestId = "9de9405a-e33a-498d-bb59-e80b7bed1191",
            Namespace = "default",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ScfTerminateAsyncEvent;
    import com.pulumi.tencentcloud.ScfTerminateAsyncEventArgs;
    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 terminateAsyncEvent = new ScfTerminateAsyncEvent("terminateAsyncEvent", ScfTerminateAsyncEventArgs.builder()
                .functionName("keep-1676351130")
                .graceShutdown(true)
                .invokeRequestId("9de9405a-e33a-498d-bb59-e80b7bed1191")
                .namespace("default")
                .build());
    
        }
    }
    
    resources:
      terminateAsyncEvent:
        type: tencentcloud:ScfTerminateAsyncEvent
        properties:
          functionName: keep-1676351130
          graceShutdown: true
          invokeRequestId: 9de9405a-e33a-498d-bb59-e80b7bed1191
          namespace: default
    

    Create ScfTerminateAsyncEvent Resource

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

    Constructor syntax

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

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

    FunctionName string
    Function name.
    InvokeRequestId string
    Terminated invocation request ID.
    GraceShutdown bool
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    Namespace string
    Namespace.
    ScfTerminateAsyncEventId string
    ID of the resource.
    FunctionName string
    Function name.
    InvokeRequestId string
    Terminated invocation request ID.
    GraceShutdown bool
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    Namespace string
    Namespace.
    ScfTerminateAsyncEventId string
    ID of the resource.
    functionName String
    Function name.
    invokeRequestId String
    Terminated invocation request ID.
    graceShutdown Boolean
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    namespace String
    Namespace.
    scfTerminateAsyncEventId String
    ID of the resource.
    functionName string
    Function name.
    invokeRequestId string
    Terminated invocation request ID.
    graceShutdown boolean
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    namespace string
    Namespace.
    scfTerminateAsyncEventId string
    ID of the resource.
    function_name str
    Function name.
    invoke_request_id str
    Terminated invocation request ID.
    grace_shutdown bool
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    namespace str
    Namespace.
    scf_terminate_async_event_id str
    ID of the resource.
    functionName String
    Function name.
    invokeRequestId String
    Terminated invocation request ID.
    graceShutdown Boolean
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    namespace String
    Namespace.
    scfTerminateAsyncEventId String
    ID of the resource.

    Outputs

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

    Get an existing ScfTerminateAsyncEvent 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?: ScfTerminateAsyncEventState, opts?: CustomResourceOptions): ScfTerminateAsyncEvent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            function_name: Optional[str] = None,
            grace_shutdown: Optional[bool] = None,
            invoke_request_id: Optional[str] = None,
            namespace: Optional[str] = None,
            scf_terminate_async_event_id: Optional[str] = None) -> ScfTerminateAsyncEvent
    func GetScfTerminateAsyncEvent(ctx *Context, name string, id IDInput, state *ScfTerminateAsyncEventState, opts ...ResourceOption) (*ScfTerminateAsyncEvent, error)
    public static ScfTerminateAsyncEvent Get(string name, Input<string> id, ScfTerminateAsyncEventState? state, CustomResourceOptions? opts = null)
    public static ScfTerminateAsyncEvent get(String name, Output<String> id, ScfTerminateAsyncEventState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ScfTerminateAsyncEvent    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:
    FunctionName string
    Function name.
    GraceShutdown bool
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    InvokeRequestId string
    Terminated invocation request ID.
    Namespace string
    Namespace.
    ScfTerminateAsyncEventId string
    ID of the resource.
    FunctionName string
    Function name.
    GraceShutdown bool
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    InvokeRequestId string
    Terminated invocation request ID.
    Namespace string
    Namespace.
    ScfTerminateAsyncEventId string
    ID of the resource.
    functionName String
    Function name.
    graceShutdown Boolean
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    invokeRequestId String
    Terminated invocation request ID.
    namespace String
    Namespace.
    scfTerminateAsyncEventId String
    ID of the resource.
    functionName string
    Function name.
    graceShutdown boolean
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    invokeRequestId string
    Terminated invocation request ID.
    namespace string
    Namespace.
    scfTerminateAsyncEventId string
    ID of the resource.
    function_name str
    Function name.
    grace_shutdown bool
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    invoke_request_id str
    Terminated invocation request ID.
    namespace str
    Namespace.
    scf_terminate_async_event_id str
    ID of the resource.
    functionName String
    Function name.
    graceShutdown Boolean
    Whether to enable grace shutdown. If it's true, a SIGTERM signal is sent to the specified request. See [Sending termination signal](https://www.tencentcloud.com/document/product/583/63969?from_cn_redirect=1#.E5.8F.91.E9.80.81.E7.BB.88.E6.AD.A2.E4.BF.A1.E5.8F.B7]. It's set to false by default.
    invokeRequestId String
    Terminated invocation request ID.
    namespace String
    Namespace.
    scfTerminateAsyncEventId 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