
com.pulumi.gcp.dataplex.kotlin.Lake.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.dataplex.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.dataplex.kotlin.outputs.LakeAssetStatus
import com.pulumi.gcp.dataplex.kotlin.outputs.LakeMetastore
import com.pulumi.gcp.dataplex.kotlin.outputs.LakeMetastoreStatus
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
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.dataplex.kotlin.outputs.LakeAssetStatus.Companion.toKotlin as lakeAssetStatusToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.LakeMetastore.Companion.toKotlin as lakeMetastoreToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.LakeMetastoreStatus.Companion.toKotlin as lakeMetastoreStatusToKotlin
/**
* Builder for [Lake].
*/
@PulumiTagMarker
public class LakeResourceBuilder internal constructor() {
public var name: String? = null
public var args: LakeArgs = LakeArgs()
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 LakeArgsBuilder.() -> Unit) {
val builder = LakeArgsBuilder()
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(): Lake {
val builtJavaResource = com.pulumi.gcp.dataplex.Lake(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Lake(builtJavaResource)
}
}
/**
* The Dataplex Lake resource
* ## Example Usage
* ### Basic_lake
* A basic example of a dataplex lake
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const primary = new gcp.dataplex.Lake("primary", {
* location: "us-west1",
* name: "lake",
* description: "Lake for DCL",
* displayName: "Lake for DCL",
* project: "my-project-name",
* labels: {
* "my-lake": "exists",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* primary = gcp.dataplex.Lake("primary",
* location="us-west1",
* name="lake",
* description="Lake for DCL",
* display_name="Lake for DCL",
* project="my-project-name",
* labels={
* "my-lake": "exists",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var primary = new Gcp.DataPlex.Lake("primary", new()
* {
* Location = "us-west1",
* Name = "lake",
* Description = "Lake for DCL",
* DisplayName = "Lake for DCL",
* Project = "my-project-name",
* Labels =
* {
* { "my-lake", "exists" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dataplex"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dataplex.NewLake(ctx, "primary", &dataplex.LakeArgs{
* Location: pulumi.String("us-west1"),
* Name: pulumi.String("lake"),
* Description: pulumi.String("Lake for DCL"),
* DisplayName: pulumi.String("Lake for DCL"),
* Project: pulumi.String("my-project-name"),
* Labels: pulumi.StringMap{
* "my-lake": pulumi.String("exists"),
* },
* })
* 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.dataplex.Lake;
* import com.pulumi.gcp.dataplex.LakeArgs;
* 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 primary = new Lake("primary", LakeArgs.builder()
* .location("us-west1")
* .name("lake")
* .description("Lake for DCL")
* .displayName("Lake for DCL")
* .project("my-project-name")
* .labels(Map.of("my-lake", "exists"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:dataplex:Lake
* properties:
* location: us-west1
* name: lake
* description: Lake for DCL
* displayName: Lake for DCL
* project: my-project-name
* labels:
* my-lake: exists
* ```
*
* ## Import
* Lake can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/lakes/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* When using the `pulumi import` command, Lake can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:dataplex/lake:Lake default projects/{{project}}/locations/{{location}}/lakes/{{name}}
* ```
* ```sh
* $ pulumi import gcp:dataplex/lake:Lake default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:dataplex/lake:Lake default {{location}}/{{name}}
* ```
*/
public class Lake internal constructor(
override val javaResource: com.pulumi.gcp.dataplex.Lake,
) : KotlinCustomResource(javaResource, LakeMapper) {
/**
* Output only. Aggregated status of the underlying assets of the lake.
*/
public val assetStatuses: Output>
get() = javaResource.assetStatuses().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> lakeAssetStatusToKotlin(args0) })
})
})
/**
* Output only. The time when the lake was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* Optional. Description of the lake.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Optional. User friendly display name.
*/
public val displayName: Output?
get() = javaResource.displayName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy