1. Packages
  2. Volcengine
  3. API Docs
  4. vefaas
  5. Timer
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.vefaas.Timer

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage vefaas timer

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.vefaas.Timer("foo", {
        crontab: "*/10 * * * *",
        functionId: "35ybaxxx",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.vefaas.Timer("foo",
        crontab="*/10 * * * *",
        function_id="35ybaxxx")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vefaas"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vefaas.NewTimer(ctx, "foo", &vefaas.TimerArgs{
    			Crontab:    pulumi.String("*/10 * * * *"),
    			FunctionId: pulumi.String("35ybaxxx"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Vefaas.Timer("foo", new()
        {
            Crontab = "*/10 * * * *",
            FunctionId = "35ybaxxx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vefaas.Timer;
    import com.pulumi.volcengine.vefaas.TimerArgs;
    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 Timer("foo", TimerArgs.builder()        
                .crontab("*/10 * * * *")
                .functionId("35ybaxxx")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:vefaas:Timer
        properties:
          crontab: '*/10 * * * *'
          functionId: 35ybaxxx
    

    Create Timer Resource

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

    Constructor syntax

    new Timer(name: string, args: TimerArgs, opts?: CustomResourceOptions);
    @overload
    def Timer(resource_name: str,
              args: TimerArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Timer(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              crontab: Optional[str] = None,
              function_id: Optional[str] = None,
              description: Optional[str] = None,
              enable_concurrency: Optional[bool] = None,
              enabled: Optional[bool] = None,
              name: Optional[str] = None,
              payload: Optional[str] = None,
              retries: Optional[int] = None)
    func NewTimer(ctx *Context, name string, args TimerArgs, opts ...ResourceOption) (*Timer, error)
    public Timer(string name, TimerArgs args, CustomResourceOptions? opts = null)
    public Timer(String name, TimerArgs args)
    public Timer(String name, TimerArgs args, CustomResourceOptions options)
    
    type: volcengine:vefaas:Timer
    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 TimerArgs
    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 TimerArgs
    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 TimerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TimerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TimerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var timerResource = new Volcengine.Vefaas.Timer("timerResource", new()
    {
        Crontab = "string",
        FunctionId = "string",
        Description = "string",
        EnableConcurrency = false,
        Enabled = false,
        Name = "string",
        Payload = "string",
        Retries = 0,
    });
    
    example, err := vefaas.NewTimer(ctx, "timerResource", &vefaas.TimerArgs{
    	Crontab:           pulumi.String("string"),
    	FunctionId:        pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	EnableConcurrency: pulumi.Bool(false),
    	Enabled:           pulumi.Bool(false),
    	Name:              pulumi.String("string"),
    	Payload:           pulumi.String("string"),
    	Retries:           pulumi.Int(0),
    })
    
    var timerResource = new Timer("timerResource", TimerArgs.builder()
        .crontab("string")
        .functionId("string")
        .description("string")
        .enableConcurrency(false)
        .enabled(false)
        .name("string")
        .payload("string")
        .retries(0)
        .build());
    
    timer_resource = volcengine.vefaas.Timer("timerResource",
        crontab="string",
        function_id="string",
        description="string",
        enable_concurrency=False,
        enabled=False,
        name="string",
        payload="string",
        retries=0)
    
    const timerResource = new volcengine.vefaas.Timer("timerResource", {
        crontab: "string",
        functionId: "string",
        description: "string",
        enableConcurrency: false,
        enabled: false,
        name: "string",
        payload: "string",
        retries: 0,
    });
    
    type: volcengine:vefaas:Timer
    properties:
        crontab: string
        description: string
        enableConcurrency: false
        enabled: false
        functionId: string
        name: string
        payload: string
        retries: 0
    

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

    Crontab string
    Set the timing trigger time of the Timer trigger.
    FunctionId string
    The ID of Function.
    Description string
    The description of the Timer trigger.
    EnableConcurrency bool
    Whether the Timer trigger allows concurrency.
    Enabled bool
    Whether the Timer trigger is enabled.
    Name string
    The name of the Timer trigger.
    Payload string
    The Timer trigger sends the content payload of the request.
    Retries int
    The retry count of the Timer trigger.
    Crontab string
    Set the timing trigger time of the Timer trigger.
    FunctionId string
    The ID of Function.
    Description string
    The description of the Timer trigger.
    EnableConcurrency bool
    Whether the Timer trigger allows concurrency.
    Enabled bool
    Whether the Timer trigger is enabled.
    Name string
    The name of the Timer trigger.
    Payload string
    The Timer trigger sends the content payload of the request.
    Retries int
    The retry count of the Timer trigger.
    crontab String
    Set the timing trigger time of the Timer trigger.
    functionId String
    The ID of Function.
    description String
    The description of the Timer trigger.
    enableConcurrency Boolean
    Whether the Timer trigger allows concurrency.
    enabled Boolean
    Whether the Timer trigger is enabled.
    name String
    The name of the Timer trigger.
    payload String
    The Timer trigger sends the content payload of the request.
    retries Integer
    The retry count of the Timer trigger.
    crontab string
    Set the timing trigger time of the Timer trigger.
    functionId string
    The ID of Function.
    description string
    The description of the Timer trigger.
    enableConcurrency boolean
    Whether the Timer trigger allows concurrency.
    enabled boolean
    Whether the Timer trigger is enabled.
    name string
    The name of the Timer trigger.
    payload string
    The Timer trigger sends the content payload of the request.
    retries number
    The retry count of the Timer trigger.
    crontab str
    Set the timing trigger time of the Timer trigger.
    function_id str
    The ID of Function.
    description str
    The description of the Timer trigger.
    enable_concurrency bool
    Whether the Timer trigger allows concurrency.
    enabled bool
    Whether the Timer trigger is enabled.
    name str
    The name of the Timer trigger.
    payload str
    The Timer trigger sends the content payload of the request.
    retries int
    The retry count of the Timer trigger.
    crontab String
    Set the timing trigger time of the Timer trigger.
    functionId String
    The ID of Function.
    description String
    The description of the Timer trigger.
    enableConcurrency Boolean
    Whether the Timer trigger allows concurrency.
    enabled Boolean
    Whether the Timer trigger is enabled.
    name String
    The name of the Timer trigger.
    payload String
    The Timer trigger sends the content payload of the request.
    retries Number
    The retry count of the Timer trigger.

    Outputs

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

    CreationTime string
    The creation time of the Timer trigger.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    The last update time of the Timer trigger.
    CreationTime string
    The creation time of the Timer trigger.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    The last update time of the Timer trigger.
    creationTime String
    The creation time of the Timer trigger.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    The last update time of the Timer trigger.
    creationTime string
    The creation time of the Timer trigger.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime string
    The last update time of the Timer trigger.
    creation_time str
    The creation time of the Timer trigger.
    id str
    The provider-assigned unique ID for this managed resource.
    last_update_time str
    The last update time of the Timer trigger.
    creationTime String
    The creation time of the Timer trigger.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    The last update time of the Timer trigger.

    Look up Existing Timer Resource

    Get an existing Timer 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?: TimerState, opts?: CustomResourceOptions): Timer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            creation_time: Optional[str] = None,
            crontab: Optional[str] = None,
            description: Optional[str] = None,
            enable_concurrency: Optional[bool] = None,
            enabled: Optional[bool] = None,
            function_id: Optional[str] = None,
            last_update_time: Optional[str] = None,
            name: Optional[str] = None,
            payload: Optional[str] = None,
            retries: Optional[int] = None) -> Timer
    func GetTimer(ctx *Context, name string, id IDInput, state *TimerState, opts ...ResourceOption) (*Timer, error)
    public static Timer Get(string name, Input<string> id, TimerState? state, CustomResourceOptions? opts = null)
    public static Timer get(String name, Output<String> id, TimerState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:vefaas:Timer    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:
    CreationTime string
    The creation time of the Timer trigger.
    Crontab string
    Set the timing trigger time of the Timer trigger.
    Description string
    The description of the Timer trigger.
    EnableConcurrency bool
    Whether the Timer trigger allows concurrency.
    Enabled bool
    Whether the Timer trigger is enabled.
    FunctionId string
    The ID of Function.
    LastUpdateTime string
    The last update time of the Timer trigger.
    Name string
    The name of the Timer trigger.
    Payload string
    The Timer trigger sends the content payload of the request.
    Retries int
    The retry count of the Timer trigger.
    CreationTime string
    The creation time of the Timer trigger.
    Crontab string
    Set the timing trigger time of the Timer trigger.
    Description string
    The description of the Timer trigger.
    EnableConcurrency bool
    Whether the Timer trigger allows concurrency.
    Enabled bool
    Whether the Timer trigger is enabled.
    FunctionId string
    The ID of Function.
    LastUpdateTime string
    The last update time of the Timer trigger.
    Name string
    The name of the Timer trigger.
    Payload string
    The Timer trigger sends the content payload of the request.
    Retries int
    The retry count of the Timer trigger.
    creationTime String
    The creation time of the Timer trigger.
    crontab String
    Set the timing trigger time of the Timer trigger.
    description String
    The description of the Timer trigger.
    enableConcurrency Boolean
    Whether the Timer trigger allows concurrency.
    enabled Boolean
    Whether the Timer trigger is enabled.
    functionId String
    The ID of Function.
    lastUpdateTime String
    The last update time of the Timer trigger.
    name String
    The name of the Timer trigger.
    payload String
    The Timer trigger sends the content payload of the request.
    retries Integer
    The retry count of the Timer trigger.
    creationTime string
    The creation time of the Timer trigger.
    crontab string
    Set the timing trigger time of the Timer trigger.
    description string
    The description of the Timer trigger.
    enableConcurrency boolean
    Whether the Timer trigger allows concurrency.
    enabled boolean
    Whether the Timer trigger is enabled.
    functionId string
    The ID of Function.
    lastUpdateTime string
    The last update time of the Timer trigger.
    name string
    The name of the Timer trigger.
    payload string
    The Timer trigger sends the content payload of the request.
    retries number
    The retry count of the Timer trigger.
    creation_time str
    The creation time of the Timer trigger.
    crontab str
    Set the timing trigger time of the Timer trigger.
    description str
    The description of the Timer trigger.
    enable_concurrency bool
    Whether the Timer trigger allows concurrency.
    enabled bool
    Whether the Timer trigger is enabled.
    function_id str
    The ID of Function.
    last_update_time str
    The last update time of the Timer trigger.
    name str
    The name of the Timer trigger.
    payload str
    The Timer trigger sends the content payload of the request.
    retries int
    The retry count of the Timer trigger.
    creationTime String
    The creation time of the Timer trigger.
    crontab String
    Set the timing trigger time of the Timer trigger.
    description String
    The description of the Timer trigger.
    enableConcurrency Boolean
    Whether the Timer trigger allows concurrency.
    enabled Boolean
    Whether the Timer trigger is enabled.
    functionId String
    The ID of Function.
    lastUpdateTime String
    The last update time of the Timer trigger.
    name String
    The name of the Timer trigger.
    payload String
    The Timer trigger sends the content payload of the request.
    retries Number
    The retry count of the Timer trigger.

    Import

    VefaasTimer can be imported using the id, e.g.

    $ pulumi import volcengine:vefaas/timer:Timer default FunctionId:Id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine