FlowArgs

data class FlowArgs(val definition: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val roleArn: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<FlowArgs>

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",
});
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")
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",
});
});
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
})
}
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());
}
}
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

Import

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

$ pulumi import alicloud:fnf/flow:Flow example <name>

Constructors

Link copied to clipboard
constructor(definition: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, roleArn: Output<String>? = null, type: Output<String>? = null)

Properties

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

The definition of the flow. It must comply with the Flow Definition Language (FDL) syntax.

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

The description of the flow.

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

The name of the flow. The name must be unique in an Alibaba Cloud account.

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

The ARN of the specified RAM role that Serverless Workflow uses to assume the role when Serverless Workflow executes a flow.

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

The type of the flow. Valid values are FDL or DEFAULT.

Functions

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