Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.27.0 published on Monday, Aug 8, 2022 by Pulumi

Flow

Provides a Serverless Workflow Flow resource.

For information about Serverless Workflow Flow and how to use it, see What is Flow.

NOTE: Available in v1.105.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new AliCloud.Ram.Role("default", new AliCloud.Ram.RoleArgs
        {
            Document = @"  {
    ""Statement"": [
      {
        ""Action"": ""sts:AssumeRole"",
        ""Effect"": ""Allow"",
        ""Principal"": {
          ""Service"": [
            ""fnf.aliyuncs.com""
          ]
        }
      }
    ],
    ""Version"": ""1""
  }
",
        });
        var example = new AliCloud.FNF.Flow("example", new AliCloud.FNF.FlowArgs
        {
            Definition = @"  version: v1beta1
  type: flow
  steps:
    - type: pass
      name: helloworld
",
            RoleArn = @default.Arn,
            Description = "Test for terraform fnf_flow.",
            Type = "FDL",
        });
    }

}
package main

import (
	"fmt"

	"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 {
		_, err := ram.NewRole(ctx, "default", &ram.RoleArgs{
			Document: pulumi.String(fmt.Sprintf(`  {
    "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(fmt.Sprintf("  version: v1beta1\n  type: flow\n  steps:\n    - type: pass\n      name: helloworld\n")),
			RoleArn:     _default.Arn,
			Description: pulumi.String("Test for terraform fnf_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()        
            .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.")
            .type("FDL")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ram.Role("default", 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.",
    type="FDL")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.ram.Role("default", {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.",
    type: "FDL",
});
resources:
  default:
    type: alicloud:ram:Role
    properties:
      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.
      type: FDL

Create a Flow Resource

new Flow(name: string, args: FlowArgs, opts?: CustomResourceOptions);
@overload
def Flow(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         definition: Optional[str] = None,
         description: Optional[str] = None,
         name: Optional[str] = None,
         role_arn: Optional[str] = None,
         type: Optional[str] = None)
@overload
def Flow(resource_name: str,
         args: FlowArgs,
         opts: Optional[ResourceOptions] = None)
func NewFlow(ctx *Context, name string, args FlowArgs, opts ...ResourceOption) (*Flow, error)
public Flow(string name, FlowArgs args, CustomResourceOptions? opts = null)
public Flow(String name, FlowArgs args)
public Flow(String name, FlowArgs args, CustomResourceOptions options)
type: alicloud:fnf:Flow
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FlowArgs
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 FlowArgs
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 FlowArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FlowArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FlowArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Flow Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Flow resource accepts the following input properties:

Definition string

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

Description string

The description of the flow.

Type string

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

Name string

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

RoleArn string

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

Definition string

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

Description string

The description of the flow.

Type string

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

Name string

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

RoleArn string

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

definition String

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

description String

The description of the flow.

type String

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

name String

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

roleArn String

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

definition string

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

description string

The description of the flow.

type string

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

name string

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

roleArn string

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

definition str

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

description str

The description of the flow.

type str

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

name str

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

role_arn str

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

definition String

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

description String

The description of the flow.

type String

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

name String

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

roleArn String

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

Outputs

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

FlowId string

The unique ID of the flow.

Id string

The provider-assigned unique ID for this managed resource.

LastModifiedTime string

The time when the flow was last modified.

FlowId string

The unique ID of the flow.

Id string

The provider-assigned unique ID for this managed resource.

LastModifiedTime string

The time when the flow was last modified.

flowId String

The unique ID of the flow.

id String

The provider-assigned unique ID for this managed resource.

lastModifiedTime String

The time when the flow was last modified.

flowId string

The unique ID of the flow.

id string

The provider-assigned unique ID for this managed resource.

lastModifiedTime string

The time when the flow was last modified.

flow_id str

The unique ID of the flow.

id str

The provider-assigned unique ID for this managed resource.

last_modified_time str

The time when the flow was last modified.

flowId String

The unique ID of the flow.

id String

The provider-assigned unique ID for this managed resource.

lastModifiedTime String

The time when the flow was last modified.

Look up an Existing Flow Resource

Get an existing Flow 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?: FlowState, opts?: CustomResourceOptions): Flow
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        definition: Optional[str] = None,
        description: Optional[str] = None,
        flow_id: Optional[str] = None,
        last_modified_time: Optional[str] = None,
        name: Optional[str] = None,
        role_arn: Optional[str] = None,
        type: Optional[str] = None) -> Flow
func GetFlow(ctx *Context, name string, id IDInput, state *FlowState, opts ...ResourceOption) (*Flow, error)
public static Flow Get(string name, Input<string> id, FlowState? state, CustomResourceOptions? opts = null)
public static Flow get(String name, Output<String> id, FlowState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
Definition string

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

Description string

The description of the flow.

FlowId string

The unique ID of the flow.

LastModifiedTime string

The time when the flow was last modified.

Name string

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

RoleArn string

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

Type string

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

Definition string

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

Description string

The description of the flow.

FlowId string

The unique ID of the flow.

LastModifiedTime string

The time when the flow was last modified.

Name string

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

RoleArn string

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

Type string

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

definition String

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

description String

The description of the flow.

flowId String

The unique ID of the flow.

lastModifiedTime String

The time when the flow was last modified.

name String

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

roleArn String

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

type String

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

definition string

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

description string

The description of the flow.

flowId string

The unique ID of the flow.

lastModifiedTime string

The time when the flow was last modified.

name string

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

roleArn string

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

type string

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

definition str

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

description str

The description of the flow.

flow_id str

The unique ID of the flow.

last_modified_time str

The time when the flow was last modified.

name str

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

role_arn str

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

type str

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

definition String

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

description String

The description of the flow.

flowId String

The unique ID of the flow.

lastModifiedTime String

The time when the flow was last modified.

name String

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

roleArn String

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

type String

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

Import

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.