1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. fnf
  5. Flow
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

alicloud.fnf.Flow

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

    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", {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",
    });
    
    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")
    
    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 {
    		_, err := ram.NewRole(ctx, "default", &ram.RoleArgs{
    			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."),
    			Type:        pulumi.String("FDL"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()
        {
            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.",
            Type = "FDL",
        });
    
    });
    
    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());
    
        }
    }
    
    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 Flow Resource

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

    Constructor syntax

    new Flow(name: string, args: FlowArgs, opts?: CustomResourceOptions);
    @overload
    def Flow(resource_name: str,
             args: FlowArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Flow(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             definition: Optional[str] = None,
             description: Optional[str] = None,
             type: Optional[str] = None,
             name: Optional[str] = None,
             role_arn: Optional[str] = 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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var flowResource = new AliCloud.FNF.Flow("flowResource", new()
    {
        Definition = "string",
        Description = "string",
        Type = "string",
        Name = "string",
        RoleArn = "string",
    });
    
    example, err := fnf.NewFlow(ctx, "flowResource", &fnf.FlowArgs{
    	Definition:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	RoleArn:     pulumi.String("string"),
    })
    
    var flowResource = new Flow("flowResource", FlowArgs.builder()        
        .definition("string")
        .description("string")
        .type("string")
        .name("string")
        .roleArn("string")
        .build());
    
    flow_resource = alicloud.fnf.Flow("flowResource",
        definition="string",
        description="string",
        type="string",
        name="string",
        role_arn="string")
    
    const flowResource = new alicloud.fnf.Flow("flowResource", {
        definition: "string",
        description: "string",
        type: "string",
        name: "string",
        roleArn: "string",
    });
    
    type: alicloud:fnf:Flow
    properties:
        definition: string
        description: string
        name: string
        roleArn: string
        type: string
    

    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 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>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi