Flow
Provides a Serverless Workflow Flow resource. For information about Serverless Workflow Flow and how to use it, see What is Flow.
NOTE: Available since v1.105.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.ram.Role("default", {
name: "tf-example-fnfflow",
document: ` {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"fnf.aliyuncs.com"
]
}
}
],
"Version": "1"
}
`,
});
const example = new alicloud.fnf.Flow("example", {
definition: ` version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
`,
roleArn: _default.arn,
description: "Test for terraform fnf_flow.",
name: "tf-example-flow",
type: "FDL",
});
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ram.Role("default",
name="tf-example-fnfflow",
document=""" {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"fnf.aliyuncs.com"
]
}
}
],
"Version": "1"
}
""")
example = alicloud.fnf.Flow("example",
definition=""" version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
""",
role_arn=default.arn,
description="Test for terraform fnf_flow.",
name="tf-example-flow",
type="FDL")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Ram.Role("default", new()
{
Name = "tf-example-fnfflow",
Document = @" {
""Statement"": [
{
""Action"": ""sts:AssumeRole"",
""Effect"": ""Allow"",
""Principal"": {
""Service"": [
""fnf.aliyuncs.com""
]
}
}
],
""Version"": ""1""
}
",
});
var example = new AliCloud.FNF.Flow("example", new()
{
Definition = @" version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
",
RoleArn = @default.Arn,
Description = "Test for terraform fnf_flow.",
Name = "tf-example-flow",
Type = "FDL",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fnf"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := ram.NewRole(ctx, "default", &ram.RoleArgs{
Name: pulumi.String("tf-example-fnfflow"),
Document: pulumi.String(` {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"fnf.aliyuncs.com"
]
}
}
],
"Version": "1"
}
`),
})
if err != nil {
return err
}
_, err = fnf.NewFlow(ctx, "example", &fnf.FlowArgs{
Definition: pulumi.String(` version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
`),
RoleArn: _default.Arn,
Description: pulumi.String("Test for terraform fnf_flow."),
Name: pulumi.String("tf-example-flow"),
Type: pulumi.String("FDL"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.Role;
import com.pulumi.alicloud.ram.RoleArgs;
import com.pulumi.alicloud.fnf.Flow;
import com.pulumi.alicloud.fnf.FlowArgs;
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 default_ = new Role("default", RoleArgs.builder()
.name("tf-example-fnfflow")
.document("""
{
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"fnf.aliyuncs.com"
]
}
}
],
"Version": "1"
}
""")
.build());
var example = new Flow("example", FlowArgs.builder()
.definition("""
version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
""")
.roleArn(default_.arn())
.description("Test for terraform fnf_flow.")
.name("tf-example-flow")
.type("FDL")
.build());
}
}
Content copied to clipboard
resources:
default:
type: alicloud:ram:Role
properties:
name: tf-example-fnfflow
document: |2
{
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"fnf.aliyuncs.com"
]
}
}
],
"Version": "1"
}
example:
type: alicloud:fnf:Flow
properties:
definition: |2
version: v1beta1
type: flow
steps:
- type: pass
name: helloworld
roleArn: ${default.arn}
description: Test for terraform fnf_flow.
name: tf-example-flow
type: FDL
Content copied to clipboard
Import
Serverless Workflow Flow can be imported using the id, e.g.
$ pulumi import alicloud:fnf/flow:Flow example <name>
Content copied to clipboard
Properties
Link copied to clipboard
The definition of the flow. It must comply with the Flow Definition Language (FDL) syntax.
Link copied to clipboard
The description of the flow.
Link copied to clipboard
The time when the flow was last modified.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard