@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
498 lines • 20.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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}}
* ```
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: PipelineJobState, opts?: pulumi.CustomResourceOptions): 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: any): obj is PipelineJob;
/**
* Specifies the backfill configuration.
* Structure is documented below.
*/
readonly backfillPipelineJob: pulumi.Output<outputs.healthcare.PipelineJobBackfillPipelineJob | undefined>;
/**
* Healthcare Dataset under which the Pipeline Job is to run
*/
readonly dataset: pulumi.Output<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* If true, disables writing lineage for the pipeline.
*/
readonly disableLineage: pulumi.Output<boolean | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* User-supplied key-value pairs used to organize Pipeline Jobs.
* Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of
* maximum 128 bytes, and must conform to the following PCRE regular expression:
* [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
* Label values are optional, must be between 1 and 63 characters long, have a
* UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE
* regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
* No more than 64 labels can be associated with a given pipeline.
* An object containing a list of "key": value pairs.
* Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Location where the Pipeline Job is to run
*/
readonly location: pulumi.Output<string>;
/**
* Specifies mapping configuration.
* Structure is documented below.
*/
readonly mappingPipelineJob: pulumi.Output<outputs.healthcare.PipelineJobMappingPipelineJob | undefined>;
/**
* Specifies the name of the pipeline job. This field is user-assigned.
*/
readonly name: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Specifies reconciliation configuration.
* Structure is documented below.
*/
readonly reconciliationPipelineJob: pulumi.Output<outputs.healthcare.PipelineJobReconciliationPipelineJob | undefined>;
/**
* The fully qualified name of this dataset
*/
readonly selfLink: pulumi.Output<string>;
/**
* Create a PipelineJob resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: PipelineJobArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PipelineJob resources.
*/
export interface PipelineJobState {
/**
* Specifies the backfill configuration.
* Structure is documented below.
*/
backfillPipelineJob?: pulumi.Input<inputs.healthcare.PipelineJobBackfillPipelineJob | undefined>;
/**
* Healthcare Dataset under which the Pipeline Job is to run
*/
dataset?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* If true, disables writing lineage for the pipeline.
*/
disableLineage?: pulumi.Input<boolean | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* User-supplied key-value pairs used to organize Pipeline Jobs.
* Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of
* maximum 128 bytes, and must conform to the following PCRE regular expression:
* [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
* Label values are optional, must be between 1 and 63 characters long, have a
* UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE
* regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
* No more than 64 labels can be associated with a given pipeline.
* An object containing a list of "key": value pairs.
* Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Location where the Pipeline Job is to run
*/
location?: pulumi.Input<string | undefined>;
/**
* Specifies mapping configuration.
* Structure is documented below.
*/
mappingPipelineJob?: pulumi.Input<inputs.healthcare.PipelineJobMappingPipelineJob | undefined>;
/**
* Specifies the name of the pipeline job. This field is user-assigned.
*/
name?: pulumi.Input<string | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Specifies reconciliation configuration.
* Structure is documented below.
*/
reconciliationPipelineJob?: pulumi.Input<inputs.healthcare.PipelineJobReconciliationPipelineJob | undefined>;
/**
* The fully qualified name of this dataset
*/
selfLink?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a PipelineJob resource.
*/
export interface PipelineJobArgs {
/**
* Specifies the backfill configuration.
* Structure is documented below.
*/
backfillPipelineJob?: pulumi.Input<inputs.healthcare.PipelineJobBackfillPipelineJob | undefined>;
/**
* Healthcare Dataset under which the Pipeline Job is to run
*/
dataset: pulumi.Input<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* If true, disables writing lineage for the pipeline.
*/
disableLineage?: pulumi.Input<boolean | undefined>;
/**
* User-supplied key-value pairs used to organize Pipeline Jobs.
* Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of
* maximum 128 bytes, and must conform to the following PCRE regular expression:
* [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
* Label values are optional, must be between 1 and 63 characters long, have a
* UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE
* regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
* No more than 64 labels can be associated with a given pipeline.
* An object containing a list of "key": value pairs.
* Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Location where the Pipeline Job is to run
*/
location: pulumi.Input<string>;
/**
* Specifies mapping configuration.
* Structure is documented below.
*/
mappingPipelineJob?: pulumi.Input<inputs.healthcare.PipelineJobMappingPipelineJob | undefined>;
/**
* Specifies the name of the pipeline job. This field is user-assigned.
*/
name?: pulumi.Input<string | undefined>;
/**
* Specifies reconciliation configuration.
* Structure is documented below.
*/
reconciliationPipelineJob?: pulumi.Input<inputs.healthcare.PipelineJobReconciliationPipelineJob | undefined>;
}
//# sourceMappingURL=pipelineJob.d.ts.map