@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
140 lines • 5.2 kB
JavaScript
;
// *** 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.PipelineDefinition = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a DataPipeline Pipeline Definition resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const _default = new aws.datapipeline.Pipeline("default", {name: "tf-pipeline-default"});
* const example = new aws.datapipeline.PipelineDefinition("example", {
* pipelineId: _default.id,
* pipelineObjects: [
* {
* id: "Default",
* name: "Default",
* fields: [{
* key: "workerGroup",
* stringValue: "workerGroup",
* }],
* },
* {
* id: "Schedule",
* name: "Schedule",
* fields: [
* {
* key: "startDateTime",
* stringValue: "2012-12-12T00:00:00",
* },
* {
* key: "type",
* stringValue: "Schedule",
* },
* {
* key: "period",
* stringValue: "1 hour",
* },
* {
* key: "endDateTime",
* stringValue: "2012-12-21T18:00:00",
* },
* ],
* },
* {
* id: "SayHello",
* name: "SayHello",
* fields: [
* {
* key: "type",
* stringValue: "ShellCommandActivity",
* },
* {
* key: "command",
* stringValue: "echo hello",
* },
* {
* key: "parent",
* stringValue: "Default",
* },
* {
* key: "schedule",
* stringValue: "Schedule",
* },
* ],
* },
* ],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_datapipeline_pipeline_definition` using the id. For example:
*
* ```sh
* $ pulumi import aws:datapipeline/pipelineDefinition:PipelineDefinition example df-1234567890
* ```
*/
class PipelineDefinition extends pulumi.CustomResource {
/**
* Get an existing PipelineDefinition 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 PipelineDefinition(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of PipelineDefinition. 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'] === PipelineDefinition.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["parameterObjects"] = state?.parameterObjects;
resourceInputs["parameterValues"] = state?.parameterValues;
resourceInputs["pipelineId"] = state?.pipelineId;
resourceInputs["pipelineObjects"] = state?.pipelineObjects;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.pipelineId === undefined && !opts.urn) {
throw new Error("Missing required property 'pipelineId'");
}
if (args?.pipelineObjects === undefined && !opts.urn) {
throw new Error("Missing required property 'pipelineObjects'");
}
resourceInputs["parameterObjects"] = args?.parameterObjects;
resourceInputs["parameterValues"] = args?.parameterValues;
resourceInputs["pipelineId"] = args?.pipelineId;
resourceInputs["pipelineObjects"] = args?.pipelineObjects;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PipelineDefinition.__pulumiType, name, resourceInputs, opts);
}
}
exports.PipelineDefinition = PipelineDefinition;
/** @internal */
PipelineDefinition.__pulumiType = 'aws:datapipeline/pipelineDefinition:PipelineDefinition';
//# sourceMappingURL=pipelineDefinition.js.map