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 dictionaryThe 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<GetDataset Access> 
- CreationTime int
- DatasetId string
- DefaultCollation string
- DefaultEncryption List<GetConfigurations Dataset Default Encryption Configuration> 
- DefaultPartition intExpiration Ms 
- DefaultTable intExpiration Ms 
- DeleteContents boolOn Destroy 
- Description string
- EffectiveLabels Dictionary<string, string>
- Etag string
- ExternalDataset List<GetReferences Dataset External Dataset Reference> 
- FriendlyName string
- Id string
- The provider-assigned unique ID for this managed resource.
- IsCase boolInsensitive 
- Labels Dictionary<string, string>
- LastModified intTime 
- Location string
- MaxTime stringTravel Hours 
- PulumiLabels Dictionary<string, string>
- Dictionary<string, string>
- SelfLink string
- StorageBilling stringModel 
- Project string
- Accesses
[]GetDataset Access Type 
- CreationTime int
- DatasetId string
- DefaultCollation string
- DefaultEncryption []GetConfigurations Dataset Default Encryption Configuration 
- DefaultPartition intExpiration Ms 
- DefaultTable intExpiration Ms 
- DeleteContents boolOn Destroy 
- Description string
- EffectiveLabels map[string]string
- Etag string
- ExternalDataset []GetReferences Dataset External Dataset Reference 
- FriendlyName string
- Id string
- The provider-assigned unique ID for this managed resource.
- IsCase boolInsensitive 
- Labels map[string]string
- LastModified intTime 
- Location string
- MaxTime stringTravel Hours 
- PulumiLabels map[string]string
- map[string]string
- SelfLink string
- StorageBilling stringModel 
- Project string
- accesses
List<GetDataset Access> 
- creationTime Integer
- datasetId String
- defaultCollation String
- defaultEncryption List<GetConfigurations Dataset Default Encryption Configuration> 
- defaultPartition IntegerExpiration Ms 
- defaultTable IntegerExpiration Ms 
- deleteContents BooleanOn Destroy 
- description String
- effectiveLabels Map<String,String>
- etag String
- externalDataset List<GetReferences Dataset External Dataset Reference> 
- friendlyName String
- id String
- The provider-assigned unique ID for this managed resource.
- isCase BooleanInsensitive 
- labels Map<String,String>
- lastModified IntegerTime 
- location String
- maxTime StringTravel Hours 
- pulumiLabels Map<String,String>
- Map<String,String>
- selfLink String
- storageBilling StringModel 
- project String
- accesses
GetDataset Access[] 
- creationTime number
- datasetId string
- defaultCollation string
- defaultEncryption GetConfigurations Dataset Default Encryption Configuration[] 
- defaultPartition numberExpiration Ms 
- defaultTable numberExpiration Ms 
- deleteContents booleanOn Destroy 
- description string
- effectiveLabels {[key: string]: string}
- etag string
- externalDataset GetReferences Dataset External Dataset Reference[] 
- friendlyName string
- id string
- The provider-assigned unique ID for this managed resource.
- isCase booleanInsensitive 
- labels {[key: string]: string}
- lastModified numberTime 
- location string
- maxTime stringTravel Hours 
- pulumiLabels {[key: string]: string}
- {[key: string]: string}
- selfLink string
- storageBilling stringModel 
- project string
- accesses
Sequence[GetDataset 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>
- creationTime Number
- datasetId String
- defaultCollation String
- defaultEncryption List<Property Map>Configurations 
- defaultPartition NumberExpiration Ms 
- defaultTable NumberExpiration Ms 
- deleteContents BooleanOn Destroy 
- description String
- effectiveLabels Map<String>
- etag String
- externalDataset List<Property Map>References 
- friendlyName String
- id String
- The provider-assigned unique ID for this managed resource.
- isCase BooleanInsensitive 
- labels Map<String>
- lastModified NumberTime 
- location String
- maxTime StringTravel Hours 
- pulumiLabels Map<String>
- Map<String>
- selfLink String
- storageBilling StringModel 
- project String
Supporting Types
GetDatasetAccess  
- Datasets
List<GetDataset 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
- GroupBy stringEmail 
- An email address of a Google Group to grant access to.
- IamMember 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<GetDataset 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.
- SpecialGroup 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. 
 
- UserBy stringEmail 
- An email address of a user to grant access to. For example: fred@example.com
- Views
List<GetDataset 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
[]GetDataset 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
- GroupBy stringEmail 
- An email address of a Google Group to grant access to.
- IamMember 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
[]GetDataset 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.
- SpecialGroup 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. 
 
- UserBy stringEmail 
- An email address of a user to grant access to. For example: fred@example.com
- Views
[]GetDataset 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<GetDataset 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
- groupBy StringEmail 
- An email address of a Google Group to grant access to.
- iamMember 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<GetDataset 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.
- specialGroup 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. 
 
- userBy StringEmail 
- An email address of a user to grant access to. For example: fred@example.com
- views
List<GetDataset 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
GetDataset 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
- groupBy stringEmail 
- An email address of a Google Group to grant access to.
- iamMember 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
GetDataset 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.
- specialGroup 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. 
 
- userBy stringEmail 
- An email address of a user to grant access to. For example: fred@example.com
- views
GetDataset 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[GetDataset 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[GetDataset 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[GetDataset 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
- groupBy StringEmail 
- An email address of a Google Group to grant access to.
- iamMember 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.
- specialGroup 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. 
 
- userBy 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<GetDataset Access Dataset Dataset> 
- The dataset this entry applies to
- TargetTypes 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
[]GetDataset Access Dataset Dataset 
- The dataset this entry applies to
- TargetTypes []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<GetDataset Access Dataset Dataset> 
- The dataset this entry applies to
- targetTypes 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
GetDataset Access Dataset Dataset[] 
- The dataset this entry applies to
- targetTypes 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[GetDataset 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
- targetTypes 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    
- KmsKey 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.
- KmsKey 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.
- kmsKey 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.
- kmsKey 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.
- kmsKey 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}
- ExternalSource 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}
- ExternalSource 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}
- externalSource 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}
- externalSource 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}
- externalSource 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-betaTerraform Provider.