1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. bigquery
  5. Routine
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.bigquery.Routine

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    A user-defined function or a stored procedure that belongs to a Dataset

    To get more information about Routine, see:

    Example Usage

    Big Query Routine Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Gcp.BigQuery.Dataset("test", new()
        {
            DatasetId = "dataset_id",
        });
    
        var sproc = new Gcp.BigQuery.Routine("sproc", new()
        {
            DatasetId = test.DatasetId,
            RoutineId = "routine_id",
            RoutineType = "PROCEDURE",
            Language = "SQL",
            DefinitionBody = "CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);",
        });
    
    });
    
    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 {
    		test, err := bigquery.NewDataset(ctx, "test", &bigquery.DatasetArgs{
    			DatasetId: pulumi.String("dataset_id"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bigquery.NewRoutine(ctx, "sproc", &bigquery.RoutineArgs{
    			DatasetId:      test.DatasetId,
    			RoutineId:      pulumi.String("routine_id"),
    			RoutineType:    pulumi.String("PROCEDURE"),
    			Language:       pulumi.String("SQL"),
    			DefinitionBody: pulumi.String("CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Dataset;
    import com.pulumi.gcp.bigquery.DatasetArgs;
    import com.pulumi.gcp.bigquery.Routine;
    import com.pulumi.gcp.bigquery.RoutineArgs;
    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) {
            var test = new Dataset("test", DatasetArgs.builder()        
                .datasetId("dataset_id")
                .build());
    
            var sproc = new Routine("sproc", RoutineArgs.builder()        
                .datasetId(test.datasetId())
                .routineId("routine_id")
                .routineType("PROCEDURE")
                .language("SQL")
                .definitionBody("CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    test = gcp.bigquery.Dataset("test", dataset_id="dataset_id")
    sproc = gcp.bigquery.Routine("sproc",
        dataset_id=test.dataset_id,
        routine_id="routine_id",
        routine_type="PROCEDURE",
        language="SQL",
        definition_body="CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const test = new gcp.bigquery.Dataset("test", {datasetId: "dataset_id"});
    const sproc = new gcp.bigquery.Routine("sproc", {
        datasetId: test.datasetId,
        routineId: "routine_id",
        routineType: "PROCEDURE",
        language: "SQL",
        definitionBody: "CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);",
    });
    
    resources:
      test:
        type: gcp:bigquery:Dataset
        properties:
          datasetId: dataset_id
      sproc:
        type: gcp:bigquery:Routine
        properties:
          datasetId: ${test.datasetId}
          routineId: routine_id
          routineType: PROCEDURE
          language: SQL
          definitionBody: CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);
    

    Big Query Routine Json

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Gcp.BigQuery.Dataset("test", new()
        {
            DatasetId = "dataset_id",
        });
    
        var sproc = new Gcp.BigQuery.Routine("sproc", new()
        {
            DatasetId = test.DatasetId,
            RoutineId = "routine_id",
            RoutineType = "SCALAR_FUNCTION",
            Language = "JAVASCRIPT",
            DefinitionBody = "CREATE FUNCTION multiplyInputs return x*y;",
            Arguments = new[]
            {
                new Gcp.BigQuery.Inputs.RoutineArgumentArgs
                {
                    Name = "x",
                    DataType = "{\"typeKind\" :  \"FLOAT64\"}",
                },
                new Gcp.BigQuery.Inputs.RoutineArgumentArgs
                {
                    Name = "y",
                    DataType = "{\"typeKind\" :  \"FLOAT64\"}",
                },
            },
            ReturnType = "{\"typeKind\" :  \"FLOAT64\"}",
        });
    
    });
    
    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 {
    		test, err := bigquery.NewDataset(ctx, "test", &bigquery.DatasetArgs{
    			DatasetId: pulumi.String("dataset_id"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bigquery.NewRoutine(ctx, "sproc", &bigquery.RoutineArgs{
    			DatasetId:      test.DatasetId,
    			RoutineId:      pulumi.String("routine_id"),
    			RoutineType:    pulumi.String("SCALAR_FUNCTION"),
    			Language:       pulumi.String("JAVASCRIPT"),
    			DefinitionBody: pulumi.String("CREATE FUNCTION multiplyInputs return x*y;"),
    			Arguments: bigquery.RoutineArgumentArray{
    				&bigquery.RoutineArgumentArgs{
    					Name:     pulumi.String("x"),
    					DataType: pulumi.String("{\"typeKind\" :  \"FLOAT64\"}"),
    				},
    				&bigquery.RoutineArgumentArgs{
    					Name:     pulumi.String("y"),
    					DataType: pulumi.String("{\"typeKind\" :  \"FLOAT64\"}"),
    				},
    			},
    			ReturnType: pulumi.String("{\"typeKind\" :  \"FLOAT64\"}"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Dataset;
    import com.pulumi.gcp.bigquery.DatasetArgs;
    import com.pulumi.gcp.bigquery.Routine;
    import com.pulumi.gcp.bigquery.RoutineArgs;
    import com.pulumi.gcp.bigquery.inputs.RoutineArgumentArgs;
    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) {
            var test = new Dataset("test", DatasetArgs.builder()        
                .datasetId("dataset_id")
                .build());
    
            var sproc = new Routine("sproc", RoutineArgs.builder()        
                .datasetId(test.datasetId())
                .routineId("routine_id")
                .routineType("SCALAR_FUNCTION")
                .language("JAVASCRIPT")
                .definitionBody("CREATE FUNCTION multiplyInputs return x*y;")
                .arguments(            
                    RoutineArgumentArgs.builder()
                        .name("x")
                        .dataType("{\"typeKind\" :  \"FLOAT64\"}")
                        .build(),
                    RoutineArgumentArgs.builder()
                        .name("y")
                        .dataType("{\"typeKind\" :  \"FLOAT64\"}")
                        .build())
                .returnType("{\"typeKind\" :  \"FLOAT64\"}")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    test = gcp.bigquery.Dataset("test", dataset_id="dataset_id")
    sproc = gcp.bigquery.Routine("sproc",
        dataset_id=test.dataset_id,
        routine_id="routine_id",
        routine_type="SCALAR_FUNCTION",
        language="JAVASCRIPT",
        definition_body="CREATE FUNCTION multiplyInputs return x*y;",
        arguments=[
            gcp.bigquery.RoutineArgumentArgs(
                name="x",
                data_type="{\"typeKind\" :  \"FLOAT64\"}",
            ),
            gcp.bigquery.RoutineArgumentArgs(
                name="y",
                data_type="{\"typeKind\" :  \"FLOAT64\"}",
            ),
        ],
        return_type="{\"typeKind\" :  \"FLOAT64\"}")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const test = new gcp.bigquery.Dataset("test", {datasetId: "dataset_id"});
    const sproc = new gcp.bigquery.Routine("sproc", {
        datasetId: test.datasetId,
        routineId: "routine_id",
        routineType: "SCALAR_FUNCTION",
        language: "JAVASCRIPT",
        definitionBody: "CREATE FUNCTION multiplyInputs return x*y;",
        arguments: [
            {
                name: "x",
                dataType: "{\"typeKind\" :  \"FLOAT64\"}",
            },
            {
                name: "y",
                dataType: "{\"typeKind\" :  \"FLOAT64\"}",
            },
        ],
        returnType: "{\"typeKind\" :  \"FLOAT64\"}",
    });
    
    resources:
      test:
        type: gcp:bigquery:Dataset
        properties:
          datasetId: dataset_id
      sproc:
        type: gcp:bigquery:Routine
        properties:
          datasetId: ${test.datasetId}
          routineId: routine_id
          routineType: SCALAR_FUNCTION
          language: JAVASCRIPT
          definitionBody: CREATE FUNCTION multiplyInputs return x*y;
          arguments:
            - name: x
              dataType: '{"typeKind" :  "FLOAT64"}'
            - name: y
              dataType: '{"typeKind" :  "FLOAT64"}'
          returnType: '{"typeKind" :  "FLOAT64"}'
    

    Big Query Routine Tvf

    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Gcp.BigQuery.Dataset("test", new()
        {
            DatasetId = "dataset_id",
        });
    
        var sproc = new Gcp.BigQuery.Routine("sproc", new()
        {
            DatasetId = test.DatasetId,
            RoutineId = "routine_id",
            RoutineType = "TABLE_VALUED_FUNCTION",
            Language = "SQL",
            DefinitionBody = @"SELECT 1 + value AS value
    ",
            Arguments = new[]
            {
                new Gcp.BigQuery.Inputs.RoutineArgumentArgs
                {
                    Name = "value",
                    ArgumentKind = "FIXED_TYPE",
                    DataType = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["typeKind"] = "INT64",
                    }),
                },
            },
            ReturnTableType = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["columns"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["name"] = "value",
                        ["type"] = new Dictionary<string, object?>
                        {
                            ["typeKind"] = "INT64",
                        },
                    },
                },
            }),
        });
    
    });
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		test, err := bigquery.NewDataset(ctx, "test", &bigquery.DatasetArgs{
    			DatasetId: pulumi.String("dataset_id"),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"typeKind": "INT64",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		tmpJSON1, err := json.Marshal(map[string]interface{}{
    			"columns": []map[string]interface{}{
    				map[string]interface{}{
    					"name": "value",
    					"type": map[string]interface{}{
    						"typeKind": "INT64",
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json1 := string(tmpJSON1)
    		_, err = bigquery.NewRoutine(ctx, "sproc", &bigquery.RoutineArgs{
    			DatasetId:      test.DatasetId,
    			RoutineId:      pulumi.String("routine_id"),
    			RoutineType:    pulumi.String("TABLE_VALUED_FUNCTION"),
    			Language:       pulumi.String("SQL"),
    			DefinitionBody: pulumi.String("SELECT 1 + value AS value\n"),
    			Arguments: bigquery.RoutineArgumentArray{
    				&bigquery.RoutineArgumentArgs{
    					Name:         pulumi.String("value"),
    					ArgumentKind: pulumi.String("FIXED_TYPE"),
    					DataType:     pulumi.String(json0),
    				},
    			},
    			ReturnTableType: pulumi.String(json1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Dataset;
    import com.pulumi.gcp.bigquery.DatasetArgs;
    import com.pulumi.gcp.bigquery.Routine;
    import com.pulumi.gcp.bigquery.RoutineArgs;
    import com.pulumi.gcp.bigquery.inputs.RoutineArgumentArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            var test = new Dataset("test", DatasetArgs.builder()        
                .datasetId("dataset_id")
                .build());
    
            var sproc = new Routine("sproc", RoutineArgs.builder()        
                .datasetId(test.datasetId())
                .routineId("routine_id")
                .routineType("TABLE_VALUED_FUNCTION")
                .language("SQL")
                .definitionBody("""
    SELECT 1 + value AS value
                """)
                .arguments(RoutineArgumentArgs.builder()
                    .name("value")
                    .argumentKind("FIXED_TYPE")
                    .dataType(serializeJson(
                        jsonObject(
                            jsonProperty("typeKind", "INT64")
                        )))
                    .build())
                .returnTableType(serializeJson(
                    jsonObject(
                        jsonProperty("columns", jsonArray(jsonObject(
                            jsonProperty("name", "value"),
                            jsonProperty("type", jsonObject(
                                jsonProperty("typeKind", "INT64")
                            ))
                        )))
                    )))
                .build());
    
        }
    }
    
    import pulumi
    import json
    import pulumi_gcp as gcp
    
    test = gcp.bigquery.Dataset("test", dataset_id="dataset_id")
    sproc = gcp.bigquery.Routine("sproc",
        dataset_id=test.dataset_id,
        routine_id="routine_id",
        routine_type="TABLE_VALUED_FUNCTION",
        language="SQL",
        definition_body="SELECT 1 + value AS value\n",
        arguments=[gcp.bigquery.RoutineArgumentArgs(
            name="value",
            argument_kind="FIXED_TYPE",
            data_type=json.dumps({
                "typeKind": "INT64",
            }),
        )],
        return_table_type=json.dumps({
            "columns": [{
                "name": "value",
                "type": {
                    "typeKind": "INT64",
                },
            }],
        }))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const test = new gcp.bigquery.Dataset("test", {datasetId: "dataset_id"});
    const sproc = new gcp.bigquery.Routine("sproc", {
        datasetId: test.datasetId,
        routineId: "routine_id",
        routineType: "TABLE_VALUED_FUNCTION",
        language: "SQL",
        definitionBody: "SELECT 1 + value AS value\n",
        arguments: [{
            name: "value",
            argumentKind: "FIXED_TYPE",
            dataType: JSON.stringify({
                typeKind: "INT64",
            }),
        }],
        returnTableType: JSON.stringify({
            columns: [{
                name: "value",
                type: {
                    typeKind: "INT64",
                },
            }],
        }),
    });
    
    resources:
      test:
        type: gcp:bigquery:Dataset
        properties:
          datasetId: dataset_id
      sproc:
        type: gcp:bigquery:Routine
        properties:
          datasetId: ${test.datasetId}
          routineId: routine_id
          routineType: TABLE_VALUED_FUNCTION
          language: SQL
          definitionBody: |
            SELECT 1 + value AS value        
          arguments:
            - name: value
              argumentKind: FIXED_TYPE
              dataType:
                fn::toJSON:
                  typeKind: INT64
          returnTableType:
            fn::toJSON:
              columns:
                - name: value
                  type:
                    typeKind: INT64
    

    Create Routine Resource

    new Routine(name: string, args: RoutineArgs, opts?: CustomResourceOptions);
    @overload
    def Routine(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                arguments: Optional[Sequence[RoutineArgumentArgs]] = None,
                dataset_id: Optional[str] = None,
                definition_body: Optional[str] = None,
                description: Optional[str] = None,
                determinism_level: Optional[str] = None,
                imported_libraries: Optional[Sequence[str]] = None,
                language: Optional[str] = None,
                project: Optional[str] = None,
                return_table_type: Optional[str] = None,
                return_type: Optional[str] = None,
                routine_id: Optional[str] = None,
                routine_type: Optional[str] = None)
    @overload
    def Routine(resource_name: str,
                args: RoutineArgs,
                opts: Optional[ResourceOptions] = None)
    func NewRoutine(ctx *Context, name string, args RoutineArgs, opts ...ResourceOption) (*Routine, error)
    public Routine(string name, RoutineArgs args, CustomResourceOptions? opts = null)
    public Routine(String name, RoutineArgs args)
    public Routine(String name, RoutineArgs args, CustomResourceOptions options)
    
    type: gcp:bigquery:Routine
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RoutineArgs
    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 RoutineArgs
    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 RoutineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoutineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoutineArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Routine Resource Properties

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

    Inputs

    The Routine resource accepts the following input properties:

    DatasetId string

    The ID of the dataset containing this routine

    DefinitionBody string

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    RoutineId string

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    RoutineType string

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    Arguments List<RoutineArgument>

    Input/output argument of a function or a stored procedure. Structure is documented below.

    Description string

    The description of the routine if defined.

    DeterminismLevel string

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    ImportedLibraries List<string>

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    Language string

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    ReturnTableType string

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    ReturnType string

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    DatasetId string

    The ID of the dataset containing this routine

    DefinitionBody string

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    RoutineId string

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    RoutineType string

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    Arguments []RoutineArgumentArgs

    Input/output argument of a function or a stored procedure. Structure is documented below.

    Description string

    The description of the routine if defined.

    DeterminismLevel string

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    ImportedLibraries []string

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    Language string

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    ReturnTableType string

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    ReturnType string

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    datasetId String

    The ID of the dataset containing this routine

    definitionBody String

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    routineId String

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routineType String

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments List<RoutineArgument>

    Input/output argument of a function or a stored procedure. Structure is documented below.

    description String

    The description of the routine if defined.

    determinismLevel String

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    importedLibraries List<String>

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language String

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    returnTableType String

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    returnType String

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    datasetId string

    The ID of the dataset containing this routine

    definitionBody string

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    routineId string

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routineType string

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments RoutineArgument[]

    Input/output argument of a function or a stored procedure. Structure is documented below.

    description string

    The description of the routine if defined.

    determinismLevel string

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    importedLibraries string[]

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language string

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    returnTableType string

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    returnType string

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    dataset_id str

    The ID of the dataset containing this routine

    definition_body str

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    routine_id str

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routine_type str

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments Sequence[RoutineArgumentArgs]

    Input/output argument of a function or a stored procedure. Structure is documented below.

    description str

    The description of the routine if defined.

    determinism_level str

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    imported_libraries Sequence[str]

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language str

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    return_table_type str

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    return_type str

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    datasetId String

    The ID of the dataset containing this routine

    definitionBody String

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    routineId String

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routineType String

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments List<Property Map>

    Input/output argument of a function or a stored procedure. Structure is documented below.

    description String

    The description of the routine if defined.

    determinismLevel String

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    importedLibraries List<String>

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language String

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    returnTableType String

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    returnType String

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    Outputs

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

    CreationTime int

    The time when this routine was created, in milliseconds since the epoch.

    Id string

    The provider-assigned unique ID for this managed resource.

    LastModifiedTime int

    The time when this routine was modified, in milliseconds since the epoch.

    CreationTime int

    The time when this routine was created, in milliseconds since the epoch.

    Id string

    The provider-assigned unique ID for this managed resource.

    LastModifiedTime int

    The time when this routine was modified, in milliseconds since the epoch.

    creationTime Integer

    The time when this routine was created, in milliseconds since the epoch.

    id String

    The provider-assigned unique ID for this managed resource.

    lastModifiedTime Integer

    The time when this routine was modified, in milliseconds since the epoch.

    creationTime number

    The time when this routine was created, in milliseconds since the epoch.

    id string

    The provider-assigned unique ID for this managed resource.

    lastModifiedTime number

    The time when this routine was modified, in milliseconds since the epoch.

    creation_time int

    The time when this routine was created, in milliseconds since the epoch.

    id str

    The provider-assigned unique ID for this managed resource.

    last_modified_time int

    The time when this routine was modified, in milliseconds since the epoch.

    creationTime Number

    The time when this routine was created, in milliseconds since the epoch.

    id String

    The provider-assigned unique ID for this managed resource.

    lastModifiedTime Number

    The time when this routine was modified, in milliseconds since the epoch.

    Look up Existing Routine Resource

    Get an existing Routine 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?: RoutineState, opts?: CustomResourceOptions): Routine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arguments: Optional[Sequence[RoutineArgumentArgs]] = None,
            creation_time: Optional[int] = None,
            dataset_id: Optional[str] = None,
            definition_body: Optional[str] = None,
            description: Optional[str] = None,
            determinism_level: Optional[str] = None,
            imported_libraries: Optional[Sequence[str]] = None,
            language: Optional[str] = None,
            last_modified_time: Optional[int] = None,
            project: Optional[str] = None,
            return_table_type: Optional[str] = None,
            return_type: Optional[str] = None,
            routine_id: Optional[str] = None,
            routine_type: Optional[str] = None) -> Routine
    func GetRoutine(ctx *Context, name string, id IDInput, state *RoutineState, opts ...ResourceOption) (*Routine, error)
    public static Routine Get(string name, Input<string> id, RoutineState? state, CustomResourceOptions? opts = null)
    public static Routine get(String name, Output<String> id, RoutineState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Arguments List<RoutineArgument>

    Input/output argument of a function or a stored procedure. Structure is documented below.

    CreationTime int

    The time when this routine was created, in milliseconds since the epoch.

    DatasetId string

    The ID of the dataset containing this routine

    DefinitionBody string

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    Description string

    The description of the routine if defined.

    DeterminismLevel string

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    ImportedLibraries List<string>

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    Language string

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    LastModifiedTime int

    The time when this routine was modified, in milliseconds since the epoch.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    ReturnTableType string

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    ReturnType string

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    RoutineId string

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    RoutineType string

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    Arguments []RoutineArgumentArgs

    Input/output argument of a function or a stored procedure. Structure is documented below.

    CreationTime int

    The time when this routine was created, in milliseconds since the epoch.

    DatasetId string

    The ID of the dataset containing this routine

    DefinitionBody string

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    Description string

    The description of the routine if defined.

    DeterminismLevel string

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    ImportedLibraries []string

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    Language string

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    LastModifiedTime int

    The time when this routine was modified, in milliseconds since the epoch.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    ReturnTableType string

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    ReturnType string

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    RoutineId string

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    RoutineType string

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments List<RoutineArgument>

    Input/output argument of a function or a stored procedure. Structure is documented below.

    creationTime Integer

    The time when this routine was created, in milliseconds since the epoch.

    datasetId String

    The ID of the dataset containing this routine

    definitionBody String

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    description String

    The description of the routine if defined.

    determinismLevel String

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    importedLibraries List<String>

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language String

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    lastModifiedTime Integer

    The time when this routine was modified, in milliseconds since the epoch.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    returnTableType String

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    returnType String

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    routineId String

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routineType String

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments RoutineArgument[]

    Input/output argument of a function or a stored procedure. Structure is documented below.

    creationTime number

    The time when this routine was created, in milliseconds since the epoch.

    datasetId string

    The ID of the dataset containing this routine

    definitionBody string

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    description string

    The description of the routine if defined.

    determinismLevel string

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    importedLibraries string[]

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language string

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    lastModifiedTime number

    The time when this routine was modified, in milliseconds since the epoch.

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    returnTableType string

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    returnType string

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    routineId string

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routineType string

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments Sequence[RoutineArgumentArgs]

    Input/output argument of a function or a stored procedure. Structure is documented below.

    creation_time int

    The time when this routine was created, in milliseconds since the epoch.

    dataset_id str

    The ID of the dataset containing this routine

    definition_body str

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    description str

    The description of the routine if defined.

    determinism_level str

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    imported_libraries Sequence[str]

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language str

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    last_modified_time int

    The time when this routine was modified, in milliseconds since the epoch.

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    return_table_type str

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    return_type str

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    routine_id str

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routine_type str

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    arguments List<Property Map>

    Input/output argument of a function or a stored procedure. Structure is documented below.

    creationTime Number

    The time when this routine was created, in milliseconds since the epoch.

    datasetId String

    The ID of the dataset containing this routine

    definitionBody String

    The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses.


    description String

    The description of the routine if defined.

    determinismLevel String

    The determinism level of the JavaScript UDF if defined. Possible values are: DETERMINISM_LEVEL_UNSPECIFIED, DETERMINISTIC, NOT_DETERMINISTIC.

    importedLibraries List<String>

    Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

    language String

    The language of the routine. Possible values are: SQL, JAVASCRIPT.

    lastModifiedTime Number

    The time when this routine was modified, in milliseconds since the epoch.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    returnTableType String

    Optional. Can be set only if routineType = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specificed in return table type, at query time.

    returnType String

    A JSON schema for the return type. Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definitionBody at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switche d the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    routineId String

    The ID of the the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.

    routineType String

    The type of routine. Possible values are: SCALAR_FUNCTION, PROCEDURE, TABLE_VALUED_FUNCTION.

    Supporting Types

    RoutineArgument, RoutineArgumentArgs

    ArgumentKind string

    Defaults to FIXED_TYPE. Default value is FIXED_TYPE. Possible values are: FIXED_TYPE, ANY_TYPE.

    DataType string

    A JSON schema for the data type. Required unless argumentKind = ANY_TYPE. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switched the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    Mode string

    Specifies whether the argument is input or output. Can be set for procedures only. Possible values are: IN, OUT, INOUT.

    Name string

    The name of this argument. Can be absent for function return argument.

    ArgumentKind string

    Defaults to FIXED_TYPE. Default value is FIXED_TYPE. Possible values are: FIXED_TYPE, ANY_TYPE.

    DataType string

    A JSON schema for the data type. Required unless argumentKind = ANY_TYPE. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switched the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    Mode string

    Specifies whether the argument is input or output. Can be set for procedures only. Possible values are: IN, OUT, INOUT.

    Name string

    The name of this argument. Can be absent for function return argument.

    argumentKind String

    Defaults to FIXED_TYPE. Default value is FIXED_TYPE. Possible values are: FIXED_TYPE, ANY_TYPE.

    dataType String

    A JSON schema for the data type. Required unless argumentKind = ANY_TYPE. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switched the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    mode String

    Specifies whether the argument is input or output. Can be set for procedures only. Possible values are: IN, OUT, INOUT.

    name String

    The name of this argument. Can be absent for function return argument.

    argumentKind string

    Defaults to FIXED_TYPE. Default value is FIXED_TYPE. Possible values are: FIXED_TYPE, ANY_TYPE.

    dataType string

    A JSON schema for the data type. Required unless argumentKind = ANY_TYPE. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switched the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    mode string

    Specifies whether the argument is input or output. Can be set for procedures only. Possible values are: IN, OUT, INOUT.

    name string

    The name of this argument. Can be absent for function return argument.

    argument_kind str

    Defaults to FIXED_TYPE. Default value is FIXED_TYPE. Possible values are: FIXED_TYPE, ANY_TYPE.

    data_type str

    A JSON schema for the data type. Required unless argumentKind = ANY_TYPE. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switched the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    mode str

    Specifies whether the argument is input or output. Can be set for procedures only. Possible values are: IN, OUT, INOUT.

    name str

    The name of this argument. Can be absent for function return argument.

    argumentKind String

    Defaults to FIXED_TYPE. Default value is FIXED_TYPE. Possible values are: FIXED_TYPE, ANY_TYPE.

    dataType String

    A JSON schema for the data type. Required unless argumentKind = ANY_TYPE. ~>NOTE: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't changed. If the API returns a different value for the same schema, e.g. it switched the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API.

    mode String

    Specifies whether the argument is input or output. Can be set for procedures only. Possible values are: IN, OUT, INOUT.

    name String

    The name of this argument. Can be absent for function return argument.

    Import

    Routine can be imported using any of these accepted formats* projects/{{project}}/datasets/{{dataset_id}}/routines/{{routine_id}} * {{project}}/{{dataset_id}}/{{routine_id}} * {{dataset_id}}/{{routine_id}} In Terraform v1.5.0 and later, use an import block to import Routine using one of the formats above. For exampletf import {

    id = “projects/{{project}}/datasets/{{dataset_id}}/routines/{{routine_id}}”

    to = google_bigquery_routine.default }

     $ pulumi import gcp:bigquery/routine:Routine When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Routine can be imported using one of the formats above. For example
    
     $ pulumi import gcp:bigquery/routine:Routine default projects/{{project}}/datasets/{{dataset_id}}/routines/{{routine_id}}
    
     $ pulumi import gcp:bigquery/routine:Routine default {{project}}/{{dataset_id}}/{{routine_id}}
    
     $ pulumi import gcp:bigquery/routine:Routine default {{dataset_id}}/{{routine_id}}
    

    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 v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi