All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.biglake.kotlin.Catalog.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.biglake.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [Catalog].
 */
@PulumiTagMarker
public class CatalogResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: CatalogArgs = CatalogArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend CatalogArgsBuilder.() -> Unit) {
        val builder = CatalogArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Catalog {
        val builtJavaResource = com.pulumi.gcp.biglake.Catalog(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Catalog(builtJavaResource)
    }
}

/**
 * Catalogs are top-level containers for Databases and Tables.
 * To get more information about Catalog, see:
 * * [API documentation](https://cloud.google.com/bigquery/docs/reference/biglake/rest/v1/projects.locations.catalogs)
 * * How-to Guides
 *     * [Manage open source metadata with BigLake Metastore](https://cloud.google.com/bigquery/docs/manage-open-source-metadata#create_catalogs)
 * ## Example Usage
 * ### Bigquery Biglake Catalog
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.biglake.Catalog("default", {
 *     name: "my_catalog",
 *     location: "US",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.biglake.Catalog("default",
 *     name="my_catalog",
 *     location="US")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.BigLake.Catalog("default", new()
 *     {
 *         Name = "my_catalog",
 *         Location = "US",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/biglake"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := biglake.NewCatalog(ctx, "default", &biglake.CatalogArgs{
 * 			Name:     pulumi.String("my_catalog"),
 * 			Location: pulumi.String("US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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 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 default_ = new Catalog("default", CatalogArgs.builder()
 *             .name("my_catalog")
 *             .location("US")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:biglake:Catalog
 *     properties:
 *       name: my_catalog
 *       location: US
 * ```
 * 
 * ## Import
 * Catalog can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/catalogs/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, Catalog can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:biglake/catalog:Catalog default projects/{{project}}/locations/{{location}}/catalogs/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:biglake/catalog:Catalog default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:biglake/catalog:Catalog default {{location}}/{{name}}
 * ```
 */
public class Catalog internal constructor(
    override val javaResource: com.pulumi.gcp.biglake.Catalog,
) : KotlinCustomResource(javaResource, CatalogMapper) {
    /**
     * Output only. The creation time of the catalog. A timestamp in RFC3339 UTC
     * "Zulu" format, with nanosecond resolution and up to nine fractional
     * digits.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * Output only. The deletion time of the catalog. Only set after the catalog
     * is deleted. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond
     * resolution and up to nine fractional digits.
     */
    public val deleteTime: Output
        get() = javaResource.deleteTime().applyValue({ args0 -> args0 })

    /**
     * Output only. The time when this catalog is considered expired. Only set
     * after the catalog is deleted. Only set after the catalog is deleted.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
     * up to nine fractional digits.
     */
    public val expireTime: Output
        get() = javaResource.expireTime().applyValue({ args0 -> args0 })

    /**
     * The geographic location where the Catalog should reside.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The name of the Catalog. Format:
     * projects/{project_id_or_number}/locations/{locationId}/catalogs/{catalogId}
     * - - -
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * Output only. The last modification time of the catalog. A timestamp in
     * RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
     * fractional digits.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object CatalogMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.biglake.Catalog::class == javaResource::class

    override fun map(javaResource: Resource): Catalog = Catalog(
        javaResource as
            com.pulumi.gcp.biglake.Catalog,
    )
}

/**
 * @see [Catalog].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Catalog].
 */
public suspend fun catalog(name: String, block: suspend CatalogResourceBuilder.() -> Unit): Catalog {
    val builder = CatalogResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Catalog].
 * @param name The _unique_ name of the resulting resource.
 */
public fun catalog(name: String): Catalog {
    val builder = CatalogResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy