@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
353 lines • 14.4 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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PipelineJob = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* PipelineJobs are Long Running Operations on Healthcare API to Map or Reconcile
* incoming data into FHIR format
*
* To get more information about PipelineJob, see:
*
* * [API documentation](https://cloud.google.com/healthcare-api/healthcare-data-engine/docs/reference/rest/v1/projects.locations.datasets.pipelineJobs)
* * How-to Guides
* * [Creating a PipelineJob](https://cloud.google.com/healthcare-api/private/healthcare-data-engine/docs/reference/rest/v1/projects.locations.datasets.pipelineJobs#PipelineJob)
*
* ## Example Usage
*
* ### Healthcare Pipeline Job Reconciliation
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const dataset = new gcp.healthcare.Dataset("dataset", {
* name: "example_dataset",
* location: "us-central1",
* });
* const fhirstore = new gcp.healthcare.FhirStore("fhirstore", {
* name: "fhir_store",
* dataset: dataset.id,
* version: "R4",
* enableUpdateCreate: true,
* disableReferentialIntegrity: true,
* });
* const bucket = new gcp.storage.Bucket("bucket", {
* name: "example_bucket_name",
* location: "us-central1",
* uniformBucketLevelAccess: true,
* });
* const mergeFile = new gcp.storage.BucketObject("merge_file", {
* name: "merge.wstl",
* content: " ",
* bucket: bucket.name,
* });
* const example_pipeline = new gcp.healthcare.PipelineJob("example-pipeline", {
* name: "example_pipeline_job",
* location: "us-central1",
* dataset: dataset.id,
* disableLineage: true,
* reconciliationPipelineJob: {
* mergeConfig: {
* description: "sample description for reconciliation rules",
* whistleConfigSource: {
* uri: pulumi.interpolate`gs://${bucket.name}/${mergeFile.name}`,
* importUriPrefix: pulumi.interpolate`gs://${bucket.name}`,
* },
* },
* matchingUriPrefix: pulumi.interpolate`gs://${bucket.name}`,
* fhirStoreDestination: pulumi.interpolate`${dataset.id}/fhirStores/${fhirstore.name}`,
* },
* });
* const hsa = new gcp.storage.BucketIAMMember("hsa", {
* bucket: bucket.name,
* role: "roles/storage.objectUser",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-healthcare.iam.gserviceaccount.com`),
* });
* ```
* ### Healthcare Pipeline Job Backfill
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const dataset = new gcp.healthcare.Dataset("dataset", {
* name: "example_dataset",
* location: "us-central1",
* });
* const example_pipeline = new gcp.healthcare.PipelineJob("example-pipeline", {
* name: "example_backfill_pipeline",
* location: "us-central1",
* dataset: dataset.id,
* backfillPipelineJob: {
* mappingPipelineJob: pulumi.interpolate`${dataset.id}/pipelineJobs/example_mapping_pipeline_job`,
* },
* });
* ```
* ### Healthcare Pipeline Job Whistle Mapping
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const dataset = new gcp.healthcare.Dataset("dataset", {
* name: "example_dataset",
* location: "us-central1",
* });
* const sourceFhirstore = new gcp.healthcare.FhirStore("source_fhirstore", {
* name: "source_fhir_store",
* dataset: dataset.id,
* version: "R4",
* enableUpdateCreate: true,
* disableReferentialIntegrity: true,
* });
* const destFhirstore = new gcp.healthcare.FhirStore("dest_fhirstore", {
* name: "dest_fhir_store",
* dataset: dataset.id,
* version: "R4",
* enableUpdateCreate: true,
* disableReferentialIntegrity: true,
* });
* const bucket = new gcp.storage.Bucket("bucket", {
* name: "example_bucket_name",
* location: "us-central1",
* uniformBucketLevelAccess: true,
* });
* const mappingFile = new gcp.storage.BucketObject("mapping_file", {
* name: "mapping.wstl",
* content: " ",
* bucket: bucket.name,
* });
* const example_mapping_pipeline = new gcp.healthcare.PipelineJob("example-mapping-pipeline", {
* name: "example_mapping_pipeline_job",
* location: "us-central1",
* dataset: dataset.id,
* disableLineage: true,
* labels: {
* example_label_key: "example_label_value",
* },
* mappingPipelineJob: {
* mappingConfig: {
* whistleConfigSource: {
* uri: pulumi.interpolate`gs://${bucket.name}/${mappingFile.name}`,
* importUriPrefix: pulumi.interpolate`gs://${bucket.name}`,
* },
* description: "example description for mapping configuration",
* },
* fhirStreamingSource: {
* fhirStore: pulumi.interpolate`${dataset.id}/fhirStores/${sourceFhirstore.name}`,
* description: "example description for streaming fhirstore",
* },
* fhirStoreDestination: pulumi.interpolate`${dataset.id}/fhirStores/${destFhirstore.name}`,
* },
* });
* const hsa = new gcp.storage.BucketIAMMember("hsa", {
* bucket: bucket.name,
* role: "roles/storage.objectUser",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-healthcare.iam.gserviceaccount.com`),
* });
* ```
* ### Healthcare Pipeline Job Mapping Recon Dest
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const dataset = new gcp.healthcare.Dataset("dataset", {
* name: "example_dataset",
* location: "us-central1",
* });
* const destFhirstore = new gcp.healthcare.FhirStore("dest_fhirstore", {
* name: "dest_fhir_store",
* dataset: dataset.id,
* version: "R4",
* enableUpdateCreate: true,
* disableReferentialIntegrity: true,
* });
* const bucket = new gcp.storage.Bucket("bucket", {
* name: "example_bucket_name",
* location: "us-central1",
* uniformBucketLevelAccess: true,
* });
* const mergeFile = new gcp.storage.BucketObject("merge_file", {
* name: "merge.wstl",
* content: " ",
* bucket: bucket.name,
* });
* const recon = new gcp.healthcare.PipelineJob("recon", {
* name: "example_recon_pipeline_job",
* location: "us-central1",
* dataset: dataset.id,
* disableLineage: true,
* reconciliationPipelineJob: {
* mergeConfig: {
* description: "sample description for reconciliation rules",
* whistleConfigSource: {
* uri: pulumi.interpolate`gs://${bucket.name}/${mergeFile.name}`,
* importUriPrefix: pulumi.interpolate`gs://${bucket.name}`,
* },
* },
* matchingUriPrefix: pulumi.interpolate`gs://${bucket.name}`,
* fhirStoreDestination: pulumi.interpolate`${dataset.id}/fhirStores/${destFhirstore.name}`,
* },
* });
* const sourceFhirstore = new gcp.healthcare.FhirStore("source_fhirstore", {
* name: "source_fhir_store",
* dataset: dataset.id,
* version: "R4",
* enableUpdateCreate: true,
* disableReferentialIntegrity: true,
* });
* const mappingFile = new gcp.storage.BucketObject("mapping_file", {
* name: "mapping.wstl",
* content: " ",
* bucket: bucket.name,
* });
* const example_mapping_pipeline = new gcp.healthcare.PipelineJob("example-mapping-pipeline", {
* name: "example_mapping_pipeline_job",
* location: "us-central1",
* dataset: dataset.id,
* disableLineage: true,
* labels: {
* example_label_key: "example_label_value",
* },
* mappingPipelineJob: {
* mappingConfig: {
* whistleConfigSource: {
* uri: pulumi.interpolate`gs://${bucket.name}/${mappingFile.name}`,
* importUriPrefix: pulumi.interpolate`gs://${bucket.name}`,
* },
* description: "example description for mapping configuration",
* },
* fhirStreamingSource: {
* fhirStore: pulumi.interpolate`${dataset.id}/fhirStores/${sourceFhirstore.name}`,
* description: "example description for streaming fhirstore",
* },
* reconciliationDestination: true,
* },
* }, {
* dependsOn: [recon],
* });
* const hsa = new gcp.storage.BucketIAMMember("hsa", {
* bucket: bucket.name,
* role: "roles/storage.objectUser",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-healthcare.iam.gserviceaccount.com`),
* });
* ```
*
* ## Import
*
* PipelineJob can be imported using any of these accepted formats:
*
* * `{{dataset}}/pipelineJobs/{{name}}`
* * `{{dataset}}/pipelineJobs?pipelineJobId={{name}}`
* * `{{name}}`
*
* When using the `pulumi import` command, PipelineJob can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:healthcare/pipelineJob:PipelineJob default {{dataset}}/pipelineJobs/{{name}}
* $ pulumi import gcp:healthcare/pipelineJob:PipelineJob default {{dataset}}/pipelineJobs?pipelineJobId={{name}}
* $ pulumi import gcp:healthcare/pipelineJob:PipelineJob default {{name}}
* ```
*/
class PipelineJob extends pulumi.CustomResource {
/**
* Get an existing PipelineJob 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 PipelineJob(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:healthcare/pipelineJob:PipelineJob';
/**
* Returns true if the given object is an instance of PipelineJob. 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'] === PipelineJob.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["backfillPipelineJob"] = state?.backfillPipelineJob;
resourceInputs["dataset"] = state?.dataset;
resourceInputs["deletionPolicy"] = state?.deletionPolicy;
resourceInputs["disableLineage"] = state?.disableLineage;
resourceInputs["effectiveLabels"] = state?.effectiveLabels;
resourceInputs["labels"] = state?.labels;
resourceInputs["location"] = state?.location;
resourceInputs["mappingPipelineJob"] = state?.mappingPipelineJob;
resourceInputs["name"] = state?.name;
resourceInputs["pulumiLabels"] = state?.pulumiLabels;
resourceInputs["reconciliationPipelineJob"] = state?.reconciliationPipelineJob;
resourceInputs["selfLink"] = state?.selfLink;
}
else {
const args = argsOrState;
if (args?.dataset === undefined && !opts.urn) {
throw new Error("Missing required property 'dataset'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["backfillPipelineJob"] = args?.backfillPipelineJob;
resourceInputs["dataset"] = args?.dataset;
resourceInputs["deletionPolicy"] = args?.deletionPolicy;
resourceInputs["disableLineage"] = args?.disableLineage;
resourceInputs["labels"] = args?.labels;
resourceInputs["location"] = args?.location;
resourceInputs["mappingPipelineJob"] = args?.mappingPipelineJob;
resourceInputs["name"] = args?.name;
resourceInputs["reconciliationPipelineJob"] = args?.reconciliationPipelineJob;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["selfLink"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(PipelineJob.__pulumiType, name, resourceInputs, opts);
}
}
exports.PipelineJob = PipelineJob;
//# sourceMappingURL=pipelineJob.js.map