UNPKG

@pulumi/gcp

Version:

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

301 lines (300 loc) • 12.6 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Bigquery Analytics Hub listing subscription * * To get more information about ListingSubscription, see: * * * [API documentation](https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.subscriptions) * * How-to Guides * * [Official Documentation](https://cloud.google.com/bigquery/docs/analytics-hub-introduction) * * > **Note:** When importing the resource with `pulumi import`, provide the destination project and location * in the format projects/{{destination_project}}/locations/{{destination_location}}/subscriptions/{{subscription_id}} * ## Example Usage * * ### Bigquery Analyticshub Listing Subscription Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const subscription = new gcp.bigqueryanalyticshub.DataExchange("subscription", { * location: "US", * dataExchangeId: "my_data_exchange", * displayName: "my_data_exchange", * description: "Test Description", * }); * const subscriptionDataset = new gcp.bigquery.Dataset("subscription", { * datasetId: "my_listing", * friendlyName: "my_listing", * description: "Test Description", * location: "US", * }); * const subscriptionListing = new gcp.bigqueryanalyticshub.Listing("subscription", { * location: "US", * dataExchangeId: subscription.dataExchangeId, * listingId: "my_listing", * displayName: "my_listing", * description: "Test Description", * bigqueryDataset: { * dataset: subscriptionDataset.id, * }, * }); * const subscriptionListingSubscription = new gcp.bigqueryanalyticshub.ListingSubscription("subscription", { * location: "US", * dataExchangeId: subscription.dataExchangeId, * listingId: subscriptionListing.listingId, * destinationDataset: { * description: "A test subscription", * friendlyName: "👋", * labels: { * testing: "123", * }, * location: "US", * datasetReference: { * datasetId: "destination_dataset", * projectId: subscriptionDataset.project, * }, * }, * }); * ``` * * ## Import * * ListingSubscription can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}` * * * `{{project}}/{{location}}/{{subscription_id}}` * * * `{{location}}/{{subscription_id}}` * * When using the `pulumi import` command, ListingSubscription can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:bigqueryanalyticshub/listingSubscription:ListingSubscription default projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}} * ``` * * ```sh * $ pulumi import gcp:bigqueryanalyticshub/listingSubscription:ListingSubscription default {{project}}/{{location}}/{{subscription_id}} * ``` * * ```sh * $ pulumi import gcp:bigqueryanalyticshub/listingSubscription:ListingSubscription default {{location}}/{{subscription_id}} * ``` */ export declare class ListingSubscription extends pulumi.CustomResource { /** * Get an existing ListingSubscription 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?: ListingSubscriptionState, opts?: pulumi.CustomResourceOptions): ListingSubscription; /** * Returns true if the given object is an instance of ListingSubscription. 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 ListingSubscription; /** * Commercial info metadata for this subscription. This is set if this is a commercial subscription i.e. if this subscription was created from subscribing to a commercial listing. * Structure is documented below. */ readonly commercialInfos: pulumi.Output<outputs.bigqueryanalyticshub.ListingSubscriptionCommercialInfo[]>; /** * Timestamp when the subscription was created. */ readonly creationTime: pulumi.Output<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. */ readonly dataExchangeId: pulumi.Output<string>; /** * The destination dataset for this subscription. * Structure is documented below. */ readonly destinationDataset: pulumi.Output<outputs.bigqueryanalyticshub.ListingSubscriptionDestinationDataset>; /** * Timestamp when the subscription was last modified. */ readonly lastModifyTime: pulumi.Output<string>; /** * Output only. Map of listing resource names to associated linked resource, * e.g. projects/123/locations/US/dataExchanges/456/listings/789 > projects/123/datasets/my_dataset * Structure is documented below. */ readonly linkedDatasetMaps: pulumi.Output<outputs.bigqueryanalyticshub.ListingSubscriptionLinkedDatasetMap[]>; /** * Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE. * Structure is documented below. */ readonly linkedResources: pulumi.Output<outputs.bigqueryanalyticshub.ListingSubscriptionLinkedResource[]>; /** * 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 of the data exchange. Distinct from the location of the destination data set. */ readonly location: pulumi.Output<string>; /** * Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for Listing. */ readonly logLinkedDatasetQueryUserEmail: pulumi.Output<boolean>; /** * The resource name of the subscription. e.g. "projects/myproject/locations/US/subscriptions/123" */ readonly name: pulumi.Output<string>; /** * Display name of the project of this subscription. */ readonly organizationDisplayName: pulumi.Output<string>; /** * Organization of the project this subscription belongs to. */ readonly organizationId: pulumi.Output<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * Listing shared asset type. */ readonly resourceType: pulumi.Output<string>; /** * Current state of the subscription. */ readonly state: pulumi.Output<string>; /** * Email of the subscriber. */ readonly subscriberContact: pulumi.Output<string>; /** * The subscription id used to reference the subscription. */ readonly subscriptionId: pulumi.Output<string>; /** * Create a ListingSubscription 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: ListingSubscriptionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ListingSubscription resources. */ export interface ListingSubscriptionState { /** * Commercial info metadata for this subscription. This is set if this is a commercial subscription i.e. if this subscription was created from subscribing to a commercial listing. * Structure is documented below. */ commercialInfos?: pulumi.Input<pulumi.Input<inputs.bigqueryanalyticshub.ListingSubscriptionCommercialInfo>[]>; /** * Timestamp when the subscription was created. */ creationTime?: 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>; /** * The destination dataset for this subscription. * Structure is documented below. */ destinationDataset?: pulumi.Input<inputs.bigqueryanalyticshub.ListingSubscriptionDestinationDataset>; /** * Timestamp when the subscription was last modified. */ lastModifyTime?: pulumi.Input<string>; /** * Output only. Map of listing resource names to associated linked resource, * e.g. projects/123/locations/US/dataExchanges/456/listings/789 > projects/123/datasets/my_dataset * Structure is documented below. */ linkedDatasetMaps?: pulumi.Input<pulumi.Input<inputs.bigqueryanalyticshub.ListingSubscriptionLinkedDatasetMap>[]>; /** * Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE. * Structure is documented below. */ linkedResources?: pulumi.Input<pulumi.Input<inputs.bigqueryanalyticshub.ListingSubscriptionLinkedResource>[]>; /** * 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 of the data exchange. Distinct from the location of the destination data set. */ location?: pulumi.Input<string>; /** * Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for Listing. */ logLinkedDatasetQueryUserEmail?: pulumi.Input<boolean>; /** * The resource name of the subscription. e.g. "projects/myproject/locations/US/subscriptions/123" */ name?: pulumi.Input<string>; /** * Display name of the project of this subscription. */ organizationDisplayName?: pulumi.Input<string>; /** * Organization of the project this subscription belongs to. */ organizationId?: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * Listing shared asset type. */ resourceType?: pulumi.Input<string>; /** * Current state of the subscription. */ state?: pulumi.Input<string>; /** * Email of the subscriber. */ subscriberContact?: pulumi.Input<string>; /** * The subscription id used to reference the subscription. */ subscriptionId?: pulumi.Input<string>; } /** * The set of arguments for constructing a ListingSubscription resource. */ export interface ListingSubscriptionArgs { /** * 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>; /** * The destination dataset for this subscription. * Structure is documented below. */ destinationDataset: pulumi.Input<inputs.bigqueryanalyticshub.ListingSubscriptionDestinationDataset>; /** * 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 of the data exchange. Distinct from the location of the destination data set. */ location: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; }