UNPKG

@pulumi/gcp

Version:

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

181 lines 7.4 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.DataExchange = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A Bigquery Analytics Hub data exchange * * To get more information about DataExchange, see: * * * [API documentation](https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.dataExchanges) * * How-to Guides * * [Official Documentation](https://cloud.google.com/bigquery/docs/analytics-hub-introduction) * * ## Example Usage * * ### Bigquery Analyticshub Data Exchange Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const dataExchange = new gcp.bigqueryanalyticshub.DataExchange("data_exchange", { * location: "US", * dataExchangeId: "my_data_exchange", * displayName: "my_data_exchange", * description: "example data exchange", * }); * ``` * ### Bigquery Analyticshub Data Exchange Dcr * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const dataExchange = new gcp.bigqueryanalyticshub.DataExchange("data_exchange", { * location: "US", * dataExchangeId: "dcr_data_exchange", * displayName: "dcr_data_exchange", * description: "example dcr data exchange", * sharingEnvironmentConfig: { * dcrExchangeConfig: {}, * }, * }); * ``` * ### Bigquery Analyticshub Data Exchange Log Linked Dataset Query User * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const dataExchange = new gcp.bigqueryanalyticshub.DataExchange("data_exchange", { * location: "US", * dataExchangeId: "tf_test_log_email_data_exchange", * displayName: "tf_test_log_email_data_exchange", * description: "Example for log email test for data exchange", * logLinkedDatasetQueryUserEmail: true, * }); * ``` * ### Bigquery Analyticshub Public Data Exchange * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const dataExchange = new gcp.bigqueryanalyticshub.DataExchange("data_exchange", { * location: "US", * dataExchangeId: "public_data_exchange", * displayName: "public_data_exchange", * description: "Example for public data exchange", * discoveryType: "DISCOVERY_TYPE_PUBLIC", * }); * ``` * * ## Import * * DataExchange can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}` * * * `{{project}}/{{location}}/{{data_exchange_id}}` * * * `{{location}}/{{data_exchange_id}}` * * * `{{data_exchange_id}}` * * When using the `pulumi import` command, DataExchange can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}} * ``` * * ```sh * $ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default {{project}}/{{location}}/{{data_exchange_id}} * ``` * * ```sh * $ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default {{location}}/{{data_exchange_id}} * ``` * * ```sh * $ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default {{data_exchange_id}} * ``` */ class DataExchange extends pulumi.CustomResource { /** * Get an existing DataExchange 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 DataExchange(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DataExchange. 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'] === DataExchange.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dataExchangeId"] = state?.dataExchangeId; resourceInputs["description"] = state?.description; resourceInputs["discoveryType"] = state?.discoveryType; resourceInputs["displayName"] = state?.displayName; resourceInputs["documentation"] = state?.documentation; resourceInputs["icon"] = state?.icon; resourceInputs["listingCount"] = state?.listingCount; resourceInputs["location"] = state?.location; resourceInputs["logLinkedDatasetQueryUserEmail"] = state?.logLinkedDatasetQueryUserEmail; resourceInputs["name"] = state?.name; resourceInputs["primaryContact"] = state?.primaryContact; resourceInputs["project"] = state?.project; resourceInputs["sharingEnvironmentConfig"] = state?.sharingEnvironmentConfig; } else { const args = argsOrState; if (args?.dataExchangeId === undefined && !opts.urn) { throw new Error("Missing required property 'dataExchangeId'"); } if (args?.displayName === undefined && !opts.urn) { throw new Error("Missing required property 'displayName'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["dataExchangeId"] = args?.dataExchangeId; resourceInputs["description"] = args?.description; resourceInputs["discoveryType"] = args?.discoveryType; resourceInputs["displayName"] = args?.displayName; resourceInputs["documentation"] = args?.documentation; resourceInputs["icon"] = args?.icon; resourceInputs["location"] = args?.location; resourceInputs["logLinkedDatasetQueryUserEmail"] = args?.logLinkedDatasetQueryUserEmail; resourceInputs["primaryContact"] = args?.primaryContact; resourceInputs["project"] = args?.project; resourceInputs["sharingEnvironmentConfig"] = args?.sharingEnvironmentConfig; resourceInputs["listingCount"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DataExchange.__pulumiType, name, resourceInputs, opts); } } exports.DataExchange = DataExchange; /** @internal */ DataExchange.__pulumiType = 'gcp:bigqueryanalyticshub/dataExchange:DataExchange'; //# sourceMappingURL=dataExchange.js.map