gcp.bigquery.getDataset
Explore with Pulumi AI
Get information about a BigQuery dataset. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const dataset = gcp.bigquery.getDataset({
datasetId: "my-bq-dataset",
project: "my-project",
});
import pulumi
import pulumi_gcp as gcp
dataset = gcp.bigquery.get_dataset(dataset_id="my-bq-dataset",
project="my-project")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigquery.LookupDataset(ctx, &bigquery.LookupDatasetArgs{
DatasetId: "my-bq-dataset",
Project: pulumi.StringRef("my-project"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dataset = Gcp.BigQuery.GetDataset.Invoke(new()
{
DatasetId = "my-bq-dataset",
Project = "my-project",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigquery.BigqueryFunctions;
import com.pulumi.gcp.bigquery.inputs.GetDatasetArgs;
import java.util.List;
import java.util.ArrayList;
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) {
final var dataset = BigqueryFunctions.getDataset(GetDatasetArgs.builder()
.datasetId("my-bq-dataset")
.project("my-project")
.build());
}
}
variables:
dataset:
fn::invoke:
Function: gcp:bigquery:getDataset
Arguments:
datasetId: my-bq-dataset
project: my-project
Using getDataset
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDataset(args: GetDatasetArgs, opts?: InvokeOptions): Promise<GetDatasetResult>
function getDatasetOutput(args: GetDatasetOutputArgs, opts?: InvokeOptions): Output<GetDatasetResult>
def get_dataset(dataset_id: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatasetResult
def get_dataset_output(dataset_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatasetResult]
func LookupDataset(ctx *Context, args *LookupDatasetArgs, opts ...InvokeOption) (*LookupDatasetResult, error)
func LookupDatasetOutput(ctx *Context, args *LookupDatasetOutputArgs, opts ...InvokeOption) LookupDatasetResultOutput
> Note: This function is named LookupDataset
in the Go SDK.
public static class GetDataset
{
public static Task<GetDatasetResult> InvokeAsync(GetDatasetArgs args, InvokeOptions? opts = null)
public static Output<GetDatasetResult> Invoke(GetDatasetInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatasetResult> getDataset(GetDatasetArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:bigquery/getDataset:getDataset
arguments:
# arguments dictionary
The following arguments are supported:
- dataset_
id str - The dataset ID.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
getDataset Result
The following output properties are available:
- Accesses
List<Get
Dataset Access> - Creation
Time int - Dataset
Id string - Default
Collation string - Default
Encryption List<GetConfigurations Dataset Default Encryption Configuration> - Default
Partition intExpiration Ms - Default
Table intExpiration Ms - Delete
Contents boolOn Destroy - Description string
- Effective
Labels Dictionary<string, string> - Etag string
- External
Dataset List<GetReferences Dataset External Dataset Reference> - Friendly
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Is
Case boolInsensitive - Labels Dictionary<string, string>
- Last
Modified intTime - Location string
- Max
Time stringTravel Hours - Pulumi
Labels Dictionary<string, string> - Dictionary<string, string>
- Self
Link string - Storage
Billing stringModel - Project string
- Accesses
[]Get
Dataset Access Type - Creation
Time int - Dataset
Id string - Default
Collation string - Default
Encryption []GetConfigurations Dataset Default Encryption Configuration - Default
Partition intExpiration Ms - Default
Table intExpiration Ms - Delete
Contents boolOn Destroy - Description string
- Effective
Labels map[string]string - Etag string
- External
Dataset []GetReferences Dataset External Dataset Reference - Friendly
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Is
Case boolInsensitive - Labels map[string]string
- Last
Modified intTime - Location string
- Max
Time stringTravel Hours - Pulumi
Labels map[string]string - map[string]string
- Self
Link string - Storage
Billing stringModel - Project string
- accesses
List<Get
Dataset Access> - creation
Time Integer - dataset
Id String - default
Collation String - default
Encryption List<GetConfigurations Dataset Default Encryption Configuration> - default
Partition IntegerExpiration Ms - default
Table IntegerExpiration Ms - delete
Contents BooleanOn Destroy - description String
- effective
Labels Map<String,String> - etag String
- external
Dataset List<GetReferences Dataset External Dataset Reference> - friendly
Name String - id String
- The provider-assigned unique ID for this managed resource.
- is
Case BooleanInsensitive - labels Map<String,String>
- last
Modified IntegerTime - location String
- max
Time StringTravel Hours - pulumi
Labels Map<String,String> - Map<String,String>
- self
Link String - storage
Billing StringModel - project String
- accesses
Get
Dataset Access[] - creation
Time number - dataset
Id string - default
Collation string - default
Encryption GetConfigurations Dataset Default Encryption Configuration[] - default
Partition numberExpiration Ms - default
Table numberExpiration Ms - delete
Contents booleanOn Destroy - description string
- effective
Labels {[key: string]: string} - etag string
- external
Dataset GetReferences Dataset External Dataset Reference[] - friendly
Name string - id string
- The provider-assigned unique ID for this managed resource.
- is
Case booleanInsensitive - labels {[key: string]: string}
- last
Modified numberTime - location string
- max
Time stringTravel Hours - pulumi
Labels {[key: string]: string} - {[key: string]: string}
- self
Link string - storage
Billing stringModel - project string
- accesses
Sequence[Get
Dataset Access] - creation_
time int - dataset_
id str - default_
collation str - default_
encryption_ Sequence[Getconfigurations Dataset Default Encryption Configuration] - default_
partition_ intexpiration_ ms - default_
table_ intexpiration_ ms - delete_
contents_ boolon_ destroy - description str
- effective_
labels Mapping[str, str] - etag str
- external_
dataset_ Sequence[Getreferences Dataset External Dataset Reference] - friendly_
name str - id str
- The provider-assigned unique ID for this managed resource.
- is_
case_ boolinsensitive - labels Mapping[str, str]
- last_
modified_ inttime - location str
- max_
time_ strtravel_ hours - pulumi_
labels Mapping[str, str] - Mapping[str, str]
- self_
link str - storage_
billing_ strmodel - project str
- accesses List<Property Map>
- creation
Time Number - dataset
Id String - default
Collation String - default
Encryption List<Property Map>Configurations - default
Partition NumberExpiration Ms - default
Table NumberExpiration Ms - delete
Contents BooleanOn Destroy - description String
- effective
Labels Map<String> - etag String
- external
Dataset List<Property Map>References - friendly
Name String - id String
- The provider-assigned unique ID for this managed resource.
- is
Case BooleanInsensitive - labels Map<String>
- last
Modified NumberTime - location String
- max
Time StringTravel Hours - pulumi
Labels Map<String> - Map<String>
- self
Link String - storage
Billing StringModel - project String
Supporting Types
GetDatasetAccess
- Datasets
List<Get
Dataset Access Dataset> - Grants all resources of particular types in a particular dataset read access to the current dataset.
- Domain string
- A domain to grant access to. Any users signed in with the domain specified will be granted the specified access
- Group
By stringEmail - An email address of a Google Group to grant access to.
- Iam
Member string - Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: 'allUsers'
- Role string
- Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See official docs.
- Routines
List<Get
Dataset Access Routine> - A routine from a different dataset to grant access to. Queries executed against that routine will have read access to tables in this dataset. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
- Special
Group string A special group to grant access to. Possible values include:
'projectOwners': Owners of the enclosing project.
'projectReaders': Readers of the enclosing project.
'projectWriters': Writers of the enclosing project.
'allAuthenticatedUsers': All authenticated BigQuery users.
- User
By stringEmail - An email address of a user to grant access to. For example: fred@example.com
- Views
List<Get
Dataset Access View> - A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
- Datasets
[]Get
Dataset Access Dataset - Grants all resources of particular types in a particular dataset read access to the current dataset.
- Domain string
- A domain to grant access to. Any users signed in with the domain specified will be granted the specified access
- Group
By stringEmail - An email address of a Google Group to grant access to.
- Iam
Member string - Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: 'allUsers'
- Role string
- Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See official docs.
- Routines
[]Get
Dataset Access Routine - A routine from a different dataset to grant access to. Queries executed against that routine will have read access to tables in this dataset. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
- Special
Group string A special group to grant access to. Possible values include:
'projectOwners': Owners of the enclosing project.
'projectReaders': Readers of the enclosing project.
'projectWriters': Writers of the enclosing project.
'allAuthenticatedUsers': All authenticated BigQuery users.
- User
By stringEmail - An email address of a user to grant access to. For example: fred@example.com
- Views
[]Get
Dataset Access View - A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
- datasets
List<Get
Dataset Access Dataset> - Grants all resources of particular types in a particular dataset read access to the current dataset.
- domain String
- A domain to grant access to. Any users signed in with the domain specified will be granted the specified access
- group
By StringEmail - An email address of a Google Group to grant access to.
- iam
Member String - Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: 'allUsers'
- role String
- Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See official docs.
- routines
List<Get
Dataset Access Routine> - A routine from a different dataset to grant access to. Queries executed against that routine will have read access to tables in this dataset. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
- special
Group String A special group to grant access to. Possible values include:
'projectOwners': Owners of the enclosing project.
'projectReaders': Readers of the enclosing project.
'projectWriters': Writers of the enclosing project.
'allAuthenticatedUsers': All authenticated BigQuery users.
- user
By StringEmail - An email address of a user to grant access to. For example: fred@example.com
- views
List<Get
Dataset Access View> - A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
- datasets
Get
Dataset Access Dataset[] - Grants all resources of particular types in a particular dataset read access to the current dataset.
- domain string
- A domain to grant access to. Any users signed in with the domain specified will be granted the specified access
- group
By stringEmail - An email address of a Google Group to grant access to.
- iam
Member string - Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: 'allUsers'
- role string
- Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See official docs.
- routines
Get
Dataset Access Routine[] - A routine from a different dataset to grant access to. Queries executed against that routine will have read access to tables in this dataset. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
- special
Group string A special group to grant access to. Possible values include:
'projectOwners': Owners of the enclosing project.
'projectReaders': Readers of the enclosing project.
'projectWriters': Writers of the enclosing project.
'allAuthenticatedUsers': All authenticated BigQuery users.
- user
By stringEmail - An email address of a user to grant access to. For example: fred@example.com
- views
Get
Dataset Access View[] - A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
- datasets
Sequence[Get
Dataset Access Dataset] - Grants all resources of particular types in a particular dataset read access to the current dataset.
- domain str
- A domain to grant access to. Any users signed in with the domain specified will be granted the specified access
- group_
by_ stremail - An email address of a Google Group to grant access to.
- iam_
member str - Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: 'allUsers'
- role str
- Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See official docs.
- routines
Sequence[Get
Dataset Access Routine] - A routine from a different dataset to grant access to. Queries executed against that routine will have read access to tables in this dataset. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
- special_
group str A special group to grant access to. Possible values include:
'projectOwners': Owners of the enclosing project.
'projectReaders': Readers of the enclosing project.
'projectWriters': Writers of the enclosing project.
'allAuthenticatedUsers': All authenticated BigQuery users.
- user_
by_ stremail - An email address of a user to grant access to. For example: fred@example.com
- views
Sequence[Get
Dataset Access View] - A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
- datasets List<Property Map>
- Grants all resources of particular types in a particular dataset read access to the current dataset.
- domain String
- A domain to grant access to. Any users signed in with the domain specified will be granted the specified access
- group
By StringEmail - An email address of a Google Group to grant access to.
- iam
Member String - Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: 'allUsers'
- role String
- Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See official docs.
- routines List<Property Map>
- A routine from a different dataset to grant access to. Queries executed against that routine will have read access to tables in this dataset. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
- special
Group String A special group to grant access to. Possible values include:
'projectOwners': Owners of the enclosing project.
'projectReaders': Readers of the enclosing project.
'projectWriters': Writers of the enclosing project.
'allAuthenticatedUsers': All authenticated BigQuery users.
- user
By StringEmail - An email address of a user to grant access to. For example: fred@example.com
- views List<Property Map>
- A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
GetDatasetAccessDataset
- Datasets
List<Get
Dataset Access Dataset Dataset> - The dataset this entry applies to
- Target
Types List<string> - Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS
- Datasets
[]Get
Dataset Access Dataset Dataset - The dataset this entry applies to
- Target
Types []string - Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS
- datasets
List<Get
Dataset Access Dataset Dataset> - The dataset this entry applies to
- target
Types List<String> - Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS
- datasets
Get
Dataset Access Dataset Dataset[] - The dataset this entry applies to
- target
Types string[] - Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS
- datasets
Sequence[Get
Dataset Access Dataset Dataset] - The dataset this entry applies to
- target_
types Sequence[str] - Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS
- datasets List<Property Map>
- The dataset this entry applies to
- target
Types List<String> - Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS
GetDatasetAccessDatasetDataset
- dataset_
id str - The dataset ID.
- project_
id str - The ID of the project containing this table.
GetDatasetAccessRoutine
- dataset_
id str - The dataset ID.
- project_
id str - The ID of the project containing this table.
- routine_
id str - The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
GetDatasetAccessView
- dataset_
id str - The dataset ID.
- project_
id str - The ID of the project containing this table.
- table_
id str - The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
GetDatasetDefaultEncryptionConfiguration
- Kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- Kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms
Key StringName - Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms_
key_ strname - Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
- kms
Key StringName - Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
GetDatasetExternalDatasetReference
- Connection string
- The connection id that is used to access the externalSource. Format: projects/{projectId}/locations/{locationId}/connections/{connectionId}
- External
Source string - External source that backs this dataset.
- Connection string
- The connection id that is used to access the externalSource. Format: projects/{projectId}/locations/{locationId}/connections/{connectionId}
- External
Source string - External source that backs this dataset.
- connection String
- The connection id that is used to access the externalSource. Format: projects/{projectId}/locations/{locationId}/connections/{connectionId}
- external
Source String - External source that backs this dataset.
- connection string
- The connection id that is used to access the externalSource. Format: projects/{projectId}/locations/{locationId}/connections/{connectionId}
- external
Source string - External source that backs this dataset.
- connection str
- The connection id that is used to access the externalSource. Format: projects/{projectId}/locations/{locationId}/connections/{connectionId}
- external_
source str - External source that backs this dataset.
- connection String
- The connection id that is used to access the externalSource. Format: projects/{projectId}/locations/{locationId}/connections/{connectionId}
- external
Source String - External source that backs this dataset.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.