@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
336 lines • 12 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Hive Tables in BigLake Metastore that exist within a Hive Catalog and Database.
*
* > **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.
*
* ## Example Usage
*
* ### Biglake Hive Table
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const bucket = new gcp.storage.Bucket("bucket", {
* name: "example-bucket",
* location: "us-central1",
* forceDestroy: true,
* uniformBucketLevelAccess: true,
* });
* const catalog = new gcp.biglake.HiveCatalog("catalog", {
* name: "tf_test_catalog_85794",
* primaryLocation: "us-central1",
* locationUri: pulumi.interpolate`gs://${bucket.name}`,
* });
* const database = new gcp.biglake.HiveDatabase("database", {
* catalog: catalog.name,
* name: "tf_test_database_21197",
* locationUri: pulumi.interpolate`gs://${bucket.name}`,
* });
* const myHiveTable = new gcp.biglake.HiveTable("my_hive_table", {
* catalog: catalog.name,
* database: database.name,
* name: "tf_test_table_52865",
* description: "Hive table description",
* storageDescriptor: {
* columns: [
* {
* name: "col0",
* type: "STRING",
* comment: "column that will be deleted on update",
* },
* {
* name: "col1",
* type: "STRING",
* comment: "first skewed column",
* },
* ],
* inputFormat: "org.apache.hadoop.mapred.TextInputFormat",
* outputFormat: "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
* compressed: true,
* numBuckets: 1,
* bucketCols: ["bucket_col1"],
* sortCols: [{
* col: "col1",
* order: 0,
* }],
* skewedInfo: {
* skewedColNames: ["col1"],
* skewedColValues: [{
* values: ["val1"],
* }],
* skewedKeyValuesLocations: [{
* values: ["val1"],
* location: "gs://example-bucket/skewed_location_1",
* }],
* },
* serdeInfo: {
* name: "LazySimpleSerDe",
* serializationLib: "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
* },
* parameters: {
* key1: "value1",
* },
* storedAsSubDirs: false,
* },
* partitionKeys: [{
* name: "dt",
* type: "STRING",
* comment: "date partition",
* }],
* parameters: {
* key1: "value1",
* },
* });
* ```
*
* ## Import
*
* HiveTable can be imported using any of these accepted formats:
*
* * `hive/v1beta/projects/{{project}}/catalogs/{{catalog}}/databases/{{database}}/tables/{{name}}`
* * `{{project}}/{{catalog}}/{{database}}/{{name}}`
* * `{{catalog}}/{{database}}/{{name}}`
*
* When using the `pulumi import` command, HiveTable can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:biglake/hiveTable:HiveTable default hive/v1beta/projects/{{project}}/catalogs/{{catalog}}/databases/{{database}}/tables/{{name}}
* $ pulumi import gcp:biglake/hiveTable:HiveTable default {{project}}/{{catalog}}/{{database}}/{{name}}
* $ pulumi import gcp:biglake/hiveTable:HiveTable default {{catalog}}/{{database}}/{{name}}
* ```
*/
export declare class HiveTable extends pulumi.CustomResource {
/**
* Get an existing HiveTable 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?: HiveTableState, opts?: pulumi.CustomResourceOptions): HiveTable;
/**
* Returns true if the given object is an instance of HiveTable. 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 HiveTable;
/**
* The Hive catalog where the table is located.
*/
readonly catalog: pulumi.Output<string>;
/**
* Output only. The creation time of the table.
*/
readonly createTime: pulumi.Output<string>;
/**
* The Hive database where the table is located.
*/
readonly database: pulumi.Output<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* Description of the table.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Output only. Last access time of the table.
*/
readonly lastAccessTime: pulumi.Output<string>;
/**
* The name of the table.
*/
readonly name: pulumi.Output<string>;
/**
* Additional parameters associated with the table.
*/
readonly parameters: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Partition keys of the table.
* Structure is documented below.
*/
readonly partitionKeys: pulumi.Output<outputs.biglake.HiveTablePartitionKey[] | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Storage descriptor of the table.
* Structure is documented below.
*/
readonly storageDescriptor: pulumi.Output<outputs.biglake.HiveTableStorageDescriptor>;
/**
* Output only. The type of the table.
*/
readonly tableType: pulumi.Output<string>;
/**
* Output only. The update time of the table
*/
readonly updateTime: pulumi.Output<string>;
/**
* Expanded view text for Hive views. Empty for non-view.
*/
readonly viewExpandedText: pulumi.Output<string | undefined>;
/**
* Original view text for Hive views. Empty for non-view.
*/
readonly viewOriginalText: pulumi.Output<string | undefined>;
/**
* Create a HiveTable 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: HiveTableArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering HiveTable resources.
*/
export interface HiveTableState {
/**
* The Hive catalog where the table is located.
*/
catalog?: pulumi.Input<string | undefined>;
/**
* Output only. The creation time of the table.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* The Hive database where the table is located.
*/
database?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Description of the table.
*/
description?: pulumi.Input<string | undefined>;
/**
* Output only. Last access time of the table.
*/
lastAccessTime?: pulumi.Input<string | undefined>;
/**
* The name of the table.
*/
name?: pulumi.Input<string | undefined>;
/**
* Additional parameters associated with the table.
*/
parameters?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Partition keys of the table.
* Structure is documented below.
*/
partitionKeys?: pulumi.Input<pulumi.Input<inputs.biglake.HiveTablePartitionKey>[] | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* Storage descriptor of the table.
* Structure is documented below.
*/
storageDescriptor?: pulumi.Input<inputs.biglake.HiveTableStorageDescriptor | undefined>;
/**
* Output only. The type of the table.
*/
tableType?: pulumi.Input<string | undefined>;
/**
* Output only. The update time of the table
*/
updateTime?: pulumi.Input<string | undefined>;
/**
* Expanded view text for Hive views. Empty for non-view.
*/
viewExpandedText?: pulumi.Input<string | undefined>;
/**
* Original view text for Hive views. Empty for non-view.
*/
viewOriginalText?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a HiveTable resource.
*/
export interface HiveTableArgs {
/**
* The Hive catalog where the table is located.
*/
catalog: pulumi.Input<string>;
/**
* The Hive database where the table is located.
*/
database: pulumi.Input<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Description of the table.
*/
description?: pulumi.Input<string | undefined>;
/**
* The name of the table.
*/
name?: pulumi.Input<string | undefined>;
/**
* Additional parameters associated with the table.
*/
parameters?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Partition keys of the table.
* Structure is documented below.
*/
partitionKeys?: pulumi.Input<pulumi.Input<inputs.biglake.HiveTablePartitionKey>[] | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* Storage descriptor of the table.
* Structure is documented below.
*/
storageDescriptor: pulumi.Input<inputs.biglake.HiveTableStorageDescriptor>;
/**
* Expanded view text for Hive views. Empty for non-view.
*/
viewExpandedText?: pulumi.Input<string | undefined>;
/**
* Original view text for Hive views. Empty for non-view.
*/
viewOriginalText?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=hiveTable.d.ts.map