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

com.pulumi.alicloud.pvtz.kotlin.ZoneArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.pvtz.kotlin

import com.pulumi.alicloud.pvtz.ZoneArgs.builder
import com.pulumi.alicloud.pvtz.kotlin.inputs.ZoneUserInfoArgs
import com.pulumi.alicloud.pvtz.kotlin.inputs.ZoneUserInfoArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 * const foo = new alicloud.pvtz.Zone("foo", {zoneName: "foo.example.com"});
 * ```
 * ```python
 * import pulumi
 * import pulumi_alicloud as alicloud
 * foo = alicloud.pvtz.Zone("foo", zone_name="foo.example.com")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AliCloud = Pulumi.AliCloud;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foo = new AliCloud.Pvtz.Zone("foo", new()
 *     {
 *         ZoneName = "foo.example.com",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pvtz"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := pvtz.NewZone(ctx, "foo", &pvtz.ZoneArgs{
 * 			ZoneName: pulumi.String("foo.example.com"),
 * 		})
 * 		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.alicloud.pvtz.Zone;
 * import com.pulumi.alicloud.pvtz.ZoneArgs;
 * 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 foo = new Zone("foo", ZoneArgs.builder()
 *             .zoneName("foo.example.com")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foo:
 *     type: alicloud:pvtz:Zone
 *     properties:
 *       zoneName: foo.example.com
 * ```
 * 
 * ## Import
 * Private Zone can be imported using the id, e.g.
 * ```sh
 * $ pulumi import alicloud:pvtz/zone:Zone example abc123456
 * ```
 * @property lang The language. Valid values: "zh", "en", "jp".
 * @property name The name of the Private Zone. The `name` has been deprecated from provider version 1.107.0. Please use 'zone_name' instead.
 * @property proxyPattern The recursive DNS proxy. Valid values:
 * - ZONE: indicates that the recursive DNS proxy is disabled.
 * - RECORD: indicates that the recursive DNS proxy is enabled.
 * Default to "ZONE".
 * @property remark The remark of the Private Zone.
 * @property resourceGroupId The Id of resource group which the Private Zone belongs.
 * @property syncStatus The status of the host synchronization task. Valid values:  `ON`,`OFF`. **NOTE:** You can update the `sync_status` to enable/disable the host synchronization task.
 * @property tags The tags of the Private Zone.
 * @property userClientIp The IP address of the client.
 * @property userInfos The user information of the host synchronization task. See `user_info` below.
 * @property zoneName The zone_name of the Private Zone. The `zone_name` is required when the value of the `name`  is Empty.
 */
public data class ZoneArgs(
    public val lang: Output? = null,
    @Deprecated(
        message = """
  Field 'name' has been deprecated from version 1.107.0. Use 'zone_name' instead.
  """,
    )
    public val name: Output? = null,
    public val proxyPattern: Output? = null,
    public val remark: Output? = null,
    public val resourceGroupId: Output? = null,
    public val syncStatus: Output? = null,
    public val tags: Output>? = null,
    public val userClientIp: Output? = null,
    public val userInfos: Output>? = null,
    public val zoneName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.pvtz.ZoneArgs =
        com.pulumi.alicloud.pvtz.ZoneArgs.builder()
            .lang(lang?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .proxyPattern(proxyPattern?.applyValue({ args0 -> args0 }))
            .remark(remark?.applyValue({ args0 -> args0 }))
            .resourceGroupId(resourceGroupId?.applyValue({ args0 -> args0 }))
            .syncStatus(syncStatus?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .userClientIp(userClientIp?.applyValue({ args0 -> args0 }))
            .userInfos(
                userInfos?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .zoneName(zoneName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ZoneArgs].
 */
@PulumiTagMarker
public class ZoneArgsBuilder internal constructor() {
    private var lang: Output? = null

    private var name: Output? = null

    private var proxyPattern: Output? = null

    private var remark: Output? = null

    private var resourceGroupId: Output? = null

    private var syncStatus: Output? = null

    private var tags: Output>? = null

    private var userClientIp: Output? = null

    private var userInfos: Output>? = null

    private var zoneName: Output? = null

    /**
     * @param value The language. Valid values: "zh", "en", "jp".
     */
    @JvmName("xsilqropvovibplv")
    public suspend fun lang(`value`: Output) {
        this.lang = value
    }

    /**
     * @param value The name of the Private Zone. The `name` has been deprecated from provider version 1.107.0. Please use 'zone_name' instead.
     */
    @Deprecated(
        message = """
  Field 'name' has been deprecated from version 1.107.0. Use 'zone_name' instead.
  """,
    )
    @JvmName("eeqlysgtufcciiay")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The recursive DNS proxy. Valid values:
     * - ZONE: indicates that the recursive DNS proxy is disabled.
     * - RECORD: indicates that the recursive DNS proxy is enabled.
     * Default to "ZONE".
     */
    @JvmName("xucjmyrpmxyhahys")
    public suspend fun proxyPattern(`value`: Output) {
        this.proxyPattern = value
    }

    /**
     * @param value The remark of the Private Zone.
     */
    @JvmName("lrmbevgpiugkyrgi")
    public suspend fun remark(`value`: Output) {
        this.remark = value
    }

    /**
     * @param value The Id of resource group which the Private Zone belongs.
     */
    @JvmName("dungqrjaelqojpkp")
    public suspend fun resourceGroupId(`value`: Output) {
        this.resourceGroupId = value
    }

    /**
     * @param value The status of the host synchronization task. Valid values:  `ON`,`OFF`. **NOTE:** You can update the `sync_status` to enable/disable the host synchronization task.
     */
    @JvmName("kprqxekrlvglyrmt")
    public suspend fun syncStatus(`value`: Output) {
        this.syncStatus = value
    }

    /**
     * @param value The tags of the Private Zone.
     */
    @JvmName("bvpohrovfeqyjrmf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The IP address of the client.
     */
    @JvmName("cdnuaeugcucarhkb")
    public suspend fun userClientIp(`value`: Output) {
        this.userClientIp = value
    }

    /**
     * @param value The user information of the host synchronization task. See `user_info` below.
     */
    @JvmName("fbknvevhsdbmaash")
    public suspend fun userInfos(`value`: Output>) {
        this.userInfos = value
    }

    @JvmName("cxgrfmgmbsemjviv")
    public suspend fun userInfos(vararg values: Output) {
        this.userInfos = Output.all(values.asList())
    }

    /**
     * @param values The user information of the host synchronization task. See `user_info` below.
     */
    @JvmName("cmgribuqryinhrfs")
    public suspend fun userInfos(values: List>) {
        this.userInfos = Output.all(values)
    }

    /**
     * @param value The zone_name of the Private Zone. The `zone_name` is required when the value of the `name`  is Empty.
     */
    @JvmName("dewlewfstkwubqhq")
    public suspend fun zoneName(`value`: Output) {
        this.zoneName = value
    }

    /**
     * @param value The language. Valid values: "zh", "en", "jp".
     */
    @JvmName("pughnsxumtgsfhif")
    public suspend fun lang(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lang = mapped
    }

    /**
     * @param value The name of the Private Zone. The `name` has been deprecated from provider version 1.107.0. Please use 'zone_name' instead.
     */
    @Deprecated(
        message = """
  Field 'name' has been deprecated from version 1.107.0. Use 'zone_name' instead.
  """,
    )
    @JvmName("vgdrcbeetamfhteb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The recursive DNS proxy. Valid values:
     * - ZONE: indicates that the recursive DNS proxy is disabled.
     * - RECORD: indicates that the recursive DNS proxy is enabled.
     * Default to "ZONE".
     */
    @JvmName("kxidaxydwjkjvasu")
    public suspend fun proxyPattern(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.proxyPattern = mapped
    }

    /**
     * @param value The remark of the Private Zone.
     */
    @JvmName("jldlbmdsdecflcjn")
    public suspend fun remark(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.remark = mapped
    }

    /**
     * @param value The Id of resource group which the Private Zone belongs.
     */
    @JvmName("muwyoluskkmffpne")
    public suspend fun resourceGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupId = mapped
    }

    /**
     * @param value The status of the host synchronization task. Valid values:  `ON`,`OFF`. **NOTE:** You can update the `sync_status` to enable/disable the host synchronization task.
     */
    @JvmName("fhhpcpkkepsrtoqx")
    public suspend fun syncStatus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.syncStatus = mapped
    }

    /**
     * @param value The tags of the Private Zone.
     */
    @JvmName("vxgspahlsdbndwip")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The tags of the Private Zone.
     */
    @JvmName("acfnnjvicumydqjb")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The IP address of the client.
     */
    @JvmName("yocvurmmnyixohkq")
    public suspend fun userClientIp(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userClientIp = mapped
    }

    /**
     * @param value The user information of the host synchronization task. See `user_info` below.
     */
    @JvmName("fcwkadwqkbtvhcqs")
    public suspend fun userInfos(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userInfos = mapped
    }

    /**
     * @param argument The user information of the host synchronization task. See `user_info` below.
     */
    @JvmName("krppupdirkovxwdt")
    public suspend fun userInfos(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ZoneUserInfoArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.userInfos = mapped
    }

    /**
     * @param argument The user information of the host synchronization task. See `user_info` below.
     */
    @JvmName("wgmywemqcpjatymm")
    public suspend fun userInfos(vararg argument: suspend ZoneUserInfoArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ZoneUserInfoArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.userInfos = mapped
    }

    /**
     * @param argument The user information of the host synchronization task. See `user_info` below.
     */
    @JvmName("ylyimlbbitxtykte")
    public suspend fun userInfos(argument: suspend ZoneUserInfoArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ZoneUserInfoArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.userInfos = mapped
    }

    /**
     * @param values The user information of the host synchronization task. See `user_info` below.
     */
    @JvmName("iwoojbdyoctavuwg")
    public suspend fun userInfos(vararg values: ZoneUserInfoArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userInfos = mapped
    }

    /**
     * @param value The zone_name of the Private Zone. The `zone_name` is required when the value of the `name`  is Empty.
     */
    @JvmName("arstfwyfccdhrlon")
    public suspend fun zoneName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneName = mapped
    }

    internal fun build(): ZoneArgs = ZoneArgs(
        lang = lang,
        name = name,
        proxyPattern = proxyPattern,
        remark = remark,
        resourceGroupId = resourceGroupId,
        syncStatus = syncStatus,
        tags = tags,
        userClientIp = userClientIp,
        userInfos = userInfos,
        zoneName = zoneName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy