import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * An entry represents a data asset for which you capture metadata, such as a BigQuery table. * The primary constituents of an entry are aspects, which provide thematically coherent information. * Examples include a table's schema, sensitive data protection profile, data quality information, or a simple tag. * * **Important Considerations:** * * * There is a limit of 99 aspects per entry. * * The entry resource has to use project numbers and not project IDs. Therefore, if * a dependency was already provisioned using project ID, it needs to be referenced explicitly as a resource name * containing the project number. * * To get more information about Entry, see: * * * [API documentation](https://cloud.google.com/dataplex/docs/reference/rest/v1/projects.locations.entryGroups.entries) * * How-to Guides * * [Manage entries and ingest custom sources](https://cloud.google.com/dataplex/docs/ingest-custom-sources) * * ## Example Usage * * ### Dataplex Entry Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const entry_group_basic = new gcp.dataplex.EntryGroup("entry-group-basic", { * entryGroupId: "entry-group-basic", * project: "1111111111111", * location: "us-central1", * }); * const entry_type_basic = new gcp.dataplex.EntryType("entry-type-basic", { * entryTypeId: "entry-type-basic", * project: "1111111111111", * location: "us-central1", * }); * const testBasic = new gcp.dataplex.Entry("test_basic", { * entryGroupId: entry_group_basic.entryGroupId, * project: "1111111111111", * location: "us-central1", * entryId: "entry-basic", * entryType: entry_type_basic.name, * }); * ``` * ### Dataplex Entry Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const aspect_type_full_one = new gcp.dataplex.AspectType("aspect-type-full-one", { * aspectTypeId: "aspect-type-full-one", * location: "us-central1", * project: "1111111111111", * metadataTemplate: `{ * \\"name\\": \\"tf-test-template\\", * \\"type\\": \\"record\\", * \\"recordFields\\": [ * { * \\"name\\": \\"type\\", * \\"type\\": \\"enum\\", * \\"annotations\\": { * \\"displayName\\": \\"Type\\", * \\"description\\": \\"Specifies the type of view represented by the entry.\\" * }, * \\"index\\": 1, * \\"constraints\\": { * \\"required\\": true * }, * \\"enumValues\\": [ * { * \\"name\\": \\"VIEW\\", * \\"index\\": 1 * } * ] * } * ] * } * `, * }); * const aspect_type_full_two = new gcp.dataplex.AspectType("aspect-type-full-two", { * aspectTypeId: "aspect-type-full-two", * location: "us-central1", * project: "1111111111111", * metadataTemplate: `{ * \\"name\\": \\"tf-test-template\\", * \\"type\\": \\"record\\", * \\"recordFields\\": [ * { * \\"name\\": \\"story\\", * \\"type\\": \\"enum\\", * \\"annotations\\": { * \\"displayName\\": \\"Story\\", * \\"description\\": \\"Specifies the story of an entry.\\" * }, * \\"index\\": 1, * \\"constraints\\": { * \\"required\\": true * }, * \\"enumValues\\": [ * { * \\"name\\": \\"SEQUENCE\\", * \\"index\\": 1 * } * ] * } * ] * } * `, * }); * const entry_group_full = new gcp.dataplex.EntryGroup("entry-group-full", { * entryGroupId: "entry-group-full", * project: "1111111111111", * location: "us-central1", * }); * const entry_type_full = new gcp.dataplex.EntryType("entry-type-full", { * entryTypeId: "entry-type-full", * project: "1111111111111", * location: "us-central1", * requiredAspects: [{ * type: aspect_type_full_one.name, * }], * }); * const testEntryFull = new gcp.dataplex.Entry("test_entry_full", { * entryGroupId: entry_group_full.entryGroupId, * project: "1111111111111", * location: "us-central1", * entryId: "entry-full/has/slashes", * entryType: entry_type_full.name, * fullyQualifiedName: "bigquery:1111111111111.test-dataset", * parentEntry: "projects/1111111111111/locations/us-central1/entryGroups/entry-group-full/entries/some-other-entry", * entrySource: { * resource: "bigquery:1111111111111.test-dataset", * system: "System III", * platform: "BigQuery", * displayName: "Human readable name", * description: "Description from source system", * labels: { * "some-label": "some-value", * }, * ancestors: [ * { * name: "ancestor-one", * type: "type-one", * }, * { * name: "ancestor-two", * type: "type-two", * }, * ], * createTime: "2023-08-03T19:19:00.094Z", * updateTime: "2023-08-03T20:19:00.094Z", * }, * aspects: [ * { * aspectKey: "1111111111111.us-central1.aspect-type-full-one", * aspect: { * data: " {\\\"type\\\": \\\"VIEW\\\" }\n", * }, * }, * { * aspectKey: "1111111111111.us-central1.aspect-type-full-two", * aspect: { * data: " {\\\"story\\\": \\\"SEQUENCE\\\" }\n", * }, * }, * ], * }, { * dependsOn: [ * aspect_type_full_two, * aspect_type_full_one, * ], * }); * ``` * ### Dataplex Entry Bigquery Table * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const aspect_type_full_one = new gcp.dataplex.AspectType("aspect-type-full-one", { * aspectTypeId: "aspect-type-one", * location: "us-central1", * project: "1111111111111", * metadataTemplate: `{ * \\"name\\": \\"tf-test-template\\", * \\"type\\": \\"record\\", * \\"recordFields\\": [ * { * \\"name\\": \\"type\\", * \\"type\\": \\"enum\\", * \\"annotations\\": { * \\"displayName\\": \\"Type\\", * \\"description\\": \\"Specifies the type of view represented by the entry.\\" * }, * \\"index\\": 1, * \\"constraints\\": { * \\"required\\": true * }, * \\"enumValues\\": [ * { * \\"name\\": \\"VIEW\\", * \\"index\\": 1 * } * ] * } * ] * } * `, * }); * const aspect_type_full_two = new gcp.dataplex.AspectType("aspect-type-full-two", { * aspectTypeId: "aspect-type-two", * location: "us-central1", * project: "1111111111111", * metadataTemplate: `{ * \\"name\\": \\"tf-test-template\\", * \\"type\\": \\"record\\", * \\"recordFields\\": [ * { * \\"name\\": \\"story\\", * \\"type\\": \\"enum\\", * \\"annotations\\": { * \\"displayName\\": \\"Story\\", * \\"description\\": \\"Specifies the story of an entry.\\" * }, * \\"index\\": 1, * \\"constraints\\": { * \\"required\\": true * }, * \\"enumValues\\": [ * { * \\"name\\": \\"SEQUENCE\\", * \\"index\\": 1 * } * ] * } * ] * } * `, * }); * const example_dataset = new gcp.bigquery.Dataset("example-dataset", { * datasetId: "dataset_basic", * friendlyName: "Example Dataset", * location: "us-central1", * deleteContentsOnDestroy: true, * }); * const example_table = new gcp.bigquery.Table("example-table", { * datasetId: example_dataset.datasetId, * tableId: "table-basic", * deletionProtection: false, * schema: JSON.stringify([ * { * name: "event_time", * type: "TIMESTAMP", * mode: "REQUIRED", * }, * { * name: "user_id", * type: "STRING", * mode: "NULLABLE", * }, * { * name: "event_type", * type: "STRING", * mode: "NULLABLE", * }, * ]), * }); * const tfTestTable = new gcp.dataplex.Entry("tf_test_table", { * entryGroupId: "@bigquery", * project: "1111111111111", * location: "us-central1", * entryId: pulumi.interpolate`bigquery.googleapis.com/projects/my-project-name/datasets/${example_dataset.datasetId}/tables/${example_table.tableId}`, * entryType: "projects/655216118709/locations/global/entryTypes/bigquery-table", * fullyQualifiedName: pulumi.interpolate`bigquery:my-project-name.${example_dataset.datasetId}.${example_table.tableId}`, * parentEntry: pulumi.interpolate`projects/1111111111111/locations/us-central1/entryGroups/@bigquery/entries/bigquery.googleapis.com/projects/my-project-name/datasets/${example_dataset.datasetId}`, * aspects: [ * { * aspectKey: "1111111111111.us-central1.aspect-type-one", * aspect: { * data: " {\\\"type\\\": \\\"VIEW\\\" }\n", * }, * }, * { * aspectKey: "1111111111111.us-central1.aspect-type-two@Schema.event_type", * aspect: { * data: " {\\\"story\\\": \\\"SEQUENCE\\\" }\n", * }, * }, * ], * }, { * dependsOn: [ * aspect_type_full_two, * aspect_type_full_one, * ], * }); * ``` * ### Dataplex Entry Glossary Term * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const example_glossary = new gcp.dataplex.Glossary("example-glossary", { * glossaryId: "glossary-basic", * location: "us-central1", * }); * const example_glossary_term = new gcp.dataplex.GlossaryTerm("example-glossary-term", { * parent: pulumi.interpolate`projects/my-project-name/locations/us-central1/glossaries/${example_glossary.glossaryId}`, * glossaryId: example_glossary.glossaryId, * location: "us-central1", * termId: "glossary-term", * }); * const tfTestGlossaryTerm = new gcp.dataplex.Entry("tf_test_glossary_term", { * entryGroupId: "@dataplex", * project: "1111111111111", * location: "us-central1", * entryId: pulumi.all([example_glossary.glossaryId, example_glossary_term.termId]).apply(([glossaryId, termId]) => `projects/1111111111111/locations/us-central1/glossaries/${glossaryId}/terms/${termId}`), * entryType: "projects/655216118709/locations/global/entryTypes/glossary-term", * parentEntry: pulumi.interpolate`projects/1111111111111/locations/us-central1/entryGroups/@dataplex/entries/projects/1111111111111/locations/us-central1/glossaries/${example_glossary.glossaryId}`, * aspects: [{ * aspectKey: "655216118709.global.overview", * aspect: { * data: " {\\\"content\\\": \\\"Term Content\\\" }\n", * }, * }], * }); * ``` * * ## Import * * Entry can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/entryGroups/{{entry_group_id}}/entries/{{entry_id}}` * * `{{project}}/{{location}}/{{entry_group_id}}/{{entry_id}}` * * `{{location}}/{{entry_group_id}}/{{entry_id}}` * * When using the `pulumi import` command, Entry can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:dataplex/entry:Entry default projects/{{project}}/locations/{{location}}/entryGroups/{{entry_group_id}}/entries/{{entry_id}} * $ pulumi import gcp:dataplex/entry:Entry default {{project}}/{{location}}/{{entry_group_id}}/{{entry_id}} * $ pulumi import gcp:dataplex/entry:Entry default {{location}}/{{entry_group_id}}/{{entry_id}} * ``` */ export declare 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: string, id: pulumi.Input, state?: EntryState, opts?: pulumi.CustomResourceOptions): Entry; /** * 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: any): obj is Entry; /** * The aspects that are attached to the entry. * Structure is documented below. */ readonly aspects: pulumi.Output; /** * The time when the Entry was created in Dataplex. */ readonly createTime: pulumi.Output; /** * The entry group id of the entry group the entry will be created in. */ readonly entryGroupId: pulumi.Output; /** * The entry id of the entry. */ readonly entryId: pulumi.Output; /** * A nested object resource. * Structure is documented below. */ readonly entrySource: pulumi.Output; /** * The relative resource name of the entry type that was used to create this entry, in the format projects/{project_number}/locations/{locationId}/entryTypes/{entryTypeId}. */ readonly entryType: pulumi.Output; /** * A name for the entry that can be referenced by an external system. For more information, see https://cloud.google.com/dataplex/docs/fully-qualified-names. * The maximum size of the field is 4000 characters. */ readonly fullyQualifiedName: pulumi.Output; /** * The location where entry will be created. */ readonly location: pulumi.Output; /** * The relative resource name of the entry, in the format projects/{project_number}/locations/{locationId}/entryGroups/{entryGroupId}/entries/{entryId}. */ readonly name: pulumi.Output; /** * The resource name of the parent entry, in the format projects/{project_number}/locations/{locationId}/entryGroups/{entryGroupId}/entries/{entryId}. */ readonly parentEntry: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The time when the entry was last updated in Dataplex. */ readonly updateTime: pulumi.Output; /** * Create a Entry 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: EntryArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Entry resources. */ export interface EntryState { /** * The aspects that are attached to the entry. * Structure is documented below. */ aspects?: pulumi.Input[]>; /** * The time when the Entry was created in Dataplex. */ createTime?: pulumi.Input; /** * The entry group id of the entry group the entry will be created in. */ entryGroupId?: pulumi.Input; /** * The entry id of the entry. */ entryId?: pulumi.Input; /** * A nested object resource. * Structure is documented below. */ entrySource?: pulumi.Input; /** * The relative resource name of the entry type that was used to create this entry, in the format projects/{project_number}/locations/{locationId}/entryTypes/{entryTypeId}. */ entryType?: pulumi.Input; /** * A name for the entry that can be referenced by an external system. For more information, see https://cloud.google.com/dataplex/docs/fully-qualified-names. * The maximum size of the field is 4000 characters. */ fullyQualifiedName?: pulumi.Input; /** * The location where entry will be created. */ location?: pulumi.Input; /** * The relative resource name of the entry, in the format projects/{project_number}/locations/{locationId}/entryGroups/{entryGroupId}/entries/{entryId}. */ name?: pulumi.Input; /** * The resource name of the parent entry, in the format projects/{project_number}/locations/{locationId}/entryGroups/{entryGroupId}/entries/{entryId}. */ parentEntry?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The time when the entry was last updated in Dataplex. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Entry resource. */ export interface EntryArgs { /** * The aspects that are attached to the entry. * Structure is documented below. */ aspects?: pulumi.Input[]>; /** * The entry group id of the entry group the entry will be created in. */ entryGroupId?: pulumi.Input; /** * The entry id of the entry. */ entryId?: pulumi.Input; /** * A nested object resource. * Structure is documented below. */ entrySource?: pulumi.Input; /** * The relative resource name of the entry type that was used to create this entry, in the format projects/{project_number}/locations/{locationId}/entryTypes/{entryTypeId}. */ entryType: pulumi.Input; /** * A name for the entry that can be referenced by an external system. For more information, see https://cloud.google.com/dataplex/docs/fully-qualified-names. * The maximum size of the field is 4000 characters. */ fullyQualifiedName?: pulumi.Input; /** * The location where entry will be created. */ location?: pulumi.Input; /** * The resource name of the parent entry, in the format projects/{project_number}/locations/{locationId}/entryGroups/{entryGroupId}/entries/{entryId}. */ parentEntry?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; }