UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

305 lines (304 loc) 13.2 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * Manages DLI Table resource within HuaweiCloud * * ## Example Usage * ### Create a Table * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const databaseName = config.requireObject("databaseName"); * const testDatabase = new huaweicloud.dli.Database("testDatabase", {}); * const testTable = new huaweicloud.dli.Table("testTable", { * databaseName: testDatabase.name, * dataLocation: "DLI", * description: "SQL table_1 description", * columns: [ * { * name: "column_1", * type: "string", * description: "the first column", * }, * { * name: "column_2", * type: "string", * description: "the second column", * }, * ], * }); * ``` * * ## Import * * DLI table can be imported by `id`. It is composed of the name of database which table belongs and the name of table, * * separated by a slash. For example, bash * * ```sh * $ pulumi import huaweicloud:Dli/table:Table example <database_name>/<table_name> * ``` */ export declare class Table extends pulumi.CustomResource { /** * Get an existing Table resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TableState, opts?: pulumi.CustomResourceOptions): Table; /** * Returns true if the given object is an instance of Table. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Table; /** * Specifies storage path of data which will be import to the OBS table. * Changing this parameter will create a new resource. * > If you need to import data stored in OBS to the OBS table, set this parameter to the path of a folder. If the table * creation path is a file, data fails to be imported. which must be a path on OBS and must begin with obs. */ readonly bucketLocation: pulumi.Output<string>; /** * Specifies Columns of the new table. Structure is documented below. * Changing this parameter will create a new resource. */ readonly columns: pulumi.Output<outputs.Dli.TableColumn[] | undefined>; /** * Specifies type of the data to be added to the OBS table. * The options: parquet, orc, csv, json, carbon, and avro. Changing this parameter will create a new resource. */ readonly dataFormat: pulumi.Output<string>; /** * Specifies data storage location. Changing this parameter will create * a newresource. The options are as follows: * + **DLI**: Data stored in DLI tables is applicable to delay-sensitive services, such as interactive queries. * + **OBS**: Data stored in OBS tables is applicable to delay-insensitive services, such as historical data statistics * and analysis. */ readonly dataLocation: pulumi.Output<string>; /** * Specifies the database name which the table belongs to. * Changing this parameter will create a new resource. */ readonly databaseName: pulumi.Output<string>; /** * Specifies date type. `yyyy-MM-dd` is used by default. Only * data in CSV and JSON files has this attribute. Changing this parameter will create a new resource. */ readonly dateFormat: pulumi.Output<string>; /** * Specifies data delimiter. Only data in CSV files has this * attribute. Changing this parameter will create a new resource. */ readonly delimiter: pulumi.Output<string>; /** * Specifies the description of column. Changing this parameter will * create a new resource. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies escape character. Backslashes (`\\`) are used by * default. Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ readonly escapeChar: pulumi.Output<string>; /** * Specifies the name of column. Changing this parameter will create a new * resource. */ readonly name: pulumi.Output<string>; /** * Specifies reference character. Double quotation marks (`\`) * are used by default. Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ readonly quoteChar: pulumi.Output<string>; /** * Specifies the region in which to create the dli table resource. If omitted, * the provider-level region will be used. Changing this parameter will create a new resource. */ readonly region: pulumi.Output<string>; /** * Specifies timestamp type. `yyyy-MM-dd HH:mm:ss` is used by default. * Only data in CSV and JSON files has this attribute. Changing this parameter will create a new resource. */ readonly timestampFormat: pulumi.Output<string>; /** * Specifies whether the table header is included in the data file. * Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ readonly withColumnHeader: pulumi.Output<boolean>; /** * Create a Table resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TableArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Table resources. */ export interface TableState { /** * Specifies storage path of data which will be import to the OBS table. * Changing this parameter will create a new resource. * > If you need to import data stored in OBS to the OBS table, set this parameter to the path of a folder. If the table * creation path is a file, data fails to be imported. which must be a path on OBS and must begin with obs. */ bucketLocation?: pulumi.Input<string>; /** * Specifies Columns of the new table. Structure is documented below. * Changing this parameter will create a new resource. */ columns?: pulumi.Input<pulumi.Input<inputs.Dli.TableColumn>[]>; /** * Specifies type of the data to be added to the OBS table. * The options: parquet, orc, csv, json, carbon, and avro. Changing this parameter will create a new resource. */ dataFormat?: pulumi.Input<string>; /** * Specifies data storage location. Changing this parameter will create * a newresource. The options are as follows: * + **DLI**: Data stored in DLI tables is applicable to delay-sensitive services, such as interactive queries. * + **OBS**: Data stored in OBS tables is applicable to delay-insensitive services, such as historical data statistics * and analysis. */ dataLocation?: pulumi.Input<string>; /** * Specifies the database name which the table belongs to. * Changing this parameter will create a new resource. */ databaseName?: pulumi.Input<string>; /** * Specifies date type. `yyyy-MM-dd` is used by default. Only * data in CSV and JSON files has this attribute. Changing this parameter will create a new resource. */ dateFormat?: pulumi.Input<string>; /** * Specifies data delimiter. Only data in CSV files has this * attribute. Changing this parameter will create a new resource. */ delimiter?: pulumi.Input<string>; /** * Specifies the description of column. Changing this parameter will * create a new resource. */ description?: pulumi.Input<string>; /** * Specifies escape character. Backslashes (`\\`) are used by * default. Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ escapeChar?: pulumi.Input<string>; /** * Specifies the name of column. Changing this parameter will create a new * resource. */ name?: pulumi.Input<string>; /** * Specifies reference character. Double quotation marks (`\`) * are used by default. Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ quoteChar?: pulumi.Input<string>; /** * Specifies the region in which to create the dli table resource. If omitted, * the provider-level region will be used. Changing this parameter will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies timestamp type. `yyyy-MM-dd HH:mm:ss` is used by default. * Only data in CSV and JSON files has this attribute. Changing this parameter will create a new resource. */ timestampFormat?: pulumi.Input<string>; /** * Specifies whether the table header is included in the data file. * Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ withColumnHeader?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a Table resource. */ export interface TableArgs { /** * Specifies storage path of data which will be import to the OBS table. * Changing this parameter will create a new resource. * > If you need to import data stored in OBS to the OBS table, set this parameter to the path of a folder. If the table * creation path is a file, data fails to be imported. which must be a path on OBS and must begin with obs. */ bucketLocation?: pulumi.Input<string>; /** * Specifies Columns of the new table. Structure is documented below. * Changing this parameter will create a new resource. */ columns?: pulumi.Input<pulumi.Input<inputs.Dli.TableColumn>[]>; /** * Specifies type of the data to be added to the OBS table. * The options: parquet, orc, csv, json, carbon, and avro. Changing this parameter will create a new resource. */ dataFormat?: pulumi.Input<string>; /** * Specifies data storage location. Changing this parameter will create * a newresource. The options are as follows: * + **DLI**: Data stored in DLI tables is applicable to delay-sensitive services, such as interactive queries. * + **OBS**: Data stored in OBS tables is applicable to delay-insensitive services, such as historical data statistics * and analysis. */ dataLocation: pulumi.Input<string>; /** * Specifies the database name which the table belongs to. * Changing this parameter will create a new resource. */ databaseName: pulumi.Input<string>; /** * Specifies date type. `yyyy-MM-dd` is used by default. Only * data in CSV and JSON files has this attribute. Changing this parameter will create a new resource. */ dateFormat?: pulumi.Input<string>; /** * Specifies data delimiter. Only data in CSV files has this * attribute. Changing this parameter will create a new resource. */ delimiter?: pulumi.Input<string>; /** * Specifies the description of column. Changing this parameter will * create a new resource. */ description?: pulumi.Input<string>; /** * Specifies escape character. Backslashes (`\\`) are used by * default. Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ escapeChar?: pulumi.Input<string>; /** * Specifies the name of column. Changing this parameter will create a new * resource. */ name?: pulumi.Input<string>; /** * Specifies reference character. Double quotation marks (`\`) * are used by default. Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ quoteChar?: pulumi.Input<string>; /** * Specifies the region in which to create the dli table resource. If omitted, * the provider-level region will be used. Changing this parameter will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies timestamp type. `yyyy-MM-dd HH:mm:ss` is used by default. * Only data in CSV and JSON files has this attribute. Changing this parameter will create a new resource. */ timestampFormat?: pulumi.Input<string>; /** * Specifies whether the table header is included in the data file. * Only data in CSV files has this attribute. Changing this parameter will create a new resource. */ withColumnHeader?: pulumi.Input<boolean>; }