DataExchange class
A Bigquery Analytics Hub data exchange
To get more information about DataExchange, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage
Bigquery Analyticshub Data Exchange Basic
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",
});
import pulumi
import pulumi_gcp as gcp
data_exchange = gcp.bigqueryanalyticshub.DataExchange("data_exchange",
location="US",
data_exchange_id="my_data_exchange",
display_name="my_data_exchange",
description="example data exchange")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dataExchange = new Gcp.BigQueryAnalyticsHub.DataExchange("data_exchange", new()
{
Location = "US",
DataExchangeId = "my_data_exchange",
DisplayName = "my_data_exchange",
Description = "example data exchange",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigqueryanalyticshub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigqueryanalyticshub.NewDataExchange(ctx, "data_exchange", &bigqueryanalyticshub.DataExchangeArgs{
Location: pulumi.String("US"),
DataExchangeId: pulumi.String("my_data_exchange"),
DisplayName: pulumi.String("my_data_exchange"),
Description: pulumi.String("example data exchange"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_bigqueryanalyticshub_dataexchange" "data_exchange" {
location = "US"
data_exchange_id = "my_data_exchange"
display_name = "my_data_exchange"
description = "example data exchange"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchange;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchangeArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dataExchange = new DataExchange("dataExchange", DataExchangeArgs.builder()
.location("US")
.dataExchangeId("my_data_exchange")
.displayName("my_data_exchange")
.description("example data exchange")
.build());
}
}
resources:
dataExchange:
type: gcp:bigqueryanalyticshub:DataExchange
name: data_exchange
properties:
location: US
dataExchangeId: my_data_exchange
displayName: my_data_exchange
description: example data exchange
Bigquery Analyticshub Data Exchange Dcr
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: {},
},
});
import pulumi
import pulumi_gcp as gcp
data_exchange = gcp.bigqueryanalyticshub.DataExchange("data_exchange",
location="US",
data_exchange_id="dcr_data_exchange",
display_name="dcr_data_exchange",
description="example dcr data exchange",
sharing_environment_config={
"dcr_exchange_config": {},
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dataExchange = new Gcp.BigQueryAnalyticsHub.DataExchange("data_exchange", new()
{
Location = "US",
DataExchangeId = "dcr_data_exchange",
DisplayName = "dcr_data_exchange",
Description = "example dcr data exchange",
SharingEnvironmentConfig = new Gcp.BigQueryAnalyticsHub.Inputs.DataExchangeSharingEnvironmentConfigArgs
{
DcrExchangeConfig = null,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigqueryanalyticshub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigqueryanalyticshub.NewDataExchange(ctx, "data_exchange", &bigqueryanalyticshub.DataExchangeArgs{
Location: pulumi.String("US"),
DataExchangeId: pulumi.String("dcr_data_exchange"),
DisplayName: pulumi.String("dcr_data_exchange"),
Description: pulumi.String("example dcr data exchange"),
SharingEnvironmentConfig: &bigqueryanalyticshub.DataExchangeSharingEnvironmentConfigArgs{
DcrExchangeConfig: &bigqueryanalyticshub.DataExchangeSharingEnvironmentConfigDcrExchangeConfigArgs{},
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_bigqueryanalyticshub_dataexchange" "data_exchange" {
location = "US"
data_exchange_id = "dcr_data_exchange"
display_name = "dcr_data_exchange"
description = "example dcr data exchange"
sharing_environment_config = {
dcr_exchange_config = {}
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchange;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchangeArgs;
import com.pulumi.gcp.bigqueryanalyticshub.inputs.DataExchangeSharingEnvironmentConfigArgs;
import com.pulumi.gcp.bigqueryanalyticshub.inputs.DataExchangeSharingEnvironmentConfigDcrExchangeConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dataExchange = new DataExchange("dataExchange", DataExchangeArgs.builder()
.location("US")
.dataExchangeId("dcr_data_exchange")
.displayName("dcr_data_exchange")
.description("example dcr data exchange")
.sharingEnvironmentConfig(DataExchangeSharingEnvironmentConfigArgs.builder()
.dcrExchangeConfig(DataExchangeSharingEnvironmentConfigDcrExchangeConfigArgs.builder()
.build())
.build())
.build());
}
}
resources:
dataExchange:
type: gcp:bigqueryanalyticshub:DataExchange
name: data_exchange
properties:
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
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,
});
import pulumi
import pulumi_gcp as gcp
data_exchange = gcp.bigqueryanalyticshub.DataExchange("data_exchange",
location="US",
data_exchange_id="tf_test_log_email_data_exchange",
display_name="tf_test_log_email_data_exchange",
description="Example for log email test for data exchange",
log_linked_dataset_query_user_email=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dataExchange = new Gcp.BigQueryAnalyticsHub.DataExchange("data_exchange", new()
{
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,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigqueryanalyticshub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigqueryanalyticshub.NewDataExchange(ctx, "data_exchange", &bigqueryanalyticshub.DataExchangeArgs{
Location: pulumi.String("US"),
DataExchangeId: pulumi.String("tf_test_log_email_data_exchange"),
DisplayName: pulumi.String("tf_test_log_email_data_exchange"),
Description: pulumi.String("Example for log email test for data exchange"),
LogLinkedDatasetQueryUserEmail: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_bigqueryanalyticshub_dataexchange" "data_exchange" {
location = "US"
data_exchange_id = "tf_test_log_email_data_exchange"
display_name = "tf_test_log_email_data_exchange"
description = "Example for log email test for data exchange"
log_linked_dataset_query_user_email = true
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchange;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchangeArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dataExchange = new DataExchange("dataExchange", DataExchangeArgs.builder()
.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)
.build());
}
}
resources:
dataExchange:
type: gcp:bigqueryanalyticshub:DataExchange
name: data_exchange
properties:
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
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 pulumi
import pulumi_gcp as gcp
data_exchange = gcp.bigqueryanalyticshub.DataExchange("data_exchange",
location="US",
data_exchange_id="public_data_exchange",
display_name="public_data_exchange",
description="Example for public data exchange",
discovery_type="DISCOVERY_TYPE_PUBLIC")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dataExchange = new Gcp.BigQueryAnalyticsHub.DataExchange("data_exchange", new()
{
Location = "US",
DataExchangeId = "public_data_exchange",
DisplayName = "public_data_exchange",
Description = "Example for public data exchange",
DiscoveryType = "DISCOVERY_TYPE_PUBLIC",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigqueryanalyticshub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigqueryanalyticshub.NewDataExchange(ctx, "data_exchange", &bigqueryanalyticshub.DataExchangeArgs{
Location: pulumi.String("US"),
DataExchangeId: pulumi.String("public_data_exchange"),
DisplayName: pulumi.String("public_data_exchange"),
Description: pulumi.String("Example for public data exchange"),
DiscoveryType: pulumi.String("DISCOVERY_TYPE_PUBLIC"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_bigqueryanalyticshub_dataexchange" "data_exchange" {
location = "US"
data_exchange_id = "public_data_exchange"
display_name = "public_data_exchange"
description = "Example for public data exchange"
discovery_type = "DISCOVERY_TYPE_PUBLIC"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchange;
import com.pulumi.gcp.bigqueryanalyticshub.DataExchangeArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dataExchange = new DataExchange("dataExchange", DataExchangeArgs.builder()
.location("US")
.dataExchangeId("public_data_exchange")
.displayName("public_data_exchange")
.description("Example for public data exchange")
.discoveryType("DISCOVERY_TYPE_PUBLIC")
.build());
}
}
resources:
dataExchange:
type: gcp:bigqueryanalyticshub:DataExchange
name: data_exchange
properties:
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:
$ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}
$ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default {{project}}/{{location}}/{{data_exchange_id}}
$ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default {{location}}/{{data_exchange_id}}
$ pulumi import gcp:bigqueryanalyticshub/dataExchange:DataExchange default {{data_exchange_id}}
Constructors
- DataExchange(String name, {DataExchangeArgs? args, CustomResourceOptions? options})
-
Creates a new DataExchange.
nameThe Pulumi resource name.argsArguments used to configure this DataExchange. The set of arguments for DataExchange.optionsResource options controlling this resource's behavior. - DataExchange.reference(String urn)
- Creates a typed reference to an existing DataExchange resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
dataExchangeId
↔ 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.
latefinal
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
description
↔ Output<
String?> -
Description of the data exchange.
latefinal
-
discoveryType
↔ Output<
String> -
Type of discovery on the discovery page for all the listings under this exchange. Cannot be set for a Data Clean Room. Updating this field also updates (overwrites) the discoveryType field for all the listings under this exchange.
Possible values are:
DISCOVERY_TYPE_PRIVATE,DISCOVERY_TYPE_PUBLIC.latefinal -
displayName
↔ Output<
String> -
Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and must not start or end with spaces.
latefinal
-
documentation
↔ Output<
String?> -
Documentation describing the data exchange.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
icon
↔ Output<
String?> -
Base64 encoded image representing the data exchange.
latefinal
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
listingCount
↔ Output<
int> -
Number of listings contained in the data exchange.
latefinal
-
location
↔ Output<
String> -
The name of the location this data exchange.
latefinal
-
logLinkedDatasetQueryUserEmail
↔ Output<
bool?> -
If true, subscriber email logging is enabled and all queries on the linked dataset will log the email address of the querying user. Once enabled, this setting cannot be turned off.
latefinal
-
name
↔ Output<
String> -
The resource name of the data exchange, for example:
"projects/myproject/locations/US/dataExchanges/123"
latefinal
-
primaryContact
↔ Output<
String?> -
Email or URL of the primary point of contact of the data exchange.
latefinal
-
project
↔ Output<
String> -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Configurable data sharing environment option for a data exchange.
This field is required for data clean room exchanges.
Structure is documented below.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {DataExchangeState? state, CustomResourceOptions? options}) → DataExchange -
Gets an existing DataExchange resource's state with the given
nameandid.