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

com.pulumi.cloudflare.kotlin.ZeroTrustAccessMtlsHostnameSettingsArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustAccessMtlsHostnameSettingsSettingArgs
import com.pulumi.cloudflare.kotlin.inputs.ZeroTrustAccessMtlsHostnameSettingsSettingArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a Cloudflare Access Mutual TLS Certificate Settings resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.ZeroTrustAccessMtlsHostnameSettings("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     settings: [{
 *         hostname: "example.com",
 *         clientCertificateForwarding: true,
 *         chinaNetwork: false,
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.ZeroTrustAccessMtlsHostnameSettings("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     settings=[{
 *         "hostname": "example.com",
 *         "client_certificate_forwarding": True,
 *         "china_network": False,
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.ZeroTrustAccessMtlsHostnameSettings("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Settings = new[]
 *         {
 *             new Cloudflare.Inputs.ZeroTrustAccessMtlsHostnameSettingsSettingArgs
 *             {
 *                 Hostname = "example.com",
 *                 ClientCertificateForwarding = true,
 *                 ChinaNetwork = false,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```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.NewZeroTrustAccessMtlsHostnameSettings(ctx, "example", &cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs{
 * 			ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Settings: cloudflare.ZeroTrustAccessMtlsHostnameSettingsSettingArray{
 * 				&cloudflare.ZeroTrustAccessMtlsHostnameSettingsSettingArgs{
 * 					Hostname:                    pulumi.String("example.com"),
 * 					ClientCertificateForwarding: pulumi.Bool(true),
 * 					ChinaNetwork:                pulumi.Bool(false),
 * 				},
 * 			},
 * 		})
 * 		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.ZeroTrustAccessMtlsHostnameSettings;
 * import com.pulumi.cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs;
 * import com.pulumi.cloudflare.inputs.ZeroTrustAccessMtlsHostnameSettingsSettingArgs;
 * 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 ZeroTrustAccessMtlsHostnameSettings("example", ZeroTrustAccessMtlsHostnameSettingsArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .settings(ZeroTrustAccessMtlsHostnameSettingsSettingArgs.builder()
 *                 .hostname("example.com")
 *                 .clientCertificateForwarding(true)
 *                 .chinaNetwork(false)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:ZeroTrustAccessMtlsHostnameSettings
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       settings:
 *         - hostname: example.com
 *           clientCertificateForwarding: true
 *           chinaNetwork: false
 * ```
 * 
 * ## Import
 * Account level mTLS hostname settings import.
 * ```sh
 * $ pulumi import cloudflare:index/zeroTrustAccessMtlsHostnameSettings:ZeroTrustAccessMtlsHostnameSettings example account/
 * ```
 * Zone level mTLS hostname settings import.
 * ```sh
 * $ pulumi import cloudflare:index/zeroTrustAccessMtlsHostnameSettings:ZeroTrustAccessMtlsHostnameSettings example zone/
 * ```
 * @property accountId The account identifier to target for the resource.
 * @property settings
 * @property zoneId The zone identifier to target for the resource.
 */
public data class ZeroTrustAccessMtlsHostnameSettingsArgs(
    public val accountId: Output? = null,
    public val settings: Output>? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs =
        com.pulumi.cloudflare.ZeroTrustAccessMtlsHostnameSettingsArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .settings(
                settings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

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

    private var settings: Output>? = null

    private var zoneId: Output? = null

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

    /**
     * @param value
     */
    @JvmName("xiountfdesdgplar")
    public suspend fun settings(`value`: Output>) {
        this.settings = value
    }

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

    /**
     * @param values
     */
    @JvmName("nlbwjbsuxpotvoqv")
    public suspend fun settings(values: List>) {
        this.settings = Output.all(values)
    }

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

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

    /**
     * @param value
     */
    @JvmName("qdjaofkojvqsmvrx")
    public suspend fun settings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.settings = mapped
    }

    /**
     * @param argument
     */
    @JvmName("laonevaowskoptgd")
    public suspend fun settings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ZeroTrustAccessMtlsHostnameSettingsSettingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.settings = mapped
    }

    /**
     * @param argument
     */
    @JvmName("gfvkpgcrypcvlrbl")
    public suspend fun settings(vararg argument: suspend ZeroTrustAccessMtlsHostnameSettingsSettingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ZeroTrustAccessMtlsHostnameSettingsSettingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.settings = mapped
    }

    /**
     * @param argument
     */
    @JvmName("cqhnuhixofnmcocg")
    public suspend fun settings(argument: suspend ZeroTrustAccessMtlsHostnameSettingsSettingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ZeroTrustAccessMtlsHostnameSettingsSettingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.settings = mapped
    }

    /**
     * @param values
     */
    @JvmName("baakjwseavgykegn")
    public suspend fun settings(vararg values: ZeroTrustAccessMtlsHostnameSettingsSettingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.settings = mapped
    }

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

    internal fun build(): ZeroTrustAccessMtlsHostnameSettingsArgs =
        ZeroTrustAccessMtlsHostnameSettingsArgs(
            accountId = accountId,
            settings = settings,
            zoneId = zoneId,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy