ScheduleArgs

data class ScheduleArgs(val cronExpression: Output<String>? = null, val description: Output<String>? = null, val enable: Output<Boolean>? = null, val flowName: Output<String>? = null, val payload: Output<String>? = null, val scheduleName: Output<String>? = null) : ConvertibleToJava<ScheduleArgs>

Provides a Serverless Workflow Schedule resource. For information about Serverless Workflow Schedule and how to use it, see What is Schedule.

NOTE: Available since v1.105.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.fnf.Flow("example", {
definition: ` version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
`,
description: "tf-exampleFnFFlow983041",
name: "tf-exampleSchedule",
type: "FDL",
});
const exampleSchedule = new alicloud.fnf.Schedule("example", {
cronExpression: "30 9 * * * *",
description: "tf-exampleFnFSchedule983041",
enable: true,
flowName: example.name,
payload: "{\"tf-example\": \"example success\"}",
scheduleName: "tf-exampleFnFSchedule983041",
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.fnf.Flow("example",
definition=""" version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
""",
description="tf-exampleFnFFlow983041",
name="tf-exampleSchedule",
type="FDL")
example_schedule = alicloud.fnf.Schedule("example",
cron_expression="30 9 * * * *",
description="tf-exampleFnFSchedule983041",
enable=True,
flow_name=example.name,
payload="{\"tf-example\": \"example success\"}",
schedule_name="tf-exampleFnFSchedule983041")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.FNF.Flow("example", new()
{
Definition = @" version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
",
Description = "tf-exampleFnFFlow983041",
Name = "tf-exampleSchedule",
Type = "FDL",
});
var exampleSchedule = new AliCloud.FNF.Schedule("example", new()
{
CronExpression = "30 9 * * * *",
Description = "tf-exampleFnFSchedule983041",
Enable = true,
FlowName = example.Name,
Payload = "{\"tf-example\": \"example success\"}",
ScheduleName = "tf-exampleFnFSchedule983041",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fnf"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := fnf.NewFlow(ctx, "example", &fnf.FlowArgs{
Definition: pulumi.String(` version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
`),
Description: pulumi.String("tf-exampleFnFFlow983041"),
Name: pulumi.String("tf-exampleSchedule"),
Type: pulumi.String("FDL"),
})
if err != nil {
return err
}
_, err = fnf.NewSchedule(ctx, "example", &fnf.ScheduleArgs{
CronExpression: pulumi.String("30 9 * * * *"),
Description: pulumi.String("tf-exampleFnFSchedule983041"),
Enable: pulumi.Bool(true),
FlowName: example.Name,
Payload: pulumi.String("{\"tf-example\": \"example success\"}"),
ScheduleName: pulumi.String("tf-exampleFnFSchedule983041"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fnf.Flow;
import com.pulumi.alicloud.fnf.FlowArgs;
import com.pulumi.alicloud.fnf.Schedule;
import com.pulumi.alicloud.fnf.ScheduleArgs;
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 example = new Flow("example", FlowArgs.builder()
.definition("""
version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
""")
.description("tf-exampleFnFFlow983041")
.name("tf-exampleSchedule")
.type("FDL")
.build());
var exampleSchedule = new Schedule("exampleSchedule", ScheduleArgs.builder()
.cronExpression("30 9 * * * *")
.description("tf-exampleFnFSchedule983041")
.enable(true)
.flowName(example.name())
.payload("{\"tf-example\": \"example success\"}")
.scheduleName("tf-exampleFnFSchedule983041")
.build());
}
}
resources:
example:
type: alicloud:fnf:Flow
properties:
definition: |2
version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
description: tf-exampleFnFFlow983041
name: tf-exampleSchedule
type: FDL
exampleSchedule:
type: alicloud:fnf:Schedule
name: example
properties:
cronExpression: 30 9 * * * *
description: tf-exampleFnFSchedule983041
enable: 'true'
flowName: ${example.name}
payload: '{"tf-example": "example success"}'
scheduleName: tf-exampleFnFSchedule983041

Import

Serverless Workflow Schedule can be imported using the id, e.g.

$ pulumi import alicloud:fnf/schedule:Schedule example <schedule_name>:<flow_name>

Constructors

Link copied to clipboard
constructor(cronExpression: Output<String>? = null, description: Output<String>? = null, enable: Output<Boolean>? = null, flowName: Output<String>? = null, payload: Output<String>? = null, scheduleName: Output<String>? = null)

Properties

Link copied to clipboard
val cronExpression: Output<String>? = null

The CRON expression of the time-based schedule to be created.

Link copied to clipboard
val description: Output<String>? = null

The description of the time-based schedule to be created.

Link copied to clipboard
val enable: Output<Boolean>? = null

Specifies whether to enable the time-based schedule you want to create. Valid values: false, true.

Link copied to clipboard
val flowName: Output<String>? = null

The name of the flow bound to the time-based schedule you want to create.

Link copied to clipboard
val payload: Output<String>? = null

The trigger message of the time-based schedule to be created. It must be in JSON object format.

Link copied to clipboard
val scheduleName: Output<String>? = null

The name of the time-based schedule to be created.

Functions

Link copied to clipboard
open override fun toJava(): ScheduleArgs