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

com.pulumi.cloudflare.kotlin.ZeroTrustDnsLocationArgs.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: 5.47.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.ZeroTrustDnsLocationArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustDnsLocationNetworkArgs
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustDnsLocationNetworkArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a Cloudflare Teams Location resource. Teams Locations are
 * referenced when creating secure web gateway policies.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.ZeroTrustDnsLocation("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "office",
 *     clientDefault: true,
 *     ecsSupport: false,
 *     networks: [
 *         {
 *             network: "203.0.113.1/32",
 *         },
 *         {
 *             network: "203.0.113.2/32",
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.ZeroTrustDnsLocation("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="office",
 *     client_default=True,
 *     ecs_support=False,
 *     networks=[
 *         {
 *             "network": "203.0.113.1/32",
 *         },
 *         {
 *             "network": "203.0.113.2/32",
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.ZeroTrustDnsLocation("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "office",
 *         ClientDefault = true,
 *         EcsSupport = false,
 *         Networks = new[]
 *         {
 *             new Cloudflare.Inputs.ZeroTrustDnsLocationNetworkArgs
 *             {
 *                 Network = "203.0.113.1/32",
 *             },
 *             new Cloudflare.Inputs.ZeroTrustDnsLocationNetworkArgs
 *             {
 *                 Network = "203.0.113.2/32",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudflare.NewZeroTrustDnsLocation(ctx, "example", &cloudflare.ZeroTrustDnsLocationArgs{
 * 			AccountId:     pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:          pulumi.String("office"),
 * 			ClientDefault: pulumi.Bool(true),
 * 			EcsSupport:    pulumi.Bool(false),
 * 			Networks: cloudflare.ZeroTrustDnsLocationNetworkArray{
 * 				&cloudflare.ZeroTrustDnsLocationNetworkArgs{
 * 					Network: pulumi.String("203.0.113.1/32"),
 * 				},
 * 				&cloudflare.ZeroTrustDnsLocationNetworkArgs{
 * 					Network: pulumi.String("203.0.113.2/32"),
 * 				},
 * 			},
 * 		})
 * 		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.cloudflare.ZeroTrustDnsLocation;
 * import com.pulumi.cloudflare.ZeroTrustDnsLocationArgs;
 * import com.pulumi.cloudflare.inputs.ZeroTrustDnsLocationNetworkArgs;
 * 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 example = new ZeroTrustDnsLocation("example", ZeroTrustDnsLocationArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .name("office")
 *             .clientDefault(true)
 *             .ecsSupport(false)
 *             .networks(
 *                 ZeroTrustDnsLocationNetworkArgs.builder()
 *                     .network("203.0.113.1/32")
 *                     .build(),
 *                 ZeroTrustDnsLocationNetworkArgs.builder()
 *                     .network("203.0.113.2/32")
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:ZeroTrustDnsLocation
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: office
 *       clientDefault: true
 *       ecsSupport: false
 *       networks:
 *         - network: 203.0.113.1/32
 *         - network: 203.0.113.2/32
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/zeroTrustDnsLocation:ZeroTrustDnsLocation example /
 * ```
 * @property accountId The account identifier to target for the resource.
 * @property clientDefault Indicator that this is the default location.
 * @property ecsSupport Indicator that this location needs to resolve EDNS queries.
 * @property name Name of the teams location.
 * @property networks The networks CIDRs that comprise the location.
 */
public data class ZeroTrustDnsLocationArgs(
    public val accountId: Output? = null,
    public val clientDefault: Output? = null,
    public val ecsSupport: Output? = null,
    public val name: Output? = null,
    public val networks: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.ZeroTrustDnsLocationArgs =
        com.pulumi.cloudflare.ZeroTrustDnsLocationArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .clientDefault(clientDefault?.applyValue({ args0 -> args0 }))
            .ecsSupport(ecsSupport?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networks(
                networks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ZeroTrustDnsLocationArgs].
 */
@PulumiTagMarker
public class ZeroTrustDnsLocationArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var clientDefault: Output? = null

    private var ecsSupport: Output? = null

    private var name: Output? = null

    private var networks: Output>? = null

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("xymechonyqgvkklc")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value Indicator that this is the default location.
     */
    @JvmName("pmfrdenawoiywvha")
    public suspend fun clientDefault(`value`: Output) {
        this.clientDefault = value
    }

    /**
     * @param value Indicator that this location needs to resolve EDNS queries.
     */
    @JvmName("ydquxtxkfvqvybix")
    public suspend fun ecsSupport(`value`: Output) {
        this.ecsSupport = value
    }

    /**
     * @param value Name of the teams location.
     */
    @JvmName("njyjrevueidogokg")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The networks CIDRs that comprise the location.
     */
    @JvmName("xjbpthbmguwokxjk")
    public suspend fun networks(`value`: Output>) {
        this.networks = value
    }

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

    /**
     * @param values The networks CIDRs that comprise the location.
     */
    @JvmName("ysmptpdwdolsvspg")
    public suspend fun networks(values: List>) {
        this.networks = Output.all(values)
    }

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("hwmldfbssmkmcuef")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value Indicator that this is the default location.
     */
    @JvmName("fhqcfcygbyrspfhu")
    public suspend fun clientDefault(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientDefault = mapped
    }

    /**
     * @param value Indicator that this location needs to resolve EDNS queries.
     */
    @JvmName("eolqrjkgtfkfqbnc")
    public suspend fun ecsSupport(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ecsSupport = mapped
    }

    /**
     * @param value Name of the teams location.
     */
    @JvmName("wdpxcplumcaxhjac")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The networks CIDRs that comprise the location.
     */
    @JvmName("jyuuoyjsivgolssu")
    public suspend fun networks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networks = mapped
    }

    /**
     * @param argument The networks CIDRs that comprise the location.
     */
    @JvmName("tidljvpcwdhvisau")
    public suspend fun networks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ZeroTrustDnsLocationNetworkArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networks = mapped
    }

    /**
     * @param argument The networks CIDRs that comprise the location.
     */
    @JvmName("kjniebbmfwspqsyu")
    public suspend fun networks(vararg argument: suspend ZeroTrustDnsLocationNetworkArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ZeroTrustDnsLocationNetworkArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networks = mapped
    }

    /**
     * @param argument The networks CIDRs that comprise the location.
     */
    @JvmName("auhdinlmlquawfeh")
    public suspend fun networks(argument: suspend ZeroTrustDnsLocationNetworkArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ZeroTrustDnsLocationNetworkArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.networks = mapped
    }

    /**
     * @param values The networks CIDRs that comprise the location.
     */
    @JvmName("wgnecmakmxwatewy")
    public suspend fun networks(vararg values: ZeroTrustDnsLocationNetworkArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networks = mapped
    }

    internal fun build(): ZeroTrustDnsLocationArgs = ZeroTrustDnsLocationArgs(
        accountId = accountId,
        clientDefault = clientDefault,
        ecsSupport = ecsSupport,
        name = name,
        networks = networks,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy