WorkflowArgs

data class WorkflowArgs(val description: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val name: Output<String>? = null, val namePrefix: Output<String>? = null, val project: Output<String>? = null, val region: Output<String>? = null, val serviceAccount: Output<String>? = null, val sourceContents: Output<String>? = null) : ConvertibleToJava<WorkflowArgs>

Workflow program to be executed by Workflows. To get more information about Workflow, see:

Example Usage

Workflow Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceAccount.Account;
import com.pulumi.gcp.serviceAccount.AccountArgs;
import com.pulumi.gcp.workflows.Workflow;
import com.pulumi.gcp.workflows.WorkflowArgs;
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 testAccount = new Account("testAccount", AccountArgs.builder()
.accountId("my-account")
.displayName("Test Service Account")
.build());
var example = new Workflow("example", WorkflowArgs.builder()
.region("us-central1")
.description("Magic")
.serviceAccount(testAccount.id())
.sourceContents("""
# This is a sample workflow, feel free to replace it with your source code
#
# This workflow does the following:
# - reads current time and date information from an external API and stores
# the response in CurrentDateTime variable
# - retrieves a list of Wikipedia articles related to the day of the week
# from CurrentDateTime
# - returns the list of articles as an output of the workflow
# FYI, In terraform you need to escape the $$ or it will cause errors.
- getCurrentTime:
call: http.get
args:
url: https://us-central1-workflowsample.cloudfunctions.net/datetime
result: CurrentDateTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: %s
result: WikiResult
- returnOutput:
return: %s
", CurrentDateTime.body().dayOfTheWeek(),WikiResult.body()[1]))
.build());
}
}

Import

This resource does not support import.

Constructors

Link copied to clipboard
fun WorkflowArgs(description: Output<String>? = null, labels: Output<Map<String, String>>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null, project: Output<String>? = null, region: Output<String>? = null, serviceAccount: Output<String>? = null, sourceContents: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): WorkflowArgs

Properties

Link copied to clipboard
val description: Output<String>? = null

Description of the workflow provided by the user. Must be at most 1000 unicode characters long.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

A set of key/value label pairs to assign to this Workflow.

Link copied to clipboard
val name: Output<String>? = null

Name of the Workflow.

Link copied to clipboard
val namePrefix: Output<String>? = null

Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val region: Output<String>? = null

The region of the workflow.

Link copied to clipboard
val serviceAccount: Output<String>? = null

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

Link copied to clipboard
val sourceContents: Output<String>? = null

Workflow code to be executed. The size limit is 32KB.