UNPKG

@pulumi/gcp

Version:

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

142 lines 5.44 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.Dataset = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A Healthcare `Dataset` is a toplevel logical grouping of `dicomStores`, `fhirStores` and `hl7V2Stores`. * * To get more information about Dataset, see: * * * [API documentation](https://cloud.google.com/healthcare/docs/reference/rest/v1/projects.locations.datasets) * * How-to Guides * * [Creating a dataset](https://cloud.google.com/healthcare/docs/how-tos/datasets) * * ## Example Usage * * ### Healthcare Dataset Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.healthcare.Dataset("default", { * name: "example-dataset", * location: "us-central1", * timeZone: "UTC", * }); * ``` * ### Healthcare Dataset Cmek * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const keyRing = new gcp.kms.KeyRing("key_ring", { * name: "example-keyring", * location: "us-central1", * }); * const cryptoKey = new gcp.kms.CryptoKey("crypto_key", { * name: "example-key", * keyRing: keyRing.id, * purpose: "ENCRYPT_DECRYPT", * }); * const healthcareCmekKeyuser = new gcp.kms.CryptoKeyIAMBinding("healthcare_cmek_keyuser", { * cryptoKeyId: cryptoKey.id, * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * members: [project.then(project => `serviceAccount:service-${project.number}@gcp-sa-healthcare.iam.gserviceaccount.com`)], * }); * const _default = new gcp.healthcare.Dataset("default", { * name: "example-dataset", * location: "us-central1", * timeZone: "UTC", * encryptionSpec: { * kmsKeyName: cryptoKey.id, * }, * }, { * dependsOn: [healthcareCmekKeyuser], * }); * ``` * * ## Import * * Dataset can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/datasets/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Dataset can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:healthcare/dataset:Dataset default projects/{{project}}/locations/{{location}}/datasets/{{name}} * ``` * * ```sh * $ pulumi import gcp:healthcare/dataset:Dataset default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:healthcare/dataset:Dataset default {{location}}/{{name}} * ``` */ class Dataset extends pulumi.CustomResource { /** * Get an existing Dataset 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 Dataset(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Dataset. 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'] === Dataset.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["encryptionSpec"] = state ? state.encryptionSpec : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["selfLink"] = state ? state.selfLink : undefined; resourceInputs["timeZone"] = state ? state.timeZone : undefined; } else { const args = argsOrState; if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["encryptionSpec"] = args ? args.encryptionSpec : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["timeZone"] = args ? args.timeZone : undefined; resourceInputs["selfLink"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Dataset.__pulumiType, name, resourceInputs, opts); } } exports.Dataset = Dataset; /** @internal */ Dataset.__pulumiType = 'gcp:healthcare/dataset:Dataset'; //# sourceMappingURL=dataset.js.map