fnf

package
v2.31.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flow

type Flow struct {
	pulumi.CustomResourceState

	// The definition of the flow. It must comply with the Flow Definition Language (FDL) syntax.
	Definition pulumi.StringOutput `pulumi:"definition"`
	// The description of the flow.
	Description pulumi.StringOutput `pulumi:"description"`
	// The unique ID of the flow.
	FlowId pulumi.StringOutput `pulumi:"flowId"`
	// The time when the flow was last modified.
	LastModifiedTime pulumi.StringOutput `pulumi:"lastModifiedTime"`
	// The name of the flow. The name must be unique in an Alibaba Cloud account.
	Name pulumi.StringOutput `pulumi:"name"`
	// The ARN of the specified RAM role that Serverless Workflow uses to assume the role when Serverless Workflow executes a flow.
	RoleArn pulumi.StringPtrOutput `pulumi:"roleArn"`
	// The type of the flow. Valid values are `FDL` or `DEFAULT`.
	Type pulumi.StringOutput `pulumi:"type"`
}

Provides a Serverless Workflow Flow resource.

For information about Serverless Workflow Flow and how to use it, see [What is Flow](https://www.alibabacloud.com/help/en/doc-detail/123079.htm).

> **NOTE:** Available in v1.105.0+.

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/fnf"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewRole(ctx, "_default", &ram.RoleArgs{
			Document: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "  {\n", "    \"Statement\": [\n", "      {\n", "        \"Action\": \"sts:AssumeRole\",\n", "        \"Effect\": \"Allow\",\n", "        \"Principal\": {\n", "          \"Service\": [\n", "            \"fnf.aliyuncs.com\"\n", "          ]\n", "        }\n", "      }\n", "    ],\n", "    \"Version\": \"1\"\n", "  }\n")),
		})
		if err != nil {
			return err
		}
		_, err = fnf.NewFlow(ctx, "example", &fnf.FlowArgs{
			Definition:  pulumi.String(fmt.Sprintf("%v%v%v%v%v", "  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
	})
}

```

## Import

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

```sh

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

```

func GetFlow

func GetFlow(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *FlowState, opts ...pulumi.ResourceOption) (*Flow, error)

GetFlow gets an existing Flow resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewFlow

func NewFlow(ctx *pulumi.Context,
	name string, args *FlowArgs, opts ...pulumi.ResourceOption) (*Flow, error)

NewFlow registers a new resource with the given unique name, arguments, and options.

func (Flow) ElementType

func (Flow) ElementType() reflect.Type

func (Flow) ToFlowOutput

func (i Flow) ToFlowOutput() FlowOutput

func (Flow) ToFlowOutputWithContext

func (i Flow) ToFlowOutputWithContext(ctx context.Context) FlowOutput

type FlowArgs

type FlowArgs struct {
	// The definition of the flow. It must comply with the Flow Definition Language (FDL) syntax.
	Definition pulumi.StringInput
	// The description of the flow.
	Description pulumi.StringInput
	// The name of the flow. The name must be unique in an Alibaba Cloud account.
	Name pulumi.StringPtrInput
	// The ARN of the specified RAM role that Serverless Workflow uses to assume the role when Serverless Workflow executes a flow.
	RoleArn pulumi.StringPtrInput
	// The type of the flow. Valid values are `FDL` or `DEFAULT`.
	Type pulumi.StringInput
}

The set of arguments for constructing a Flow resource.

func (FlowArgs) ElementType

func (FlowArgs) ElementType() reflect.Type

type FlowInput

type FlowInput interface {
	pulumi.Input

	ToFlowOutput() FlowOutput
	ToFlowOutputWithContext(ctx context.Context) FlowOutput
}

type FlowOutput

type FlowOutput struct {
	*pulumi.OutputState
}

func (FlowOutput) ElementType

func (FlowOutput) ElementType() reflect.Type

func (FlowOutput) ToFlowOutput

func (o FlowOutput) ToFlowOutput() FlowOutput

func (FlowOutput) ToFlowOutputWithContext

func (o FlowOutput) ToFlowOutputWithContext(ctx context.Context) FlowOutput

type FlowState

type FlowState struct {
	// The definition of the flow. It must comply with the Flow Definition Language (FDL) syntax.
	Definition pulumi.StringPtrInput
	// The description of the flow.
	Description pulumi.StringPtrInput
	// The unique ID of the flow.
	FlowId pulumi.StringPtrInput
	// The time when the flow was last modified.
	LastModifiedTime pulumi.StringPtrInput
	// The name of the flow. The name must be unique in an Alibaba Cloud account.
	Name pulumi.StringPtrInput
	// The ARN of the specified RAM role that Serverless Workflow uses to assume the role when Serverless Workflow executes a flow.
	RoleArn pulumi.StringPtrInput
	// The type of the flow. Valid values are `FDL` or `DEFAULT`.
	Type pulumi.StringPtrInput
}

func (FlowState) ElementType

func (FlowState) ElementType() reflect.Type

type GetFlowsArgs

type GetFlowsArgs struct {
	// A list of Flow IDs.
	Ids []string `pulumi:"ids"`
	// The number of resource queries.
	Limit *int `pulumi:"limit"`
	// A regex string to filter results by Flow name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getFlows.

type GetFlowsFlow

type GetFlowsFlow struct {
	// The definition of the flow. It must comply with the Flow Definition Language (FDL) syntax.
	Definition string `pulumi:"definition"`
	// The description of the flow.
	Description string `pulumi:"description"`
	// The unique ID of the flow.
	FlowId string `pulumi:"flowId"`
	// The ID of the Flow.
	Id string `pulumi:"id"`
	// The time when the flow was last modified.
	LastModifiedTime string `pulumi:"lastModifiedTime"`
	// The name of the flow. The name must be unique in an Alibaba Cloud account.
	Name string `pulumi:"name"`
	// The ARN of the specified RAM role that Serverless Workflow uses to assume the role when Serverless Workflow executes a flow.
	RoleArn string `pulumi:"roleArn"`
	// The type of the flow. Set the value to `FDL`.
	Type string `pulumi:"type"`
}

type GetFlowsFlowArgs

type GetFlowsFlowArgs struct {
	// The definition of the flow. It must comply with the Flow Definition Language (FDL) syntax.
	Definition pulumi.StringInput `pulumi:"definition"`
	// The description of the flow.
	Description pulumi.StringInput `pulumi:"description"`
	// The unique ID of the flow.
	FlowId pulumi.StringInput `pulumi:"flowId"`
	// The ID of the Flow.
	Id pulumi.StringInput `pulumi:"id"`
	// The time when the flow was last modified.
	LastModifiedTime pulumi.StringInput `pulumi:"lastModifiedTime"`
	// The name of the flow. The name must be unique in an Alibaba Cloud account.
	Name pulumi.StringInput `pulumi:"name"`
	// The ARN of the specified RAM role that Serverless Workflow uses to assume the role when Serverless Workflow executes a flow.
	RoleArn pulumi.StringInput `pulumi:"roleArn"`
	// The type of the flow. Set the value to `FDL`.
	Type pulumi.StringInput `pulumi:"type"`
}

func (GetFlowsFlowArgs) ElementType

func (GetFlowsFlowArgs) ElementType() reflect.Type

func (GetFlowsFlowArgs) ToGetFlowsFlowOutput

func (i GetFlowsFlowArgs) ToGetFlowsFlowOutput() GetFlowsFlowOutput

func (GetFlowsFlowArgs) ToGetFlowsFlowOutputWithContext

func (i GetFlowsFlowArgs) ToGetFlowsFlowOutputWithContext(ctx context.Context) GetFlowsFlowOutput

type GetFlowsFlowArray

type GetFlowsFlowArray []GetFlowsFlowInput

func (GetFlowsFlowArray) ElementType

func (GetFlowsFlowArray) ElementType() reflect.Type

func (GetFlowsFlowArray) ToGetFlowsFlowArrayOutput

func (i GetFlowsFlowArray) ToGetFlowsFlowArrayOutput() GetFlowsFlowArrayOutput

func (GetFlowsFlowArray) ToGetFlowsFlowArrayOutputWithContext

func (i GetFlowsFlowArray) ToGetFlowsFlowArrayOutputWithContext(ctx context.Context) GetFlowsFlowArrayOutput

type GetFlowsFlowArrayInput

type GetFlowsFlowArrayInput interface {
	pulumi.Input

	ToGetFlowsFlowArrayOutput() GetFlowsFlowArrayOutput
	ToGetFlowsFlowArrayOutputWithContext(context.Context) GetFlowsFlowArrayOutput
}

GetFlowsFlowArrayInput is an input type that accepts GetFlowsFlowArray and GetFlowsFlowArrayOutput values. You can construct a concrete instance of `GetFlowsFlowArrayInput` via:

GetFlowsFlowArray{ GetFlowsFlowArgs{...} }

type GetFlowsFlowArrayOutput

type GetFlowsFlowArrayOutput struct{ *pulumi.OutputState }

func (GetFlowsFlowArrayOutput) ElementType

func (GetFlowsFlowArrayOutput) ElementType() reflect.Type

func (GetFlowsFlowArrayOutput) Index

func (GetFlowsFlowArrayOutput) ToGetFlowsFlowArrayOutput

func (o GetFlowsFlowArrayOutput) ToGetFlowsFlowArrayOutput() GetFlowsFlowArrayOutput

func (GetFlowsFlowArrayOutput) ToGetFlowsFlowArrayOutputWithContext

func (o GetFlowsFlowArrayOutput) ToGetFlowsFlowArrayOutputWithContext(ctx context.Context) GetFlowsFlowArrayOutput

type GetFlowsFlowInput

type GetFlowsFlowInput interface {
	pulumi.Input

	ToGetFlowsFlowOutput() GetFlowsFlowOutput
	ToGetFlowsFlowOutputWithContext(context.Context) GetFlowsFlowOutput
}

GetFlowsFlowInput is an input type that accepts GetFlowsFlowArgs and GetFlowsFlowOutput values. You can construct a concrete instance of `GetFlowsFlowInput` via:

GetFlowsFlowArgs{...}

type GetFlowsFlowOutput

type GetFlowsFlowOutput struct{ *pulumi.OutputState }

func (GetFlowsFlowOutput) Definition

func (o GetFlowsFlowOutput) Definition() pulumi.StringOutput

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

func (GetFlowsFlowOutput) Description

func (o GetFlowsFlowOutput) Description() pulumi.StringOutput

The description of the flow.

func (GetFlowsFlowOutput) ElementType

func (GetFlowsFlowOutput) ElementType() reflect.Type

func (GetFlowsFlowOutput) FlowId

The unique ID of the flow.

func (GetFlowsFlowOutput) Id

The ID of the Flow.

func (GetFlowsFlowOutput) LastModifiedTime

func (o GetFlowsFlowOutput) LastModifiedTime() pulumi.StringOutput

The time when the flow was last modified.

func (GetFlowsFlowOutput) Name

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

func (GetFlowsFlowOutput) RoleArn

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

func (GetFlowsFlowOutput) ToGetFlowsFlowOutput

func (o GetFlowsFlowOutput) ToGetFlowsFlowOutput() GetFlowsFlowOutput

func (GetFlowsFlowOutput) ToGetFlowsFlowOutputWithContext

func (o GetFlowsFlowOutput) ToGetFlowsFlowOutputWithContext(ctx context.Context) GetFlowsFlowOutput

func (GetFlowsFlowOutput) Type

The type of the flow. Set the value to `FDL`.

type GetFlowsResult

type GetFlowsResult struct {
	Flows []GetFlowsFlow `pulumi:"flows"`
	// The provider-assigned unique ID for this managed resource.
	Id         string   `pulumi:"id"`
	Ids        []string `pulumi:"ids"`
	Limit      *int     `pulumi:"limit"`
	NameRegex  *string  `pulumi:"nameRegex"`
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
}

A collection of values returned by getFlows.

func GetFlows

func GetFlows(ctx *pulumi.Context, args *GetFlowsArgs, opts ...pulumi.InvokeOption) (*GetFlowsResult, error)

This data source provides the Fnf Flows of the current Alibaba Cloud user.

> **NOTE:** Available in v1.105.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/fnf"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "the_resource_name"
		example, err := fnf.GetFlows(ctx, &fnf.GetFlowsArgs{
			Ids: []string{
				"example_value",
			},
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstFnfFlowId", example.Flows[0].Id)
		return nil
	})
}

```

type GetSchedulesArgs

type GetSchedulesArgs struct {
	// The name of the flow bound to the time-based schedule you want to create.
	FlowName string `pulumi:"flowName"`
	// A list of Schedule IDs.
	Ids []string `pulumi:"ids"`
	// The number of resource queries.
	Limit *int `pulumi:"limit"`
	// A regex string to filter results by Schedule name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getSchedules.

type GetSchedulesResult

type GetSchedulesResult struct {
	FlowName string `pulumi:"flowName"`
	// The provider-assigned unique ID for this managed resource.
	Id         string                 `pulumi:"id"`
	Ids        []string               `pulumi:"ids"`
	Limit      *int                   `pulumi:"limit"`
	NameRegex  *string                `pulumi:"nameRegex"`
	Names      []string               `pulumi:"names"`
	OutputFile *string                `pulumi:"outputFile"`
	Schedules  []GetSchedulesSchedule `pulumi:"schedules"`
}

A collection of values returned by getSchedules.

func GetSchedules

func GetSchedules(ctx *pulumi.Context, args *GetSchedulesArgs, opts ...pulumi.InvokeOption) (*GetSchedulesResult, error)

This data source provides the Fnf Schedules of the current Alibaba Cloud user.

> **NOTE:** Available in v1.105.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/fnf"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "the_resource_name"
		example, err := fnf.GetSchedules(ctx, &fnf.GetSchedulesArgs{
			FlowName: "example_value",
			Ids: []string{
				"example_value",
			},
			NameRegex: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstFnfScheduleId", example.Schedules[0].Id)
		return nil
	})
}

```

type GetSchedulesSchedule

type GetSchedulesSchedule struct {
	// The CRON expression of the time-based schedule to be created.
	CronExpression string `pulumi:"cronExpression"`
	// The description of the time-based schedule to be created.
	Description string `pulumi:"description"`
	// Specifies whether to enable the time-based schedule you want to create.
	Enable bool `pulumi:"enable"`
	// The ID of the Schedule.
	Id string `pulumi:"id"`
	// The time when the time-based schedule was last updated.
	LastModifiedTime string `pulumi:"lastModifiedTime"`
	// The trigger message of the time-based schedule to be created. It must be in JSON object format.
	Payload string `pulumi:"payload"`
	// The ID of the time-based schedule.
	ScheduleId string `pulumi:"scheduleId"`
	// The name of the time-based schedule to be created.
	ScheduleName string `pulumi:"scheduleName"`
}

type GetSchedulesScheduleArgs

type GetSchedulesScheduleArgs struct {
	// The CRON expression of the time-based schedule to be created.
	CronExpression pulumi.StringInput `pulumi:"cronExpression"`
	// The description of the time-based schedule to be created.
	Description pulumi.StringInput `pulumi:"description"`
	// Specifies whether to enable the time-based schedule you want to create.
	Enable pulumi.BoolInput `pulumi:"enable"`
	// The ID of the Schedule.
	Id pulumi.StringInput `pulumi:"id"`
	// The time when the time-based schedule was last updated.
	LastModifiedTime pulumi.StringInput `pulumi:"lastModifiedTime"`
	// The trigger message of the time-based schedule to be created. It must be in JSON object format.
	Payload pulumi.StringInput `pulumi:"payload"`
	// The ID of the time-based schedule.
	ScheduleId pulumi.StringInput `pulumi:"scheduleId"`
	// The name of the time-based schedule to be created.
	ScheduleName pulumi.StringInput `pulumi:"scheduleName"`
}

func (GetSchedulesScheduleArgs) ElementType

func (GetSchedulesScheduleArgs) ElementType() reflect.Type

func (GetSchedulesScheduleArgs) ToGetSchedulesScheduleOutput

func (i GetSchedulesScheduleArgs) ToGetSchedulesScheduleOutput() GetSchedulesScheduleOutput

func (GetSchedulesScheduleArgs) ToGetSchedulesScheduleOutputWithContext

func (i GetSchedulesScheduleArgs) ToGetSchedulesScheduleOutputWithContext(ctx context.Context) GetSchedulesScheduleOutput

type GetSchedulesScheduleArray

type GetSchedulesScheduleArray []GetSchedulesScheduleInput

func (GetSchedulesScheduleArray) ElementType

func (GetSchedulesScheduleArray) ElementType() reflect.Type

func (GetSchedulesScheduleArray) ToGetSchedulesScheduleArrayOutput

func (i GetSchedulesScheduleArray) ToGetSchedulesScheduleArrayOutput() GetSchedulesScheduleArrayOutput

func (GetSchedulesScheduleArray) ToGetSchedulesScheduleArrayOutputWithContext

func (i GetSchedulesScheduleArray) ToGetSchedulesScheduleArrayOutputWithContext(ctx context.Context) GetSchedulesScheduleArrayOutput

type GetSchedulesScheduleArrayInput

type GetSchedulesScheduleArrayInput interface {
	pulumi.Input

	ToGetSchedulesScheduleArrayOutput() GetSchedulesScheduleArrayOutput
	ToGetSchedulesScheduleArrayOutputWithContext(context.Context) GetSchedulesScheduleArrayOutput
}

GetSchedulesScheduleArrayInput is an input type that accepts GetSchedulesScheduleArray and GetSchedulesScheduleArrayOutput values. You can construct a concrete instance of `GetSchedulesScheduleArrayInput` via:

GetSchedulesScheduleArray{ GetSchedulesScheduleArgs{...} }

type GetSchedulesScheduleArrayOutput

type GetSchedulesScheduleArrayOutput struct{ *pulumi.OutputState }

func (GetSchedulesScheduleArrayOutput) ElementType

func (GetSchedulesScheduleArrayOutput) Index

func (GetSchedulesScheduleArrayOutput) ToGetSchedulesScheduleArrayOutput

func (o GetSchedulesScheduleArrayOutput) ToGetSchedulesScheduleArrayOutput() GetSchedulesScheduleArrayOutput

func (GetSchedulesScheduleArrayOutput) ToGetSchedulesScheduleArrayOutputWithContext

func (o GetSchedulesScheduleArrayOutput) ToGetSchedulesScheduleArrayOutputWithContext(ctx context.Context) GetSchedulesScheduleArrayOutput

type GetSchedulesScheduleInput

type GetSchedulesScheduleInput interface {
	pulumi.Input

	ToGetSchedulesScheduleOutput() GetSchedulesScheduleOutput
	ToGetSchedulesScheduleOutputWithContext(context.Context) GetSchedulesScheduleOutput
}

GetSchedulesScheduleInput is an input type that accepts GetSchedulesScheduleArgs and GetSchedulesScheduleOutput values. You can construct a concrete instance of `GetSchedulesScheduleInput` via:

GetSchedulesScheduleArgs{...}

type GetSchedulesScheduleOutput

type GetSchedulesScheduleOutput struct{ *pulumi.OutputState }

func (GetSchedulesScheduleOutput) CronExpression

func (o GetSchedulesScheduleOutput) CronExpression() pulumi.StringOutput

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

func (GetSchedulesScheduleOutput) Description

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

func (GetSchedulesScheduleOutput) ElementType

func (GetSchedulesScheduleOutput) ElementType() reflect.Type

func (GetSchedulesScheduleOutput) Enable

Specifies whether to enable the time-based schedule you want to create.

func (GetSchedulesScheduleOutput) Id

The ID of the Schedule.

func (GetSchedulesScheduleOutput) LastModifiedTime

func (o GetSchedulesScheduleOutput) LastModifiedTime() pulumi.StringOutput

The time when the time-based schedule was last updated.

func (GetSchedulesScheduleOutput) Payload

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

func (GetSchedulesScheduleOutput) ScheduleId

The ID of the time-based schedule.

func (GetSchedulesScheduleOutput) ScheduleName

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

func (GetSchedulesScheduleOutput) ToGetSchedulesScheduleOutput

func (o GetSchedulesScheduleOutput) ToGetSchedulesScheduleOutput() GetSchedulesScheduleOutput

func (GetSchedulesScheduleOutput) ToGetSchedulesScheduleOutputWithContext

func (o GetSchedulesScheduleOutput) ToGetSchedulesScheduleOutputWithContext(ctx context.Context) GetSchedulesScheduleOutput

type Schedule

type Schedule struct {
	pulumi.CustomResourceState

	// The CRON expression of the time-based schedule to be created.
	CronExpression pulumi.StringOutput `pulumi:"cronExpression"`
	// The description of the time-based schedule to be created.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Specifies whether to enable the time-based schedule you want to create. Valid values: `false`, `true`.
	Enable pulumi.BoolPtrOutput `pulumi:"enable"`
	// The name of the flow bound to the time-based schedule you want to create.
	FlowName pulumi.StringOutput `pulumi:"flowName"`
	// The time when the time-based schedule was last updated.
	LastModifiedTime pulumi.StringOutput `pulumi:"lastModifiedTime"`
	// The trigger message of the time-based schedule to be created. It must be in JSON object format.
	Payload pulumi.StringPtrOutput `pulumi:"payload"`
	// The ID of the time-based schedule.
	ScheduleId pulumi.StringOutput `pulumi:"scheduleId"`
	// The name of the time-based schedule to be created.
	ScheduleName pulumi.StringOutput `pulumi:"scheduleName"`
}

Provides a Serverless Workflow Schedule resource.

For information about Serverless Workflow Schedule and how to use it, see [What is Schedule](https://www.alibabacloud.com/help/en/doc-detail/168934.htm).

> **NOTE:** Available in v1.105.0+.

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/fnf"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleFlow, err := fnf.NewFlow(ctx, "exampleFlow", &fnf.FlowArgs{
			Definition:  pulumi.String(fmt.Sprintf("%v%v%v%v%v", "  version: v1beta1\n", "  type: flow\n", "  steps:\n", "    - type: pass\n", "      name: helloworld\n")),
			Description: pulumi.String("tf-testaccFnFFlow983041"),
			Type:        pulumi.String("FDL"),
		})
		if err != nil {
			return err
		}
		_, err = fnf.NewSchedule(ctx, "exampleSchedule", &fnf.ScheduleArgs{
			CronExpression: pulumi.String("30 9 * * * *"),
			Description:    pulumi.String("tf-testaccFnFSchedule983041"),
			Enable:         pulumi.Bool(true),
			FlowName:       exampleFlow.Name,
			Payload:        pulumi.String("{\"tf-test\": \"test success\"}"),
			ScheduleName:   pulumi.String("tf-testaccFnFSchedule983041"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh

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

```

func GetSchedule

func GetSchedule(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ScheduleState, opts ...pulumi.ResourceOption) (*Schedule, error)

GetSchedule gets an existing Schedule resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSchedule

func NewSchedule(ctx *pulumi.Context,
	name string, args *ScheduleArgs, opts ...pulumi.ResourceOption) (*Schedule, error)

NewSchedule registers a new resource with the given unique name, arguments, and options.

func (Schedule) ElementType

func (Schedule) ElementType() reflect.Type

func (Schedule) ToScheduleOutput

func (i Schedule) ToScheduleOutput() ScheduleOutput

func (Schedule) ToScheduleOutputWithContext

func (i Schedule) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput

type ScheduleArgs

type ScheduleArgs struct {
	// The CRON expression of the time-based schedule to be created.
	CronExpression pulumi.StringInput
	// The description of the time-based schedule to be created.
	Description pulumi.StringPtrInput
	// Specifies whether to enable the time-based schedule you want to create. Valid values: `false`, `true`.
	Enable pulumi.BoolPtrInput
	// The name of the flow bound to the time-based schedule you want to create.
	FlowName pulumi.StringInput
	// The trigger message of the time-based schedule to be created. It must be in JSON object format.
	Payload pulumi.StringPtrInput
	// The name of the time-based schedule to be created.
	ScheduleName pulumi.StringInput
}

The set of arguments for constructing a Schedule resource.

func (ScheduleArgs) ElementType

func (ScheduleArgs) ElementType() reflect.Type

type ScheduleInput

type ScheduleInput interface {
	pulumi.Input

	ToScheduleOutput() ScheduleOutput
	ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput
}

type ScheduleOutput

type ScheduleOutput struct {
	*pulumi.OutputState
}

func (ScheduleOutput) ElementType

func (ScheduleOutput) ElementType() reflect.Type

func (ScheduleOutput) ToScheduleOutput

func (o ScheduleOutput) ToScheduleOutput() ScheduleOutput

func (ScheduleOutput) ToScheduleOutputWithContext

func (o ScheduleOutput) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput

type ScheduleState

type ScheduleState struct {
	// The CRON expression of the time-based schedule to be created.
	CronExpression pulumi.StringPtrInput
	// The description of the time-based schedule to be created.
	Description pulumi.StringPtrInput
	// Specifies whether to enable the time-based schedule you want to create. Valid values: `false`, `true`.
	Enable pulumi.BoolPtrInput
	// The name of the flow bound to the time-based schedule you want to create.
	FlowName pulumi.StringPtrInput
	// The time when the time-based schedule was last updated.
	LastModifiedTime pulumi.StringPtrInput
	// The trigger message of the time-based schedule to be created. It must be in JSON object format.
	Payload pulumi.StringPtrInput
	// The ID of the time-based schedule.
	ScheduleId pulumi.StringPtrInput
	// The name of the time-based schedule to be created.
	ScheduleName pulumi.StringPtrInput
}

func (ScheduleState) ElementType

func (ScheduleState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL