1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. bigquery
  5. getDataset
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

gcp.bigquery.getDataset

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

    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/v8/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:

    DatasetId string
    The dataset ID.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    DatasetId string
    The dataset ID.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    datasetId String
    The dataset ID.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    datasetId string
    The dataset ID.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    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.
    datasetId String
    The dataset ID.
    project String
    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:

    Supporting Types

    GetDatasetAccess

    Datasets List<GetDatasetAccessDataset>
    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
    GroupByEmail string
    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<GetDatasetAccessRoutine>
    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.
    UserByEmail string
    An email address of a user to grant access to. For example: fred@example.com
    Views List<GetDatasetAccessView>
    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 []GetDatasetAccessDataset
    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
    GroupByEmail string
    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 []GetDatasetAccessRoutine
    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.
    UserByEmail string
    An email address of a user to grant access to. For example: fred@example.com
    Views []GetDatasetAccessView
    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<GetDatasetAccessDataset>
    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
    groupByEmail String
    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<GetDatasetAccessRoutine>
    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.
    userByEmail String
    An email address of a user to grant access to. For example: fred@example.com
    views List<GetDatasetAccessView>
    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 GetDatasetAccessDataset[]
    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
    groupByEmail string
    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 GetDatasetAccessRoutine[]
    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.
    userByEmail string
    An email address of a user to grant access to. For example: fred@example.com
    views GetDatasetAccessView[]
    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[GetDatasetAccessDataset]
    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_email str
    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[GetDatasetAccessRoutine]
    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_email str
    An email address of a user to grant access to. For example: fred@example.com
    views Sequence[GetDatasetAccessView]
    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
    groupByEmail String
    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.
    userByEmail String
    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<GetDatasetAccessDatasetDataset>
    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 []GetDatasetAccessDatasetDataset
    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<GetDatasetAccessDatasetDataset>
    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 GetDatasetAccessDatasetDataset[]
    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[GetDatasetAccessDatasetDataset]
    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

    DatasetId string
    The dataset ID.
    ProjectId string
    The ID of the project containing this table.
    DatasetId string
    The dataset ID.
    ProjectId string
    The ID of the project containing this table.
    datasetId String
    The dataset ID.
    projectId String
    The ID of the project containing this table.
    datasetId string
    The dataset ID.
    projectId string
    The ID of the project containing this table.
    dataset_id str
    The dataset ID.
    project_id str
    The ID of the project containing this table.
    datasetId String
    The dataset ID.
    projectId String
    The ID of the project containing this table.

    GetDatasetAccessRoutine

    DatasetId string
    The dataset ID.
    ProjectId string
    The ID of the project containing this table.
    RoutineId string
    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.
    DatasetId string
    The dataset ID.
    ProjectId string
    The ID of the project containing this table.
    RoutineId string
    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.
    datasetId String
    The dataset ID.
    projectId String
    The ID of the project containing this table.
    routineId String
    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.
    datasetId string
    The dataset ID.
    projectId string
    The ID of the project containing this table.
    routineId string
    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.
    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.
    datasetId String
    The dataset ID.
    projectId String
    The ID of the project containing this table.
    routineId String
    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

    DatasetId string
    The dataset ID.
    ProjectId string
    The ID of the project containing this table.
    TableId string
    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.
    DatasetId string
    The dataset ID.
    ProjectId string
    The ID of the project containing this table.
    TableId string
    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.
    datasetId String
    The dataset ID.
    projectId String
    The ID of the project containing this table.
    tableId String
    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.
    datasetId string
    The dataset ID.
    projectId string
    The ID of the project containing this table.
    tableId string
    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.
    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.
    datasetId String
    The dataset ID.
    projectId String
    The ID of the project containing this table.
    tableId String
    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

    KmsKeyName string
    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.
    KmsKeyName string
    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.
    kmsKeyName String
    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.
    kmsKeyName string
    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_name str
    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.
    kmsKeyName String
    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-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi