Database

class Database : KotlinCustomResource

Databases are containers of tables. To get more information about Database, see:

Example Usage

Biglake Database

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.biglake.Catalog;
import com.pulumi.gcp.biglake.CatalogArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.biglake.Database;
import com.pulumi.gcp.biglake.DatabaseArgs;
import com.pulumi.gcp.biglake.inputs.DatabaseHiveOptionsArgs;
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 catalog = new Catalog("catalog", CatalogArgs.builder()
.location("US")
.build());
var bucket = new Bucket("bucket", BucketArgs.builder()
.location("US")
.forceDestroy(true)
.uniformBucketLevelAccess(true)
.build());
var metadataFolder = new BucketObject("metadataFolder", BucketObjectArgs.builder()
.content(" ")
.bucket(bucket.name())
.build());
var database = new Database("database", DatabaseArgs.builder()
.catalog(catalog.id())
.type("HIVE")
.hiveOptions(DatabaseHiveOptionsArgs.builder()
.locationUri(Output.tuple(bucket.name(), metadataFolder.name()).applyValue(values -> {
var bucketName = values.t1;
var metadataFolderName = values.t2;
return String.format("gs://%s/%s", bucketName,metadataFolderName);
}))
.parameters(Map.of("owner", "John Doe"))
.build())
.build());
}
}

Import

Database can be imported using any of these accepted formats:

$ pulumi import gcp:biglake/database:Database default {{catalog}}/databases/{{name}}

Properties

Link copied to clipboard
val catalog: Output<String>

The parent catalog.

Link copied to clipboard
val createTime: Output<String>

Output only. The creation time of the database. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Link copied to clipboard
val deleteTime: Output<String>

Output only. The deletion time of the database. Only set after the database is deleted. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Link copied to clipboard
val expireTime: Output<String>

Output only. The time when this database is considered expired. Only set after the database is deleted. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Link copied to clipboard

Options of a Hive database. Structure is documented below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the database.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: Output<String>

The database type.

Link copied to clipboard
val updateTime: Output<String>

Output only. The last modification time of the database. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Link copied to clipboard
val urn: Output<String>