1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. WorkersCronTrigger
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.WorkersCronTrigger

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      exampleWorkersCronTrigger:
        type: cloudflare:WorkersCronTrigger
        name: example_workers_cron_trigger
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          scriptName: this-is_my_script-01
          body:
            - cron: '*/30 * * * *'
    

    Create WorkersCronTrigger Resource

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

    Constructor syntax

    new WorkersCronTrigger(name: string, args: WorkersCronTriggerArgs, opts?: CustomResourceOptions);
    @overload
    def WorkersCronTrigger(resource_name: str,
                           args: WorkersCronTriggerArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkersCronTrigger(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           account_id: Optional[str] = None,
                           schedules: Optional[Sequence[WorkersCronTriggerScheduleArgs]] = None,
                           script_name: Optional[str] = None)
    func NewWorkersCronTrigger(ctx *Context, name string, args WorkersCronTriggerArgs, opts ...ResourceOption) (*WorkersCronTrigger, error)
    public WorkersCronTrigger(string name, WorkersCronTriggerArgs args, CustomResourceOptions? opts = null)
    public WorkersCronTrigger(String name, WorkersCronTriggerArgs args)
    public WorkersCronTrigger(String name, WorkersCronTriggerArgs args, CustomResourceOptions options)
    
    type: cloudflare:WorkersCronTrigger
    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 WorkersCronTriggerArgs
    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 WorkersCronTriggerArgs
    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 WorkersCronTriggerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkersCronTriggerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkersCronTriggerArgs
    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 workersCronTriggerResource = new Cloudflare.WorkersCronTrigger("workersCronTriggerResource", new()
    {
        AccountId = "string",
        Schedules = new[]
        {
            new Cloudflare.Inputs.WorkersCronTriggerScheduleArgs
            {
                Cron = "string",
            },
        },
        ScriptName = "string",
    });
    
    example, err := cloudflare.NewWorkersCronTrigger(ctx, "workersCronTriggerResource", &cloudflare.WorkersCronTriggerArgs{
    	AccountId: pulumi.String("string"),
    	Schedules: cloudflare.WorkersCronTriggerScheduleArray{
    		&cloudflare.WorkersCronTriggerScheduleArgs{
    			Cron: pulumi.String("string"),
    		},
    	},
    	ScriptName: pulumi.String("string"),
    })
    
    var workersCronTriggerResource = new WorkersCronTrigger("workersCronTriggerResource", WorkersCronTriggerArgs.builder()
        .accountId("string")
        .schedules(WorkersCronTriggerScheduleArgs.builder()
            .cron("string")
            .build())
        .scriptName("string")
        .build());
    
    workers_cron_trigger_resource = cloudflare.WorkersCronTrigger("workersCronTriggerResource",
        account_id="string",
        schedules=[{
            "cron": "string",
        }],
        script_name="string")
    
    const workersCronTriggerResource = new cloudflare.WorkersCronTrigger("workersCronTriggerResource", {
        accountId: "string",
        schedules: [{
            cron: "string",
        }],
        scriptName: "string",
    });
    
    type: cloudflare:WorkersCronTrigger
    properties:
        accountId: string
        schedules:
            - cron: string
        scriptName: string
    

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

    AccountId string
    Identifier.
    Schedules List<WorkersCronTriggerSchedule>
    ScriptName string
    Name of the script, used in URLs and route configuration.
    AccountId string
    Identifier.
    Schedules []WorkersCronTriggerScheduleArgs
    ScriptName string
    Name of the script, used in URLs and route configuration.
    accountId String
    Identifier.
    schedules List<WorkersCronTriggerSchedule>
    scriptName String
    Name of the script, used in URLs and route configuration.
    accountId string
    Identifier.
    schedules WorkersCronTriggerSchedule[]
    scriptName string
    Name of the script, used in URLs and route configuration.
    account_id str
    Identifier.
    schedules Sequence[WorkersCronTriggerScheduleArgs]
    script_name str
    Name of the script, used in URLs and route configuration.
    accountId String
    Identifier.
    schedules List<Property Map>
    scriptName String
    Name of the script, used in URLs and route configuration.

    Outputs

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

    Get an existing WorkersCronTrigger 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?: WorkersCronTriggerState, opts?: CustomResourceOptions): WorkersCronTrigger
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            schedules: Optional[Sequence[WorkersCronTriggerScheduleArgs]] = None,
            script_name: Optional[str] = None) -> WorkersCronTrigger
    func GetWorkersCronTrigger(ctx *Context, name string, id IDInput, state *WorkersCronTriggerState, opts ...ResourceOption) (*WorkersCronTrigger, error)
    public static WorkersCronTrigger Get(string name, Input<string> id, WorkersCronTriggerState? state, CustomResourceOptions? opts = null)
    public static WorkersCronTrigger get(String name, Output<String> id, WorkersCronTriggerState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:WorkersCronTrigger    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:
    AccountId string
    Identifier.
    Schedules List<WorkersCronTriggerSchedule>
    ScriptName string
    Name of the script, used in URLs and route configuration.
    AccountId string
    Identifier.
    Schedules []WorkersCronTriggerScheduleArgs
    ScriptName string
    Name of the script, used in URLs and route configuration.
    accountId String
    Identifier.
    schedules List<WorkersCronTriggerSchedule>
    scriptName String
    Name of the script, used in URLs and route configuration.
    accountId string
    Identifier.
    schedules WorkersCronTriggerSchedule[]
    scriptName string
    Name of the script, used in URLs and route configuration.
    account_id str
    Identifier.
    schedules Sequence[WorkersCronTriggerScheduleArgs]
    script_name str
    Name of the script, used in URLs and route configuration.
    accountId String
    Identifier.
    schedules List<Property Map>
    scriptName String
    Name of the script, used in URLs and route configuration.

    Supporting Types

    WorkersCronTriggerSchedule, WorkersCronTriggerScheduleArgs

    Cron string
    Cron string
    cron String
    cron string
    cron str
    cron String

    Import

    $ pulumi import cloudflare:index/workersCronTrigger:WorkersCronTrigger example '<account_id>/<script_name>'
    

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

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi