Documentation ¶
Index ¶
- type Workflow
- type WorkflowArgs
- type WorkflowArray
- type WorkflowArrayInput
- type WorkflowArrayOutput
- type WorkflowInput
- type WorkflowMap
- type WorkflowMapInput
- type WorkflowMapOutput
- type WorkflowOutput
- func (o WorkflowOutput) CreateTime() pulumi.StringOutput
- func (o WorkflowOutput) Description() pulumi.StringOutput
- func (WorkflowOutput) ElementType() reflect.Type
- func (o WorkflowOutput) Labels() pulumi.StringMapOutput
- func (o WorkflowOutput) Name() pulumi.StringOutput
- func (o WorkflowOutput) NamePrefix() pulumi.StringOutput
- func (o WorkflowOutput) Project() pulumi.StringOutput
- func (o WorkflowOutput) Region() pulumi.StringPtrOutput
- func (o WorkflowOutput) RevisionId() pulumi.StringOutput
- func (o WorkflowOutput) ServiceAccount() pulumi.StringOutput
- func (o WorkflowOutput) SourceContents() pulumi.StringPtrOutput
- func (o WorkflowOutput) State() pulumi.StringOutput
- func (o WorkflowOutput) ToWorkflowOutput() WorkflowOutput
- func (o WorkflowOutput) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
- func (o WorkflowOutput) UpdateTime() pulumi.StringOutput
- type WorkflowState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Workflow ¶
type Workflow struct { pulumi.CustomResourceState // The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine // fractional digits. CreateTime pulumi.StringOutput `pulumi:"createTime"` // Description of the workflow provided by the user. Must be at most 1000 unicode characters long. Description pulumi.StringOutput `pulumi:"description"` // A set of key/value label pairs to assign to this Workflow. Labels pulumi.StringMapOutput `pulumi:"labels"` // Name of the Workflow. Name pulumi.StringOutput `pulumi:"name"` // Creates a unique name beginning with the // specified prefix. If this and name are unspecified, a random value is chosen for the name. NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringOutput `pulumi:"project"` // The region of the workflow. Region pulumi.StringPtrOutput `pulumi:"region"` // The revision of the workflow. A new one is generated if the service account or source contents is changed. RevisionId pulumi.StringOutput `pulumi:"revisionId"` // Name of the service account associated with the latest workflow version. This service // account represents the identity of the workflow and determines what permissions the workflow has. // Format: projects/{project}/serviceAccounts/{account}. ServiceAccount pulumi.StringOutput `pulumi:"serviceAccount"` // Workflow code to be executed. The size limit is 32KB. SourceContents pulumi.StringPtrOutput `pulumi:"sourceContents"` // State of the workflow deployment. State pulumi.StringOutput `pulumi:"state"` // The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to // nine fractional digits. UpdateTime pulumi.StringOutput `pulumi:"updateTime"` }
Workflow program to be executed by Workflows.
To get more information about Workflow, see:
* [API documentation](https://cloud.google.com/workflows/docs/reference/rest/v1/projects.locations.workflows) * How-to Guides
- [Managing Workflows](https://cloud.google.com/workflows/docs/creating-updating-workflow)
## Example Usage ### Workflow Basic
```go package main
import (
"fmt" "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/serviceAccount" "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/workflows" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { testAccount, err := serviceAccount.NewAccount(ctx, "testAccount", &serviceAccount.AccountArgs{ AccountId: pulumi.String("my-account"), DisplayName: pulumi.String("Test Service Account"), }) if err != nil { return err } _, err = workflows.NewWorkflow(ctx, "example", &workflows.WorkflowArgs{ Region: pulumi.String("us-central1"), Description: pulumi.String("Magic"), ServiceAccount: testAccount.ID(), SourceContents: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "# This is a sample workflow, feel free to replace it with your source code\n", "#\n", "# This workflow does the following:\n", "# - reads current time and date information from an external API and stores\n", "# the response in CurrentDateTime variable\n", "# - retrieves a list of Wikipedia articles related to the day of the week\n", "# from CurrentDateTime\n", "# - returns the list of articles as an output of the workflow\n", "# FYI, In terraform you need to escape the ", "$", "$", " or it will cause errors.\n", "\n", "- getCurrentTime:\n", " call: http.get\n", " args:\n", " url: https://us-central1-workflowsample.cloudfunctions.net/datetime\n", " result: CurrentDateTime\n", "- readWikipedia:\n", " call: http.get\n", " args:\n", " url: https://en.wikipedia.org/w/api.php\n", " query:\n", " action: opensearch\n", " search: ", CurrentDateTime.Body.DayOfTheWeek, "\n", " result: WikiResult\n", "- returnOutput:\n", " return: ", WikiResult.Body[1], "\n")), }) if err != nil { return err } return nil }) }
```
## Import
This resource does not support import.
func GetWorkflow ¶
func GetWorkflow(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkflowState, opts ...pulumi.ResourceOption) (*Workflow, error)
GetWorkflow gets an existing Workflow 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 NewWorkflow ¶
func NewWorkflow(ctx *pulumi.Context, name string, args *WorkflowArgs, opts ...pulumi.ResourceOption) (*Workflow, error)
NewWorkflow registers a new resource with the given unique name, arguments, and options.
func (*Workflow) ElementType ¶
func (*Workflow) ToWorkflowOutput ¶
func (i *Workflow) ToWorkflowOutput() WorkflowOutput
func (*Workflow) ToWorkflowOutputWithContext ¶
func (i *Workflow) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
type WorkflowArgs ¶
type WorkflowArgs struct { // Description of the workflow provided by the user. Must be at most 1000 unicode characters long. Description pulumi.StringPtrInput // A set of key/value label pairs to assign to this Workflow. Labels pulumi.StringMapInput // Name of the Workflow. Name pulumi.StringPtrInput // Creates a unique name beginning with the // specified prefix. If this and name are unspecified, a random value is chosen for the name. NamePrefix pulumi.StringPtrInput // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringPtrInput // The region of the workflow. Region pulumi.StringPtrInput // Name of the service account associated with the latest workflow version. This service // account represents the identity of the workflow and determines what permissions the workflow has. // Format: projects/{project}/serviceAccounts/{account}. ServiceAccount pulumi.StringPtrInput // Workflow code to be executed. The size limit is 32KB. SourceContents pulumi.StringPtrInput }
The set of arguments for constructing a Workflow resource.
func (WorkflowArgs) ElementType ¶
func (WorkflowArgs) ElementType() reflect.Type
type WorkflowArray ¶
type WorkflowArray []WorkflowInput
func (WorkflowArray) ElementType ¶
func (WorkflowArray) ElementType() reflect.Type
func (WorkflowArray) ToWorkflowArrayOutput ¶
func (i WorkflowArray) ToWorkflowArrayOutput() WorkflowArrayOutput
func (WorkflowArray) ToWorkflowArrayOutputWithContext ¶
func (i WorkflowArray) ToWorkflowArrayOutputWithContext(ctx context.Context) WorkflowArrayOutput
type WorkflowArrayInput ¶
type WorkflowArrayInput interface { pulumi.Input ToWorkflowArrayOutput() WorkflowArrayOutput ToWorkflowArrayOutputWithContext(context.Context) WorkflowArrayOutput }
WorkflowArrayInput is an input type that accepts WorkflowArray and WorkflowArrayOutput values. You can construct a concrete instance of `WorkflowArrayInput` via:
WorkflowArray{ WorkflowArgs{...} }
type WorkflowArrayOutput ¶
type WorkflowArrayOutput struct{ *pulumi.OutputState }
func (WorkflowArrayOutput) ElementType ¶
func (WorkflowArrayOutput) ElementType() reflect.Type
func (WorkflowArrayOutput) Index ¶
func (o WorkflowArrayOutput) Index(i pulumi.IntInput) WorkflowOutput
func (WorkflowArrayOutput) ToWorkflowArrayOutput ¶
func (o WorkflowArrayOutput) ToWorkflowArrayOutput() WorkflowArrayOutput
func (WorkflowArrayOutput) ToWorkflowArrayOutputWithContext ¶
func (o WorkflowArrayOutput) ToWorkflowArrayOutputWithContext(ctx context.Context) WorkflowArrayOutput
type WorkflowInput ¶
type WorkflowInput interface { pulumi.Input ToWorkflowOutput() WorkflowOutput ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput }
type WorkflowMap ¶
type WorkflowMap map[string]WorkflowInput
func (WorkflowMap) ElementType ¶
func (WorkflowMap) ElementType() reflect.Type
func (WorkflowMap) ToWorkflowMapOutput ¶
func (i WorkflowMap) ToWorkflowMapOutput() WorkflowMapOutput
func (WorkflowMap) ToWorkflowMapOutputWithContext ¶
func (i WorkflowMap) ToWorkflowMapOutputWithContext(ctx context.Context) WorkflowMapOutput
type WorkflowMapInput ¶
type WorkflowMapInput interface { pulumi.Input ToWorkflowMapOutput() WorkflowMapOutput ToWorkflowMapOutputWithContext(context.Context) WorkflowMapOutput }
WorkflowMapInput is an input type that accepts WorkflowMap and WorkflowMapOutput values. You can construct a concrete instance of `WorkflowMapInput` via:
WorkflowMap{ "key": WorkflowArgs{...} }
type WorkflowMapOutput ¶
type WorkflowMapOutput struct{ *pulumi.OutputState }
func (WorkflowMapOutput) ElementType ¶
func (WorkflowMapOutput) ElementType() reflect.Type
func (WorkflowMapOutput) MapIndex ¶
func (o WorkflowMapOutput) MapIndex(k pulumi.StringInput) WorkflowOutput
func (WorkflowMapOutput) ToWorkflowMapOutput ¶
func (o WorkflowMapOutput) ToWorkflowMapOutput() WorkflowMapOutput
func (WorkflowMapOutput) ToWorkflowMapOutputWithContext ¶
func (o WorkflowMapOutput) ToWorkflowMapOutputWithContext(ctx context.Context) WorkflowMapOutput
type WorkflowOutput ¶
type WorkflowOutput struct{ *pulumi.OutputState }
func (WorkflowOutput) CreateTime ¶ added in v6.23.0
func (o WorkflowOutput) CreateTime() pulumi.StringOutput
The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
func (WorkflowOutput) Description ¶ added in v6.23.0
func (o WorkflowOutput) Description() pulumi.StringOutput
Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
func (WorkflowOutput) ElementType ¶
func (WorkflowOutput) ElementType() reflect.Type
func (WorkflowOutput) Labels ¶ added in v6.23.0
func (o WorkflowOutput) Labels() pulumi.StringMapOutput
A set of key/value label pairs to assign to this Workflow.
func (WorkflowOutput) Name ¶ added in v6.23.0
func (o WorkflowOutput) Name() pulumi.StringOutput
Name of the Workflow.
func (WorkflowOutput) NamePrefix ¶ added in v6.23.0
func (o WorkflowOutput) NamePrefix() pulumi.StringOutput
Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
func (WorkflowOutput) Project ¶ added in v6.23.0
func (o WorkflowOutput) Project() pulumi.StringOutput
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
func (WorkflowOutput) Region ¶ added in v6.23.0
func (o WorkflowOutput) Region() pulumi.StringPtrOutput
The region of the workflow.
func (WorkflowOutput) RevisionId ¶ added in v6.23.0
func (o WorkflowOutput) RevisionId() pulumi.StringOutput
The revision of the workflow. A new one is generated if the service account or source contents is changed.
func (WorkflowOutput) ServiceAccount ¶ added in v6.23.0
func (o WorkflowOutput) ServiceAccount() pulumi.StringOutput
Name of the service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. Format: projects/{project}/serviceAccounts/{account}.
func (WorkflowOutput) SourceContents ¶ added in v6.23.0
func (o WorkflowOutput) SourceContents() pulumi.StringPtrOutput
Workflow code to be executed. The size limit is 32KB.
func (WorkflowOutput) State ¶ added in v6.23.0
func (o WorkflowOutput) State() pulumi.StringOutput
State of the workflow deployment.
func (WorkflowOutput) ToWorkflowOutput ¶
func (o WorkflowOutput) ToWorkflowOutput() WorkflowOutput
func (WorkflowOutput) ToWorkflowOutputWithContext ¶
func (o WorkflowOutput) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
func (WorkflowOutput) UpdateTime ¶ added in v6.23.0
func (o WorkflowOutput) UpdateTime() pulumi.StringOutput
The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
type WorkflowState ¶
type WorkflowState struct { // The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine // fractional digits. CreateTime pulumi.StringPtrInput // Description of the workflow provided by the user. Must be at most 1000 unicode characters long. Description pulumi.StringPtrInput // A set of key/value label pairs to assign to this Workflow. Labels pulumi.StringMapInput // Name of the Workflow. Name pulumi.StringPtrInput // Creates a unique name beginning with the // specified prefix. If this and name are unspecified, a random value is chosen for the name. NamePrefix pulumi.StringPtrInput // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringPtrInput // The region of the workflow. Region pulumi.StringPtrInput // The revision of the workflow. A new one is generated if the service account or source contents is changed. RevisionId pulumi.StringPtrInput // Name of the service account associated with the latest workflow version. This service // account represents the identity of the workflow and determines what permissions the workflow has. // Format: projects/{project}/serviceAccounts/{account}. ServiceAccount pulumi.StringPtrInput // Workflow code to be executed. The size limit is 32KB. SourceContents pulumi.StringPtrInput // State of the workflow deployment. State pulumi.StringPtrInput // The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to // nine fractional digits. UpdateTime pulumi.StringPtrInput }
func (WorkflowState) ElementType ¶
func (WorkflowState) ElementType() reflect.Type