UNPKG

@pulumi/gcp

Version:

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

196 lines • 8.31 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.Entry = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * > **Warning:** `gcp.datacatalog.Entry` is deprecated and will be removed in a future major release. Data Catalog is deprecated and will be discontinued on January 30, 2026. For steps to transition your Data Catalog users, workloads, and content to Dataplex Catalog, see https://cloud.google.com/dataplex/docs/transition-to-dataplex-catalog. * * Entry Metadata. A Data Catalog Entry resource represents another resource in Google Cloud Platform * (such as a BigQuery dataset or a Pub/Sub topic) or outside of Google Cloud Platform. Clients can use * the linkedResource field in the Entry resource to refer to the original resource ID of the source system. * * An Entry resource contains resource details, such as its schema. An Entry can also be used to attach * flexible metadata, such as a Tag. * * To get more information about Entry, see: * * * [API documentation](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries) * * How-to Guides * * [Official Documentation](https://cloud.google.com/data-catalog/docs) * * ## Example Usage * * ### Data Catalog Entry Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const entryGroup = new gcp.datacatalog.EntryGroup("entry_group", {entryGroupId: "my_group"}); * const basicEntry = new gcp.datacatalog.Entry("basic_entry", { * entryGroup: entryGroup.id, * entryId: "my_entry", * userSpecifiedType: "my_custom_type", * userSpecifiedSystem: "SomethingExternal", * }); * ``` * ### Data Catalog Entry Fileset * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const entryGroup = new gcp.datacatalog.EntryGroup("entry_group", {entryGroupId: "my_group"}); * const basicEntry = new gcp.datacatalog.Entry("basic_entry", { * entryGroup: entryGroup.id, * entryId: "my_entry", * type: "FILESET", * gcsFilesetSpec: { * filePatterns: ["gs://fake_bucket/dir/*"], * }, * }); * ``` * ### Data Catalog Entry Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const entryGroup = new gcp.datacatalog.EntryGroup("entry_group", {entryGroupId: "my_group"}); * const basicEntry = new gcp.datacatalog.Entry("basic_entry", { * entryGroup: entryGroup.id, * entryId: "my_entry", * userSpecifiedType: "my_user_specified_type", * userSpecifiedSystem: "Something_custom", * linkedResource: "my/linked/resource", * displayName: "my custom type entry", * description: "a custom type entry for a user specified system", * schema: `{ * "columns": [ * { * "column": "first_name", * "description": "First name", * "mode": "REQUIRED", * "type": "STRING" * }, * { * "column": "last_name", * "description": "Last name", * "mode": "REQUIRED", * "type": "STRING" * }, * { * "column": "address", * "description": "Address", * "mode": "REPEATED", * "subcolumns": [ * { * "column": "city", * "description": "City", * "mode": "NULLABLE", * "type": "STRING" * }, * { * "column": "state", * "description": "State", * "mode": "NULLABLE", * "type": "STRING" * } * ], * "type": "RECORD" * } * ] * } * `, * }); * ``` * * ## Import * * Entry can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, Entry can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:datacatalog/entry:Entry default {{name}} * ``` */ class Entry extends pulumi.CustomResource { /** * Get an existing Entry 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 Entry(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Entry. 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'] === Entry.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["bigqueryDateShardedSpecs"] = state ? state.bigqueryDateShardedSpecs : undefined; resourceInputs["bigqueryTableSpecs"] = state ? state.bigqueryTableSpecs : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["displayName"] = state ? state.displayName : undefined; resourceInputs["entryGroup"] = state ? state.entryGroup : undefined; resourceInputs["entryId"] = state ? state.entryId : undefined; resourceInputs["gcsFilesetSpec"] = state ? state.gcsFilesetSpec : undefined; resourceInputs["integratedSystem"] = state ? state.integratedSystem : undefined; resourceInputs["linkedResource"] = state ? state.linkedResource : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["schema"] = state ? state.schema : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["userSpecifiedSystem"] = state ? state.userSpecifiedSystem : undefined; resourceInputs["userSpecifiedType"] = state ? state.userSpecifiedType : undefined; } else { const args = argsOrState; if ((!args || args.entryGroup === undefined) && !opts.urn) { throw new Error("Missing required property 'entryGroup'"); } if ((!args || args.entryId === undefined) && !opts.urn) { throw new Error("Missing required property 'entryId'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["displayName"] = args ? args.displayName : undefined; resourceInputs["entryGroup"] = args ? args.entryGroup : undefined; resourceInputs["entryId"] = args ? args.entryId : undefined; resourceInputs["gcsFilesetSpec"] = args ? args.gcsFilesetSpec : undefined; resourceInputs["linkedResource"] = args ? args.linkedResource : undefined; resourceInputs["schema"] = args ? args.schema : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["userSpecifiedSystem"] = args ? args.userSpecifiedSystem : undefined; resourceInputs["userSpecifiedType"] = args ? args.userSpecifiedType : undefined; resourceInputs["bigqueryDateShardedSpecs"] = undefined /*out*/; resourceInputs["bigqueryTableSpecs"] = undefined /*out*/; resourceInputs["integratedSystem"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Entry.__pulumiType, name, resourceInputs, opts); } } exports.Entry = Entry; /** @internal */ Entry.__pulumiType = 'gcp:datacatalog/entry:Entry'; //# sourceMappingURL=entry.js.map