1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. bigqueryanalyticshub
  6. QueryTemplate
Viewing docs for Google Cloud v9.32.1
published on Wednesday, Jul 29, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.32.1
published on Wednesday, Jul 29, 2026 by Pulumi

    Represents a BigQuery Query Template within a Data Exchange. This resource defines a reusable SQL routine (e.g., a TVF) that can be shared or executed via the Data Exchange.

    Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

    To get more information about QueryTemplate, see:

    Example Usage

    Bigquery Analyticshub Querytemplate Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const me = gcp.organizations.getClientOpenIdUserInfo({});
    const querytemplate = new gcp.bigqueryanalyticshub.DataExchange("querytemplate", {
        displayName: "My Audience Data Exchange",
        dataExchangeId: "my_data_exchange",
        description: "example of query template",
        location: "us",
        sharingEnvironmentConfig: {
            dcrExchangeConfig: {},
        },
    });
    const querytemplateQueryTemplate = new gcp.bigqueryanalyticshub.QueryTemplate("querytemplate", {
        location: "us",
        dataExchangeId: querytemplate.dataExchangeId,
        queryTemplateId: "my_query_template",
        displayName: "my_query_template",
        description: "example of query template",
        primaryContact: me.then(me => me.email),
        documentation: "This TVF takes a table t1 as input and returns all columns. Useful for basic data pass-through.",
        routine: {
            routineType: "TABLE_VALUED_FUNCTION",
            definitionBody: "my_query_template() as (select * from t1)",
        },
        submit: false,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    me = gcp.organizations.get_client_open_id_user_info()
    querytemplate = gcp.bigqueryanalyticshub.DataExchange("querytemplate",
        display_name="My Audience Data Exchange",
        data_exchange_id="my_data_exchange",
        description="example of query template",
        location="us",
        sharing_environment_config={
            "dcr_exchange_config": {},
        })
    querytemplate_query_template = gcp.bigqueryanalyticshub.QueryTemplate("querytemplate",
        location="us",
        data_exchange_id=querytemplate.data_exchange_id,
        query_template_id="my_query_template",
        display_name="my_query_template",
        description="example of query template",
        primary_contact=me.email,
        documentation="This TVF takes a table t1 as input and returns all columns. Useful for basic data pass-through.",
        routine={
            "routine_type": "TABLE_VALUED_FUNCTION",
            "definition_body": "my_query_template() as (select * from t1)",
        },
        submit=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigqueryanalyticshub"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		me, err := organizations.GetClientOpenIdUserInfo(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		querytemplate, err := bigqueryanalyticshub.NewDataExchange(ctx, "querytemplate", &bigqueryanalyticshub.DataExchangeArgs{
    			DisplayName:    pulumi.String("My Audience Data Exchange"),
    			DataExchangeId: pulumi.String("my_data_exchange"),
    			Description:    pulumi.String("example of query template"),
    			Location:       pulumi.String("us"),
    			SharingEnvironmentConfig: &bigqueryanalyticshub.DataExchangeSharingEnvironmentConfigArgs{
    				DcrExchangeConfig: &bigqueryanalyticshub.DataExchangeSharingEnvironmentConfigDcrExchangeConfigArgs{},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bigqueryanalyticshub.NewQueryTemplate(ctx, "querytemplate", &bigqueryanalyticshub.QueryTemplateArgs{
    			Location:        pulumi.String("us"),
    			DataExchangeId:  querytemplate.DataExchangeId,
    			QueryTemplateId: pulumi.String("my_query_template"),
    			DisplayName:     pulumi.String("my_query_template"),
    			Description:     pulumi.String("example of query template"),
    			PrimaryContact:  pulumi.String(me.Email),
    			Documentation:   pulumi.String("This TVF takes a table t1 as input and returns all columns. Useful for basic data pass-through."),
    			Routine: &bigqueryanalyticshub.QueryTemplateRoutineArgs{
    				RoutineType:    pulumi.String("TABLE_VALUED_FUNCTION"),
    				DefinitionBody: pulumi.String("my_query_template() as (select * from t1)"),
    			},
    			Submit: pulumi.Bool(false),
    		})
    		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 me = Gcp.Organizations.GetClientOpenIdUserInfo.Invoke();
    
        var querytemplate = new Gcp.BigQueryAnalyticsHub.DataExchange("querytemplate", new()
        {
            DisplayName = "My Audience Data Exchange",
            DataExchangeId = "my_data_exchange",
            Description = "example of query template",
            Location = "us",
            SharingEnvironmentConfig = new Gcp.BigQueryAnalyticsHub.Inputs.DataExchangeSharingEnvironmentConfigArgs
            {
                DcrExchangeConfig = null,
            },
        });
    
        var querytemplateQueryTemplate = new Gcp.BigQueryAnalyticsHub.QueryTemplate("querytemplate", new()
        {
            Location = "us",
            DataExchangeId = querytemplate.DataExchangeId,
            QueryTemplateId = "my_query_template",
            DisplayName = "my_query_template",
            Description = "example of query template",
            PrimaryContact = me.Apply(getClientOpenIdUserInfoResult => getClientOpenIdUserInfoResult.Email),
            Documentation = "This TVF takes a table t1 as input and returns all columns. Useful for basic data pass-through.",
            Routine = new Gcp.BigQueryAnalyticsHub.Inputs.QueryTemplateRoutineArgs
            {
                RoutineType = "TABLE_VALUED_FUNCTION",
                DefinitionBody = "my_query_template() as (select * from t1)",
            },
            Submit = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    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 com.pulumi.gcp.bigqueryanalyticshub.QueryTemplate;
    import com.pulumi.gcp.bigqueryanalyticshub.QueryTemplateArgs;
    import com.pulumi.gcp.bigqueryanalyticshub.inputs.QueryTemplateRoutineArgs;
    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) {
            final var me = OrganizationsFunctions.getClientOpenIdUserInfo(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
    
            var querytemplate = new DataExchange("querytemplate", DataExchangeArgs.builder()
                .displayName("My Audience Data Exchange")
                .dataExchangeId("my_data_exchange")
                .description("example of query template")
                .location("us")
                .sharingEnvironmentConfig(DataExchangeSharingEnvironmentConfigArgs.builder()
                    .dcrExchangeConfig(DataExchangeSharingEnvironmentConfigDcrExchangeConfigArgs.builder()
                        .build())
                    .build())
                .build());
    
            var querytemplateQueryTemplate = new QueryTemplate("querytemplateQueryTemplate", QueryTemplateArgs.builder()
                .location("us")
                .dataExchangeId(querytemplate.dataExchangeId())
                .queryTemplateId("my_query_template")
                .displayName("my_query_template")
                .description("example of query template")
                .primaryContact(me.email())
                .documentation("This TVF takes a table t1 as input and returns all columns. Useful for basic data pass-through.")
                .routine(QueryTemplateRoutineArgs.builder()
                    .routineType("TABLE_VALUED_FUNCTION")
                    .definitionBody("my_query_template() as (select * from t1)")
                    .build())
                .submit(false)
                .build());
    
        }
    }
    
    resources:
      querytemplate:
        type: gcp:bigqueryanalyticshub:DataExchange
        properties:
          displayName: My Audience Data Exchange
          dataExchangeId: my_data_exchange
          description: example of query template
          location: us
          sharingEnvironmentConfig:
            dcrExchangeConfig: {}
      querytemplateQueryTemplate:
        type: gcp:bigqueryanalyticshub:QueryTemplate
        name: querytemplate
        properties:
          location: us
          dataExchangeId: ${querytemplate.dataExchangeId}
          queryTemplateId: my_query_template
          displayName: my_query_template
          description: example of query template
          primaryContact: ${me.email}
          documentation: This TVF takes a table t1 as input and returns all columns. Useful for basic data pass-through.
          routine:
            routineType: TABLE_VALUED_FUNCTION
            definitionBody: my_query_template() as (select * from t1)
          submit: false
    variables:
      me:
        fn::invoke:
          function: gcp:organizations:getClientOpenIdUserInfo
          arguments: {}
    
    pulumi {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    data "gcp_organizations_getclientopeniduserinfo" "me" {
    }
    
    resource "gcp_bigqueryanalyticshub_dataexchange" "querytemplate" {
      display_name     = "My Audience Data Exchange"
      data_exchange_id = "my_data_exchange"
      description      = "example of query template"
      location         = "us"
      sharing_environment_config = {
        dcr_exchange_config = {}
      }
    }
    resource "gcp_bigqueryanalyticshub_querytemplate" "querytemplate" {
      location          = "us"
      data_exchange_id  = gcp_bigqueryanalyticshub_dataexchange.querytemplate.data_exchange_id
      query_template_id = "my_query_template"
      display_name      = "my_query_template"
      description       = "example of query template"
      primary_contact   = data.gcp_organizations_getclientopeniduserinfo.me.email
      documentation     = "This TVF takes a table t1 as input and returns all columns. Useful for basic data pass-through."
      routine = {
        routine_type    = "TABLE_VALUED_FUNCTION"
        definition_body = "my_query_template() as (select * from t1)"
      }
      submit = false
    }
    

    Create QueryTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new QueryTemplate(name: string, args: QueryTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def QueryTemplate(resource_name: str,
                      args: QueryTemplateArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def QueryTemplate(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      data_exchange_id: Optional[str] = None,
                      display_name: Optional[str] = None,
                      location: Optional[str] = None,
                      query_template_id: Optional[str] = None,
                      deletion_policy: Optional[str] = None,
                      description: Optional[str] = None,
                      documentation: Optional[str] = None,
                      primary_contact: Optional[str] = None,
                      project: Optional[str] = None,
                      routine: Optional[QueryTemplateRoutineArgs] = None,
                      submit: Optional[bool] = None)
    func NewQueryTemplate(ctx *Context, name string, args QueryTemplateArgs, opts ...ResourceOption) (*QueryTemplate, error)
    public QueryTemplate(string name, QueryTemplateArgs args, CustomResourceOptions? opts = null)
    public QueryTemplate(String name, QueryTemplateArgs args)
    public QueryTemplate(String name, QueryTemplateArgs args, CustomResourceOptions options)
    
    type: gcp:bigqueryanalyticshub:QueryTemplate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gcp_bigqueryanalyticshub_query_template" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args QueryTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args QueryTemplateArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args QueryTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args QueryTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args QueryTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var queryTemplateResource = new Gcp.BigQueryAnalyticsHub.QueryTemplate("queryTemplateResource", new()
    {
        DataExchangeId = "string",
        DisplayName = "string",
        Location = "string",
        QueryTemplateId = "string",
        DeletionPolicy = "string",
        Description = "string",
        Documentation = "string",
        PrimaryContact = "string",
        Project = "string",
        Routine = new Gcp.BigQueryAnalyticsHub.Inputs.QueryTemplateRoutineArgs
        {
            DefinitionBody = "string",
            RoutineType = "string",
        },
        Submit = false,
    });
    
    example, err := bigqueryanalyticshub.NewQueryTemplate(ctx, "queryTemplateResource", &bigqueryanalyticshub.QueryTemplateArgs{
    	DataExchangeId:  pulumi.String("string"),
    	DisplayName:     pulumi.String("string"),
    	Location:        pulumi.String("string"),
    	QueryTemplateId: pulumi.String("string"),
    	DeletionPolicy:  pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Documentation:   pulumi.String("string"),
    	PrimaryContact:  pulumi.String("string"),
    	Project:         pulumi.String("string"),
    	Routine: &bigqueryanalyticshub.QueryTemplateRoutineArgs{
    		DefinitionBody: pulumi.String("string"),
    		RoutineType:    pulumi.String("string"),
    	},
    	Submit: pulumi.Bool(false),
    })
    
    resource "gcp_bigqueryanalyticshub_query_template" "queryTemplateResource" {
      lifecycle {
        create_before_destroy = true
      }
      data_exchange_id  = "string"
      display_name      = "string"
      location          = "string"
      query_template_id = "string"
      deletion_policy   = "string"
      description       = "string"
      documentation     = "string"
      primary_contact   = "string"
      project           = "string"
      routine = {
        definition_body = "string"
        routine_type    = "string"
      }
      submit = false
    }
    
    var queryTemplateResource = new QueryTemplate("queryTemplateResource", QueryTemplateArgs.builder()
        .dataExchangeId("string")
        .displayName("string")
        .location("string")
        .queryTemplateId("string")
        .deletionPolicy("string")
        .description("string")
        .documentation("string")
        .primaryContact("string")
        .project("string")
        .routine(QueryTemplateRoutineArgs.builder()
            .definitionBody("string")
            .routineType("string")
            .build())
        .submit(false)
        .build());
    
    query_template_resource = gcp.bigqueryanalyticshub.QueryTemplate("queryTemplateResource",
        data_exchange_id="string",
        display_name="string",
        location="string",
        query_template_id="string",
        deletion_policy="string",
        description="string",
        documentation="string",
        primary_contact="string",
        project="string",
        routine={
            "definition_body": "string",
            "routine_type": "string",
        },
        submit=False)
    
    const queryTemplateResource = new gcp.bigqueryanalyticshub.QueryTemplate("queryTemplateResource", {
        dataExchangeId: "string",
        displayName: "string",
        location: "string",
        queryTemplateId: "string",
        deletionPolicy: "string",
        description: "string",
        documentation: "string",
        primaryContact: "string",
        project: "string",
        routine: {
            definitionBody: "string",
            routineType: "string",
        },
        submit: false,
    });
    
    type: gcp:bigqueryanalyticshub:QueryTemplate
    properties:
        dataExchangeId: string
        deletionPolicy: string
        description: string
        displayName: string
        documentation: string
        location: string
        primaryContact: string
        project: string
        queryTemplateId: string
        routine:
            definitionBody: string
            routineType: string
        submit: false
    

    QueryTemplate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The QueryTemplate resource accepts the following input properties:

    DataExchangeId 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.
    DisplayName string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    Location string
    The name of the location this data exchange query template.
    QueryTemplateId string
    Unique QueryTemplate ID.
    DeletionPolicy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    Description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    Documentation string
    Documentation describing the QueryTemplate.
    PrimaryContact string
    Email or URL of the primary point of contact of the QueryTemplate.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Routine QueryTemplateRoutine
    The routine associated with the QueryTemplate. Structure is documented below.
    Submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    DataExchangeId 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.
    DisplayName string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    Location string
    The name of the location this data exchange query template.
    QueryTemplateId string
    Unique QueryTemplate ID.
    DeletionPolicy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    Description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    Documentation string
    Documentation describing the QueryTemplate.
    PrimaryContact string
    Email or URL of the primary point of contact of the QueryTemplate.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Routine QueryTemplateRoutineArgs
    The routine associated with the QueryTemplate. Structure is documented below.
    Submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    data_exchange_id 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.
    display_name string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    location string
    The name of the location this data exchange query template.
    query_template_id string
    Unique QueryTemplate ID.
    deletion_policy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    documentation string
    Documentation describing the QueryTemplate.
    primary_contact string
    Email or URL of the primary point of contact of the QueryTemplate.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routine object
    The routine associated with the QueryTemplate. Structure is documented below.
    submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    dataExchangeId 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.
    displayName String
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    location String
    The name of the location this data exchange query template.
    queryTemplateId String
    Unique QueryTemplate ID.
    deletionPolicy String
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description String
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    documentation String
    Documentation describing the QueryTemplate.
    primaryContact String
    Email or URL of the primary point of contact of the QueryTemplate.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routine QueryTemplateRoutine
    The routine associated with the QueryTemplate. Structure is documented below.
    submit Boolean
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    dataExchangeId 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.
    displayName string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    location string
    The name of the location this data exchange query template.
    queryTemplateId string
    Unique QueryTemplate ID.
    deletionPolicy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    documentation string
    Documentation describing the QueryTemplate.
    primaryContact string
    Email or URL of the primary point of contact of the QueryTemplate.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routine QueryTemplateRoutine
    The routine associated with the QueryTemplate. Structure is documented below.
    submit boolean
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    data_exchange_id str
    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.
    display_name str
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    location str
    The name of the location this data exchange query template.
    query_template_id str
    Unique QueryTemplate ID.
    deletion_policy str
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description str
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    documentation str
    Documentation describing the QueryTemplate.
    primary_contact str
    Email or URL of the primary point of contact of the QueryTemplate.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routine QueryTemplateRoutineArgs
    The routine associated with the QueryTemplate. Structure is documented below.
    submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    dataExchangeId 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.
    displayName String
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    location String
    The name of the location this data exchange query template.
    queryTemplateId String
    Unique QueryTemplate ID.
    deletionPolicy String
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description String
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    documentation String
    Documentation describing the QueryTemplate.
    primaryContact String
    Email or URL of the primary point of contact of the QueryTemplate.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routine Property Map
    The routine associated with the QueryTemplate. Structure is documented below.
    submit Boolean
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the QueryTemplate resource produces the following output properties:

    CreateTime string
    Timestamp when the QueryTemplate was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    State string
    The QueryTemplate lifecycle state.
    UpdateTime string
    Timestamp when the QueryTemplate was last modified.
    CreateTime string
    Timestamp when the QueryTemplate was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    State string
    The QueryTemplate lifecycle state.
    UpdateTime string
    Timestamp when the QueryTemplate was last modified.
    create_time string
    Timestamp when the QueryTemplate was created.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    state string
    The QueryTemplate lifecycle state.
    update_time string
    Timestamp when the QueryTemplate was last modified.
    createTime String
    Timestamp when the QueryTemplate was created.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    state String
    The QueryTemplate lifecycle state.
    updateTime String
    Timestamp when the QueryTemplate was last modified.
    createTime string
    Timestamp when the QueryTemplate was created.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    state string
    The QueryTemplate lifecycle state.
    updateTime string
    Timestamp when the QueryTemplate was last modified.
    create_time str
    Timestamp when the QueryTemplate was created.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    state str
    The QueryTemplate lifecycle state.
    update_time str
    Timestamp when the QueryTemplate was last modified.
    createTime String
    Timestamp when the QueryTemplate was created.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    state String
    The QueryTemplate lifecycle state.
    updateTime String
    Timestamp when the QueryTemplate was last modified.

    Look up Existing QueryTemplate Resource

    Get an existing QueryTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: QueryTemplateState, opts?: CustomResourceOptions): QueryTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            data_exchange_id: Optional[str] = None,
            deletion_policy: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            documentation: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            primary_contact: Optional[str] = None,
            project: Optional[str] = None,
            query_template_id: Optional[str] = None,
            routine: Optional[QueryTemplateRoutineArgs] = None,
            state: Optional[str] = None,
            submit: Optional[bool] = None,
            update_time: Optional[str] = None) -> QueryTemplate
    func GetQueryTemplate(ctx *Context, name string, id IDInput, state *QueryTemplateState, opts ...ResourceOption) (*QueryTemplate, error)
    public static QueryTemplate Get(string name, Input<string> id, QueryTemplateState? state, CustomResourceOptions? opts = null)
    public static QueryTemplate get(String name, Output<String> id, QueryTemplateState state, CustomResourceOptions options)
    resources:  _:    type: gcp:bigqueryanalyticshub:QueryTemplate    get:      id: ${id}
    import {
      to = gcp_bigqueryanalyticshub_query_template.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreateTime string
    Timestamp when the QueryTemplate was created.
    DataExchangeId 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.
    DeletionPolicy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    Description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    DisplayName string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    Documentation string
    Documentation describing the QueryTemplate.
    Location string
    The name of the location this data exchange query template.
    Name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    PrimaryContact string
    Email or URL of the primary point of contact of the QueryTemplate.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    QueryTemplateId string
    Unique QueryTemplate ID.
    Routine QueryTemplateRoutine
    The routine associated with the QueryTemplate. Structure is documented below.
    State string
    The QueryTemplate lifecycle state.
    Submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    UpdateTime string
    Timestamp when the QueryTemplate was last modified.
    CreateTime string
    Timestamp when the QueryTemplate was created.
    DataExchangeId 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.
    DeletionPolicy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    Description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    DisplayName string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    Documentation string
    Documentation describing the QueryTemplate.
    Location string
    The name of the location this data exchange query template.
    Name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    PrimaryContact string
    Email or URL of the primary point of contact of the QueryTemplate.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    QueryTemplateId string
    Unique QueryTemplate ID.
    Routine QueryTemplateRoutineArgs
    The routine associated with the QueryTemplate. Structure is documented below.
    State string
    The QueryTemplate lifecycle state.
    Submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    UpdateTime string
    Timestamp when the QueryTemplate was last modified.
    create_time string
    Timestamp when the QueryTemplate was created.
    data_exchange_id 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.
    deletion_policy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    display_name string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    documentation string
    Documentation describing the QueryTemplate.
    location string
    The name of the location this data exchange query template.
    name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    primary_contact string
    Email or URL of the primary point of contact of the QueryTemplate.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    query_template_id string
    Unique QueryTemplate ID.
    routine object
    The routine associated with the QueryTemplate. Structure is documented below.
    state string
    The QueryTemplate lifecycle state.
    submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    update_time string
    Timestamp when the QueryTemplate was last modified.
    createTime String
    Timestamp when the QueryTemplate was created.
    dataExchangeId 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.
    deletionPolicy String
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description String
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    displayName String
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    documentation String
    Documentation describing the QueryTemplate.
    location String
    The name of the location this data exchange query template.
    name String
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    primaryContact String
    Email or URL of the primary point of contact of the QueryTemplate.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    queryTemplateId String
    Unique QueryTemplate ID.
    routine QueryTemplateRoutine
    The routine associated with the QueryTemplate. Structure is documented below.
    state String
    The QueryTemplate lifecycle state.
    submit Boolean
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    updateTime String
    Timestamp when the QueryTemplate was last modified.
    createTime string
    Timestamp when the QueryTemplate was created.
    dataExchangeId 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.
    deletionPolicy string
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description string
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    displayName string
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    documentation string
    Documentation describing the QueryTemplate.
    location string
    The name of the location this data exchange query template.
    name string
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    primaryContact string
    Email or URL of the primary point of contact of the QueryTemplate.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    queryTemplateId string
    Unique QueryTemplate ID.
    routine QueryTemplateRoutine
    The routine associated with the QueryTemplate. Structure is documented below.
    state string
    The QueryTemplate lifecycle state.
    submit boolean
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    updateTime string
    Timestamp when the QueryTemplate was last modified.
    create_time str
    Timestamp when the QueryTemplate was created.
    data_exchange_id str
    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.
    deletion_policy str
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description str
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    display_name str
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    documentation str
    Documentation describing the QueryTemplate.
    location str
    The name of the location this data exchange query template.
    name str
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    primary_contact str
    Email or URL of the primary point of contact of the QueryTemplate.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    query_template_id str
    Unique QueryTemplate ID.
    routine QueryTemplateRoutineArgs
    The routine associated with the QueryTemplate. Structure is documented below.
    state str
    The QueryTemplate lifecycle state.
    submit bool
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    update_time str
    Timestamp when the QueryTemplate was last modified.
    createTime String
    Timestamp when the QueryTemplate was created.
    dataExchangeId 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.
    deletionPolicy String
    Sets the policy for deleting the QueryTemplate. Defaults to DELETE_IF_DRAFTED.

    • ABANDON: Untracks the resource from Terraform state but leaves it intact in BigQuery.
    • DELETE: Deletes the QueryTemplate from BigQuery.
    • DELETE_IF_DRAFTED: Deletes the QueryTemplate only if it is in a DRAFTED state; otherwise, it abandons it.
    • PREVENT: Prevents deletion of the QueryTemplate.
    description String
    Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs, new lines, carriage returns, and page breaks. Default value is an empty string. Max length: 2000 bytes.
    displayName String
    Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string.
    documentation String
    Documentation describing the QueryTemplate.
    location String
    The name of the location this data exchange query template.
    name String
    The resource name of the QueryTemplate. e.g. projects/myproject/locations/us/dataExchanges/123/queryTemplates/456
    primaryContact String
    Email or URL of the primary point of contact of the QueryTemplate.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    queryTemplateId String
    Unique QueryTemplate ID.
    routine Property Map
    The routine associated with the QueryTemplate. Structure is documented below.
    state String
    The QueryTemplate lifecycle state.
    submit Boolean
    If set to true, the QueryTemplate will be submitted for approval and cannot be updated afterwards. This is a one-time action.
    updateTime String
    Timestamp when the QueryTemplate was last modified.

    Supporting Types

    QueryTemplateRoutine, QueryTemplateRoutineArgs

    DefinitionBody string
    SQL query logic.
    RoutineType string
    Type of routine (e.g., TABLE_VALUED_FUNCTION). Possible values are: TABLE_VALUED_FUNCTION.
    DefinitionBody string
    SQL query logic.
    RoutineType string
    Type of routine (e.g., TABLE_VALUED_FUNCTION). Possible values are: TABLE_VALUED_FUNCTION.
    definition_body string
    SQL query logic.
    routine_type string
    Type of routine (e.g., TABLE_VALUED_FUNCTION). Possible values are: TABLE_VALUED_FUNCTION.
    definitionBody String
    SQL query logic.
    routineType String
    Type of routine (e.g., TABLE_VALUED_FUNCTION). Possible values are: TABLE_VALUED_FUNCTION.
    definitionBody string
    SQL query logic.
    routineType string
    Type of routine (e.g., TABLE_VALUED_FUNCTION). Possible values are: TABLE_VALUED_FUNCTION.
    definition_body str
    SQL query logic.
    routine_type str
    Type of routine (e.g., TABLE_VALUED_FUNCTION). Possible values are: TABLE_VALUED_FUNCTION.
    definitionBody String
    SQL query logic.
    routineType String
    Type of routine (e.g., TABLE_VALUED_FUNCTION). Possible values are: TABLE_VALUED_FUNCTION.

    Import

    QueryTemplate can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/queryTemplates/{{query_template_id}}
    • {{project}}/{{location}}/{{data_exchange_id}}/{{query_template_id}}
    • {{location}}/{{data_exchange_id}}/{{query_template_id}}

    When using the pulumi import command, QueryTemplate can be imported using one of the formats above. For example:

    $ pulumi import gcp:bigqueryanalyticshub/queryTemplate:QueryTemplate default projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/queryTemplates/{{query_template_id}}
    $ pulumi import gcp:bigqueryanalyticshub/queryTemplate:QueryTemplate default {{project}}/{{location}}/{{data_exchange_id}}/{{query_template_id}}
    $ pulumi import gcp:bigqueryanalyticshub/queryTemplate:QueryTemplate default {{location}}/{{data_exchange_id}}/{{query_template_id}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    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
    Viewing docs for Google Cloud v9.32.1
    published on Wednesday, Jul 29, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial