Documentation ¶
Index ¶
- type Workflow
- func (*Workflow) ElementType() reflect.Type
- func (i *Workflow) ToWorkflowOutput() WorkflowOutput
- func (i *Workflow) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
- func (i *Workflow) ToWorkflowPtrOutput() WorkflowPtrOutput
- func (i *Workflow) ToWorkflowPtrOutputWithContext(ctx context.Context) WorkflowPtrOutput
- type WorkflowArgs
- type WorkflowArray
- type WorkflowArrayInput
- type WorkflowArrayOutput
- type WorkflowInput
- type WorkflowMap
- type WorkflowMapInput
- type WorkflowMapOutput
- type WorkflowOutput
- func (WorkflowOutput) ElementType() reflect.Type
- func (o WorkflowOutput) ToWorkflowOutput() WorkflowOutput
- func (o WorkflowOutput) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
- func (o WorkflowOutput) ToWorkflowPtrOutput() WorkflowPtrOutput
- func (o WorkflowOutput) ToWorkflowPtrOutputWithContext(ctx context.Context) WorkflowPtrOutput
- type WorkflowPtrInput
- type WorkflowPtrOutput
- 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/v5/go/gcp/serviceAccount" "github.com/pulumi/pulumi-gcp/sdk/v5/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
func (*Workflow) ToWorkflowPtrOutput ¶
func (i *Workflow) ToWorkflowPtrOutput() WorkflowPtrOutput
func (*Workflow) ToWorkflowPtrOutputWithContext ¶
func (i *Workflow) ToWorkflowPtrOutputWithContext(ctx context.Context) WorkflowPtrOutput
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) ElementType ¶
func (WorkflowOutput) ElementType() reflect.Type
func (WorkflowOutput) ToWorkflowOutput ¶
func (o WorkflowOutput) ToWorkflowOutput() WorkflowOutput
func (WorkflowOutput) ToWorkflowOutputWithContext ¶
func (o WorkflowOutput) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
func (WorkflowOutput) ToWorkflowPtrOutput ¶
func (o WorkflowOutput) ToWorkflowPtrOutput() WorkflowPtrOutput
func (WorkflowOutput) ToWorkflowPtrOutputWithContext ¶
func (o WorkflowOutput) ToWorkflowPtrOutputWithContext(ctx context.Context) WorkflowPtrOutput
type WorkflowPtrInput ¶
type WorkflowPtrInput interface { pulumi.Input ToWorkflowPtrOutput() WorkflowPtrOutput ToWorkflowPtrOutputWithContext(ctx context.Context) WorkflowPtrOutput }
type WorkflowPtrOutput ¶
type WorkflowPtrOutput struct {
*pulumi.OutputState
}
func (WorkflowPtrOutput) ElementType ¶
func (WorkflowPtrOutput) ElementType() reflect.Type
func (WorkflowPtrOutput) ToWorkflowPtrOutput ¶
func (o WorkflowPtrOutput) ToWorkflowPtrOutput() WorkflowPtrOutput
func (WorkflowPtrOutput) ToWorkflowPtrOutputWithContext ¶
func (o WorkflowPtrOutput) ToWorkflowPtrOutputWithContext(ctx context.Context) WorkflowPtrOutput
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