Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.dataplex.kotlin.ZoneArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.dataplex.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataplex.ZoneArgs.builder
import com.pulumi.gcp.dataplex.kotlin.inputs.ZoneDiscoverySpecArgs
import com.pulumi.gcp.dataplex.kotlin.inputs.ZoneDiscoverySpecArgsBuilder
import com.pulumi.gcp.dataplex.kotlin.inputs.ZoneResourceSpecArgs
import com.pulumi.gcp.dataplex.kotlin.inputs.ZoneResourceSpecArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* The Dataplex Zone resource
* ## Example Usage
* ### Basic_zone
* A basic example of a dataplex zone
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const basic = new gcp.dataplex.Lake("basic", {
* location: "us-west1",
* name: "lake",
* description: "Lake for DCL",
* displayName: "Lake for DCL",
* project: "my-project-name",
* labels: {
* "my-lake": "exists",
* },
* });
* const primary = new gcp.dataplex.Zone("primary", {
* discoverySpec: {
* enabled: false,
* },
* lake: basic.name,
* location: "us-west1",
* name: "zone",
* resourceSpec: {
* locationType: "MULTI_REGION",
* },
* type: "RAW",
* description: "Zone for DCL",
* displayName: "Zone for DCL",
* project: "my-project-name",
* labels: {},
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* basic = gcp.dataplex.Lake("basic",
* location="us-west1",
* name="lake",
* description="Lake for DCL",
* display_name="Lake for DCL",
* project="my-project-name",
* labels={
* "my-lake": "exists",
* })
* primary = gcp.dataplex.Zone("primary",
* discovery_spec={
* "enabled": False,
* },
* lake=basic.name,
* location="us-west1",
* name="zone",
* resource_spec={
* "location_type": "MULTI_REGION",
* },
* type="RAW",
* description="Zone for DCL",
* display_name="Zone for DCL",
* project="my-project-name",
* labels={})
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var basic = new Gcp.DataPlex.Lake("basic", new()
* {
* Location = "us-west1",
* Name = "lake",
* Description = "Lake for DCL",
* DisplayName = "Lake for DCL",
* Project = "my-project-name",
* Labels =
* {
* { "my-lake", "exists" },
* },
* });
* var primary = new Gcp.DataPlex.Zone("primary", new()
* {
* DiscoverySpec = new Gcp.DataPlex.Inputs.ZoneDiscoverySpecArgs
* {
* Enabled = false,
* },
* Lake = basic.Name,
* Location = "us-west1",
* Name = "zone",
* ResourceSpec = new Gcp.DataPlex.Inputs.ZoneResourceSpecArgs
* {
* LocationType = "MULTI_REGION",
* },
* Type = "RAW",
* Description = "Zone for DCL",
* DisplayName = "Zone for DCL",
* Project = "my-project-name",
* Labels = null,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* basic, err := dataplex.NewLake(ctx, "basic", &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
* }
* _, err = dataplex.NewZone(ctx, "primary", &dataplex.ZoneArgs{
* DiscoverySpec: &dataplex.ZoneDiscoverySpecArgs{
* Enabled: pulumi.Bool(false),
* },
* Lake: basic.Name,
* Location: pulumi.String("us-west1"),
* Name: pulumi.String("zone"),
* ResourceSpec: &dataplex.ZoneResourceSpecArgs{
* LocationType: pulumi.String("MULTI_REGION"),
* },
* Type: pulumi.String("RAW"),
* Description: pulumi.String("Zone for DCL"),
* DisplayName: pulumi.String("Zone for DCL"),
* Project: pulumi.String("my-project-name"),
* Labels: nil,
* })
* 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 com.pulumi.gcp.dataplex.Zone;
* import com.pulumi.gcp.dataplex.ZoneArgs;
* import com.pulumi.gcp.dataplex.inputs.ZoneDiscoverySpecArgs;
* import com.pulumi.gcp.dataplex.inputs.ZoneResourceSpecArgs;
* 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 basic = new Lake("basic", 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());
* var primary = new Zone("primary", ZoneArgs.builder()
* .discoverySpec(ZoneDiscoverySpecArgs.builder()
* .enabled(false)
* .build())
* .lake(basic.name())
* .location("us-west1")
* .name("zone")
* .resourceSpec(ZoneResourceSpecArgs.builder()
* .locationType("MULTI_REGION")
* .build())
* .type("RAW")
* .description("Zone for DCL")
* .displayName("Zone for DCL")
* .project("my-project-name")
* .labels()
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:dataplex:Zone
* properties:
* discoverySpec:
* enabled: false
* lake: ${basic.name}
* location: us-west1
* name: zone
* resourceSpec:
* locationType: MULTI_REGION
* type: RAW
* description: Zone for DCL
* displayName: Zone for DCL
* project: my-project-name
* labels: {}
* basic:
* 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
* Zone can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{name}}`
* * `{{project}}/{{location}}/{{lake}}/{{name}}`
* * `{{location}}/{{lake}}/{{name}}`
* When using the `pulumi import` command, Zone can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:dataplex/zone:Zone default projects/{{project}}/locations/{{location}}/lakes/{{lake}}/zones/{{name}}
* ```
* ```sh
* $ pulumi import gcp:dataplex/zone:Zone default {{project}}/{{location}}/{{lake}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:dataplex/zone:Zone default {{location}}/{{lake}}/{{name}}
* ```
* @property description Optional. Description of the zone.
* @property discoverySpec Required. Specification of the discovery feature applied to data in this zone.
* @property displayName Optional. User friendly display name.
* @property labels Optional. User defined labels for the zone. **Note**: This field is non-authoritative, and will only manage the labels
* present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the
* resource.
* @property lake The lake for the resource
* @property location The location for the resource
* @property name The name of the zone.
* @property project The project for the resource
* @property resourceSpec Required. Immutable. Specification of the resources that are referenced by the assets within this zone.
* @property type Required. Immutable. The type of the zone. Possible values: TYPE_UNSPECIFIED, RAW, CURATED
*/
public data class ZoneArgs(
public val description: Output? = null,
public val discoverySpec: Output? = null,
public val displayName: Output? = null,
public val labels: Output>? = null,
public val lake: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
public val resourceSpec: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.dataplex.ZoneArgs =
com.pulumi.gcp.dataplex.ZoneArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.discoverySpec(discoverySpec?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.lake(lake?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.resourceSpec(resourceSpec?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ZoneArgs].
*/
@PulumiTagMarker
public class ZoneArgsBuilder internal constructor() {
private var description: Output? = null
private var discoverySpec: Output? = null
private var displayName: Output? = null
private var labels: Output>? = null
private var lake: Output? = null
private var location: Output? = null
private var name: Output? = null
private var project: Output? = null
private var resourceSpec: Output? = null
private var type: Output? = null
/**
* @param value Optional. Description of the zone.
*/
@JvmName("lxkjcxqctxagngbr")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Required. Specification of the discovery feature applied to data in this zone.
*/
@JvmName("nlynbcaylinmyfrr")
public suspend fun discoverySpec(`value`: Output) {
this.discoverySpec = value
}
/**
* @param value Optional. User friendly display name.
*/
@JvmName("yjdbvjmfpystduyx")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value Optional. User defined labels for the zone. **Note**: This field is non-authoritative, and will only manage the labels
* present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the
* resource.
*/
@JvmName("rqlygxojwdhldrer")
public suspend fun labels(`value`: Output>) {
this.labels = value
}
/**
* @param value The lake for the resource
*/
@JvmName("imhnewrljktvreqh")
public suspend fun lake(`value`: Output) {
this.lake = value
}
/**
* @param value The location for the resource
*/
@JvmName("clplmqdavqvqnips")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the zone.
*/
@JvmName("ercrvoxytrqdjojg")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The project for the resource
*/
@JvmName("edoanystbnfgjage")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Required. Immutable. Specification of the resources that are referenced by the assets within this zone.
*/
@JvmName("orytxpukbxfgamup")
public suspend fun resourceSpec(`value`: Output) {
this.resourceSpec = value
}
/**
* @param value Required. Immutable. The type of the zone. Possible values: TYPE_UNSPECIFIED, RAW, CURATED
*/
@JvmName("dnjkhxwphmjdqojn")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value Optional. Description of the zone.
*/
@JvmName("adwabmbxhimfxqqm")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Required. Specification of the discovery feature applied to data in this zone.
*/
@JvmName("dvneeqeidsuelugp")
public suspend fun discoverySpec(`value`: ZoneDiscoverySpecArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.discoverySpec = mapped
}
/**
* @param argument Required. Specification of the discovery feature applied to data in this zone.
*/
@JvmName("wfkenlfbaxchbiuf")
public suspend fun discoverySpec(argument: suspend ZoneDiscoverySpecArgsBuilder.() -> Unit) {
val toBeMapped = ZoneDiscoverySpecArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.discoverySpec = mapped
}
/**
* @param value Optional. User friendly display name.
*/
@JvmName("mxptglntuhkfhtnm")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value Optional. User defined labels for the zone. **Note**: This field is non-authoritative, and will only manage the labels
* present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the
* resource.
*/
@JvmName("dffylenopgvifwud")
public suspend fun labels(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param values Optional. User defined labels for the zone. **Note**: This field is non-authoritative, and will only manage the labels
* present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the
* resource.
*/
@JvmName("mvonbfbccrhybcbs")
public fun labels(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param value The lake for the resource
*/
@JvmName("eebdpvcweggjggup")
public suspend fun lake(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.lake = mapped
}
/**
* @param value The location for the resource
*/
@JvmName("xuyxmdroneggtlek")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the zone.
*/
@JvmName("htwbdeirquunoqtm")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The project for the resource
*/
@JvmName("awnonuusaihnnufy")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value Required. Immutable. Specification of the resources that are referenced by the assets within this zone.
*/
@JvmName("pcpjywxadienuhls")
public suspend fun resourceSpec(`value`: ZoneResourceSpecArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceSpec = mapped
}
/**
* @param argument Required. Immutable. Specification of the resources that are referenced by the assets within this zone.
*/
@JvmName("idmccyigyaxlykgw")
public suspend fun resourceSpec(argument: suspend ZoneResourceSpecArgsBuilder.() -> Unit) {
val toBeMapped = ZoneResourceSpecArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.resourceSpec = mapped
}
/**
* @param value Required. Immutable. The type of the zone. Possible values: TYPE_UNSPECIFIED, RAW, CURATED
*/
@JvmName("eievgrowgxtrwwoa")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): ZoneArgs = ZoneArgs(
description = description,
discoverySpec = discoverySpec,
displayName = displayName,
labels = labels,
lake = lake,
location = location,
name = name,
project = project,
resourceSpec = resourceSpec,
type = type,
)
}