UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

336 lines • 13.7 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.PipelineJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = 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`, * }, * }); * ``` * ### 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}} * ``` * * ```sh * $ pulumi import gcp:healthcare/pipelineJob:PipelineJob default {{dataset}}/pipelineJobs?pipelineJobId={{name}} * ``` * * ```sh * $ 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, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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 ? state.backfillPipelineJob : undefined; resourceInputs["dataset"] = state ? state.dataset : undefined; resourceInputs["disableLineage"] = state ? state.disableLineage : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["mappingPipelineJob"] = state ? state.mappingPipelineJob : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; resourceInputs["reconciliationPipelineJob"] = state ? state.reconciliationPipelineJob : undefined; resourceInputs["selfLink"] = state ? state.selfLink : undefined; } else { const args = argsOrState; if ((!args || args.dataset === undefined) && !opts.urn) { throw new Error("Missing required property 'dataset'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["backfillPipelineJob"] = args ? args.backfillPipelineJob : undefined; resourceInputs["dataset"] = args ? args.dataset : undefined; resourceInputs["disableLineage"] = args ? args.disableLineage : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["mappingPipelineJob"] = args ? args.mappingPipelineJob : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["reconciliationPipelineJob"] = args ? args.reconciliationPipelineJob : undefined; 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; /** @internal */ PipelineJob.__pulumiType = 'gcp:healthcare/pipelineJob:PipelineJob'; //# sourceMappingURL=pipelineJob.js.map