@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
112 lines • 4.77 kB
JavaScript
;
// *** 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.Workspace = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* A Data Mapper workspace is used to configure Data Mapper access, permissions and data sources for mapping clinical patient data to the FHIR standard.
*
* To get more information about Workspace, see:
*
* * [API documentation](https://cloud.google.com/healthcare-api/healthcare-data-engine/docs/reference/rest/v1/projects.locations.datasets.dataMapperWorkspaces)
* * How-to Guides
* * [Create and manage Data Mapper workspaces ](https://cloud.google.com/healthcare-api/healthcare-data-engine/docs/manage-workspaces)
*
* ## Example Usage
*
* ### Healthcare Workspace Basic
*
* ```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 _default = new gcp.healthcare.Workspace("default", {
* name: "example-dm-workspace",
* dataset: dataset.id,
* settings: {
* dataProjectIds: ["example-data-source-project-id"],
* },
* labels: {
* label1: "labelvalue1",
* },
* });
* ```
*
* ## Import
*
* Workspace can be imported using any of these accepted formats:
*
* * `{{dataset}}/dataMapperWorkspaces/{{name}}`
*
* When using the `pulumi import` command, Workspace can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:healthcare/workspace:Workspace default {{dataset}}/dataMapperWorkspaces/{{name}}
* ```
*/
class Workspace extends pulumi.CustomResource {
/**
* Get an existing Workspace 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 Workspace(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Workspace. 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'] === Workspace.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["dataset"] = state ? state.dataset : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["settings"] = state ? state.settings : undefined;
}
else {
const args = argsOrState;
if ((!args || args.dataset === undefined) && !opts.urn) {
throw new Error("Missing required property 'dataset'");
}
if ((!args || args.settings === undefined) && !opts.urn) {
throw new Error("Missing required property 'settings'");
}
resourceInputs["dataset"] = args ? args.dataset : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["settings"] = args ? args.settings : undefined;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Workspace.__pulumiType, name, resourceInputs, opts);
}
}
exports.Workspace = Workspace;
/** @internal */
Workspace.__pulumiType = 'gcp:healthcare/workspace:Workspace';
//# sourceMappingURL=workspace.js.map