UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

107 lines 4.03 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Workflow = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Glue Workflow resource. * The workflow graph (DAG) can be build using the `aws.glue.Trigger` resource. * See the example below for creating a graph with four nodes (two triggers and two jobs). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.glue.Workflow("example", {name: "example"}); * const example_start = new aws.glue.Trigger("example-start", { * name: "trigger-start", * type: "ON_DEMAND", * workflowName: example.name, * actions: [{ * jobName: "example-job", * }], * }); * const example_inner = new aws.glue.Trigger("example-inner", { * name: "trigger-inner", * type: "CONDITIONAL", * workflowName: example.name, * predicate: { * conditions: [{ * jobName: "example-job", * state: "SUCCEEDED", * }], * }, * actions: [{ * jobName: "another-example-job", * }], * }); * ``` * * ## Import * * Using `pulumi import`, import Glue Workflows using `name`. For example: * * ```sh * $ pulumi import aws:glue/workflow:Workflow MyWorkflow MyWorkflow * ``` */ class Workflow extends pulumi.CustomResource { /** * Get an existing Workflow resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Workflow(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Workflow. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Workflow.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["defaultRunProperties"] = state?.defaultRunProperties; resourceInputs["description"] = state?.description; resourceInputs["maxConcurrentRuns"] = state?.maxConcurrentRuns; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; resourceInputs["defaultRunProperties"] = args?.defaultRunProperties; resourceInputs["description"] = args?.description; resourceInputs["maxConcurrentRuns"] = args?.maxConcurrentRuns; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Workflow.__pulumiType, name, resourceInputs, opts); } } exports.Workflow = Workflow; /** @internal */ Workflow.__pulumiType = 'aws:glue/workflow:Workflow'; //# sourceMappingURL=workflow.js.map