Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi
gcp.bigquery.getTables
Explore with Pulumi AI
Get a list of tables in 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 tables = gcp.bigquery.getTables({
datasetId: "my-bq-dataset",
project: "my-project",
});
import pulumi
import pulumi_gcp as gcp
tables = gcp.bigquery.get_tables(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.GetTables(ctx, &bigquery.GetTablesArgs{
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 tables = Gcp.BigQuery.GetTables.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.GetTablesArgs;
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 tables = BigqueryFunctions.getTables(GetTablesArgs.builder()
.datasetId("my-bq-dataset")
.project("my-project")
.build());
}
}
variables:
tables:
fn::invoke:
Function: gcp:bigquery:getTables
Arguments:
datasetId: my-bq-dataset
project: my-project
Using getTables
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 getTables(args: GetTablesArgs, opts?: InvokeOptions): Promise<GetTablesResult>
function getTablesOutput(args: GetTablesOutputArgs, opts?: InvokeOptions): Output<GetTablesResult>
def get_tables(dataset_id: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTablesResult
def get_tables_output(dataset_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTablesResult]
func GetTables(ctx *Context, args *GetTablesArgs, opts ...InvokeOption) (*GetTablesResult, error)
func GetTablesOutput(ctx *Context, args *GetTablesOutputArgs, opts ...InvokeOption) GetTablesResultOutput
> Note: This function is named GetTables
in the Go SDK.
public static class GetTables
{
public static Task<GetTablesResult> InvokeAsync(GetTablesArgs args, InvokeOptions? opts = null)
public static Output<GetTablesResult> Invoke(GetTablesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTablesResult> getTables(GetTablesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:bigquery/getTables:getTables
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.
getTables Result
The following output properties are available:
- Dataset
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Tables
List<Get
Tables Table> - A list of all retrieved BigQuery tables. Structure is defined below.
- Project string
- Dataset
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Tables
[]Get
Tables Table - A list of all retrieved BigQuery tables. Structure is defined below.
- Project string
- dataset
Id String - id String
- The provider-assigned unique ID for this managed resource.
- tables
List<Get
Tables Table> - A list of all retrieved BigQuery tables. Structure is defined below.
- project String
- dataset
Id string - id string
- The provider-assigned unique ID for this managed resource.
- tables
Get
Tables Table[] - A list of all retrieved BigQuery tables. Structure is defined below.
- project string
- dataset_
id str - id str
- The provider-assigned unique ID for this managed resource.
- tables
Sequence[Get
Tables Table] - A list of all retrieved BigQuery tables. Structure is defined below.
- project str
- dataset
Id String - id String
- The provider-assigned unique ID for this managed resource.
- tables List<Property Map>
- A list of all retrieved BigQuery tables. Structure is defined below.
- project String
Supporting Types
GetTablesTable
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.