@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
383 lines (382 loc) • 14.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A Bigquery Analytics Hub data exchange listing
*
* To get more information about Listing, see:
*
* * [API documentation](https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.dataExchanges.listings)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/bigquery/docs/analytics-hub-introduction)
*
* ## Example Usage
*
* ### Bigquery Analyticshub Listing Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const listing = new gcp.bigqueryanalyticshub.DataExchange("listing", {
* location: "US",
* dataExchangeId: "my_data_exchange",
* displayName: "my_data_exchange",
* description: "example data exchange",
* });
* const listingDataset = new gcp.bigquery.Dataset("listing", {
* datasetId: "my_listing",
* friendlyName: "my_listing",
* description: "example data exchange",
* location: "US",
* });
* const listingListing = new gcp.bigqueryanalyticshub.Listing("listing", {
* location: "US",
* dataExchangeId: listing.dataExchangeId,
* listingId: "my_listing",
* displayName: "my_listing",
* description: "example data exchange",
* bigqueryDataset: {
* dataset: listingDataset.id,
* },
* });
* ```
* ### Bigquery Analyticshub Listing Restricted
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const listing = new gcp.bigqueryanalyticshub.DataExchange("listing", {
* location: "US",
* dataExchangeId: "my_data_exchange",
* displayName: "my_data_exchange",
* description: "example data exchange",
* });
* const listingDataset = new gcp.bigquery.Dataset("listing", {
* datasetId: "my_listing",
* friendlyName: "my_listing",
* description: "example data exchange",
* location: "US",
* });
* const listingListing = new gcp.bigqueryanalyticshub.Listing("listing", {
* location: "US",
* dataExchangeId: listing.dataExchangeId,
* listingId: "my_listing",
* displayName: "my_listing",
* description: "example data exchange",
* bigqueryDataset: {
* dataset: listingDataset.id,
* },
* restrictedExportConfig: {
* enabled: true,
* restrictQueryResult: true,
* },
* });
* ```
* ### Bigquery Analyticshub Listing Dcr
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const listing = new gcp.bigqueryanalyticshub.DataExchange("listing", {
* location: "US",
* dataExchangeId: "dcr_data_exchange",
* displayName: "dcr_data_exchange",
* description: "example dcr data exchange",
* sharingEnvironmentConfig: {
* dcrExchangeConfig: {},
* },
* });
* const listingDataset = new gcp.bigquery.Dataset("listing", {
* datasetId: "dcr_listing",
* friendlyName: "dcr_listing",
* description: "example dcr data exchange",
* location: "US",
* });
* const listingTable = new gcp.bigquery.Table("listing", {
* deletionProtection: false,
* tableId: "dcr_listing",
* datasetId: listingDataset.datasetId,
* schema: `[
* {
* "name": "name",
* "type": "STRING",
* "mode": "NULLABLE"
* },
* {
* "name": "post_abbr",
* "type": "STRING",
* "mode": "NULLABLE"
* },
* {
* "name": "date",
* "type": "DATE",
* "mode": "NULLABLE"
* }
* ]
* `,
* });
* const listingListing = new gcp.bigqueryanalyticshub.Listing("listing", {
* location: "US",
* dataExchangeId: listing.dataExchangeId,
* listingId: "dcr_listing",
* displayName: "dcr_listing",
* description: "example dcr data exchange",
* bigqueryDataset: {
* dataset: listingDataset.id,
* selectedResources: [{
* table: listingTable.id,
* }],
* },
* restrictedExportConfig: {
* enabled: true,
* },
* });
* ```
*
* ## Import
*
* Listing can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}`
*
* * `{{project}}/{{location}}/{{data_exchange_id}}/{{listing_id}}`
*
* * `{{location}}/{{data_exchange_id}}/{{listing_id}}`
*
* When using the `pulumi import` command, Listing can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:bigqueryanalyticshub/listing:Listing default projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}
* ```
*
* ```sh
* $ pulumi import gcp:bigqueryanalyticshub/listing:Listing default {{project}}/{{location}}/{{data_exchange_id}}/{{listing_id}}
* ```
*
* ```sh
* $ pulumi import gcp:bigqueryanalyticshub/listing:Listing default {{location}}/{{data_exchange_id}}/{{listing_id}}
* ```
*/
export declare class Listing extends pulumi.CustomResource {
/**
* Get an existing Listing 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<pulumi.ID>, state?: ListingState, opts?: pulumi.CustomResourceOptions): Listing;
/**
* Returns true if the given object is an instance of Listing. 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 Listing;
/**
* Shared dataset i.e. BigQuery dataset source.
* Structure is documented below.
*/
readonly bigqueryDataset: pulumi.Output<outputs.bigqueryanalyticshub.ListingBigqueryDataset>;
/**
* Categories of the listing. Up to two categories are allowed.
*/
readonly categories: pulumi.Output<string[] | undefined>;
/**
* The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces.
*/
readonly dataExchangeId: pulumi.Output<string>;
/**
* Details of the data provider who owns the source data.
*/
readonly dataProvider: pulumi.Output<outputs.bigqueryanalyticshub.ListingDataProvider | undefined>;
/**
* Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes
* except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF).
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces.
*/
readonly displayName: pulumi.Output<string>;
/**
* Documentation describing the listing.
*/
readonly documentation: pulumi.Output<string | undefined>;
/**
* Base64 encoded image representing the listing.
*/
readonly icon: pulumi.Output<string | undefined>;
/**
* The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces.
*/
readonly listingId: pulumi.Output<string>;
/**
* The name of the location this data exchange listing.
*/
readonly location: pulumi.Output<string>;
/**
* The resource name of the listing. e.g. "projects/myproject/locations/US/dataExchanges/123/listings/456"
*/
readonly name: pulumi.Output<string>;
/**
* Email or URL of the primary point of contact of the listing.
*/
readonly primaryContact: pulumi.Output<string | undefined>;
readonly project: pulumi.Output<string>;
/**
* Details of the publisher who owns the listing and who can share the source data.
*/
readonly publisher: pulumi.Output<outputs.bigqueryanalyticshub.ListingPublisher | undefined>;
/**
* Email or URL of the request access of the listing. Subscribers can use this reference to request access.
*/
readonly requestAccess: pulumi.Output<string | undefined>;
/**
* If set, restricted export configuration will be propagated and enforced on the linked dataset.
*/
readonly restrictedExportConfig: pulumi.Output<outputs.bigqueryanalyticshub.ListingRestrictedExportConfig | undefined>;
/**
* Create a Listing 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: ListingArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Listing resources.
*/
export interface ListingState {
/**
* Shared dataset i.e. BigQuery dataset source.
* Structure is documented below.
*/
bigqueryDataset?: pulumi.Input<inputs.bigqueryanalyticshub.ListingBigqueryDataset>;
/**
* Categories of the listing. Up to two categories are allowed.
*/
categories?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces.
*/
dataExchangeId?: pulumi.Input<string>;
/**
* Details of the data provider who owns the source data.
*/
dataProvider?: pulumi.Input<inputs.bigqueryanalyticshub.ListingDataProvider>;
/**
* Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes
* except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF).
*/
description?: pulumi.Input<string>;
/**
* Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces.
*/
displayName?: pulumi.Input<string>;
/**
* Documentation describing the listing.
*/
documentation?: pulumi.Input<string>;
/**
* Base64 encoded image representing the listing.
*/
icon?: pulumi.Input<string>;
/**
* The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces.
*/
listingId?: pulumi.Input<string>;
/**
* The name of the location this data exchange listing.
*/
location?: pulumi.Input<string>;
/**
* The resource name of the listing. e.g. "projects/myproject/locations/US/dataExchanges/123/listings/456"
*/
name?: pulumi.Input<string>;
/**
* Email or URL of the primary point of contact of the listing.
*/
primaryContact?: pulumi.Input<string>;
project?: pulumi.Input<string>;
/**
* Details of the publisher who owns the listing and who can share the source data.
*/
publisher?: pulumi.Input<inputs.bigqueryanalyticshub.ListingPublisher>;
/**
* Email or URL of the request access of the listing. Subscribers can use this reference to request access.
*/
requestAccess?: pulumi.Input<string>;
/**
* If set, restricted export configuration will be propagated and enforced on the linked dataset.
*/
restrictedExportConfig?: pulumi.Input<inputs.bigqueryanalyticshub.ListingRestrictedExportConfig>;
}
/**
* The set of arguments for constructing a Listing resource.
*/
export interface ListingArgs {
/**
* Shared dataset i.e. BigQuery dataset source.
* Structure is documented below.
*/
bigqueryDataset: pulumi.Input<inputs.bigqueryanalyticshub.ListingBigqueryDataset>;
/**
* Categories of the listing. Up to two categories are allowed.
*/
categories?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces.
*/
dataExchangeId: pulumi.Input<string>;
/**
* Details of the data provider who owns the source data.
*/
dataProvider?: pulumi.Input<inputs.bigqueryanalyticshub.ListingDataProvider>;
/**
* Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes
* except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF).
*/
description?: pulumi.Input<string>;
/**
* Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces.
*/
displayName: pulumi.Input<string>;
/**
* Documentation describing the listing.
*/
documentation?: pulumi.Input<string>;
/**
* Base64 encoded image representing the listing.
*/
icon?: pulumi.Input<string>;
/**
* The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces.
*/
listingId: pulumi.Input<string>;
/**
* The name of the location this data exchange listing.
*/
location: pulumi.Input<string>;
/**
* Email or URL of the primary point of contact of the listing.
*/
primaryContact?: pulumi.Input<string>;
project?: pulumi.Input<string>;
/**
* Details of the publisher who owns the listing and who can share the source data.
*/
publisher?: pulumi.Input<inputs.bigqueryanalyticshub.ListingPublisher>;
/**
* Email or URL of the request access of the listing. Subscribers can use this reference to request access.
*/
requestAccess?: pulumi.Input<string>;
/**
* If set, restricted export configuration will be propagated and enforced on the linked dataset.
*/
restrictedExportConfig?: pulumi.Input<inputs.bigqueryanalyticshub.ListingRestrictedExportConfig>;
}