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

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

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.CustomSslArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.CustomSslCustomSslOptionsArgs
import com.pulumi.cloudflare.kotlin.inputs.CustomSslCustomSslOptionsArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.CustomSslCustomSslPriorityArgs
import com.pulumi.cloudflare.kotlin.inputs.CustomSslCustomSslPriorityArgsBuilder
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 custom SSL resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.CustomSsl("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     customSslOptions: {
 *         certificate: "-----INSERT CERTIFICATE-----",
 *         privateKey: "-----INSERT PRIVATE KEY-----",
 *         bundleMethod: "ubiquitous",
 *         geoRestrictions: "us",
 *         type: "legacy_custom",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.CustomSsl("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     custom_ssl_options={
 *         "certificate": "-----INSERT CERTIFICATE-----",
 *         "private_key": "-----INSERT PRIVATE KEY-----",
 *         "bundle_method": "ubiquitous",
 *         "geo_restrictions": "us",
 *         "type": "legacy_custom",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.CustomSsl("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         CustomSslOptions = new Cloudflare.Inputs.CustomSslCustomSslOptionsArgs
 *         {
 *             Certificate = "-----INSERT CERTIFICATE-----",
 *             PrivateKey = "-----INSERT PRIVATE KEY-----",
 *             BundleMethod = "ubiquitous",
 *             GeoRestrictions = "us",
 *             Type = "legacy_custom",
 *         },
 *     });
 * });
 * ```
 * ```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.NewCustomSsl(ctx, "example", &cloudflare.CustomSslArgs{
 * 			ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			CustomSslOptions: &cloudflare.CustomSslCustomSslOptionsArgs{
 * 				Certificate:     pulumi.String("-----INSERT CERTIFICATE-----"),
 * 				PrivateKey:      pulumi.String("-----INSERT PRIVATE KEY-----"),
 * 				BundleMethod:    pulumi.String("ubiquitous"),
 * 				GeoRestrictions: pulumi.String("us"),
 * 				Type:            pulumi.String("legacy_custom"),
 * 			},
 * 		})
 * 		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.CustomSsl;
 * import com.pulumi.cloudflare.CustomSslArgs;
 * import com.pulumi.cloudflare.inputs.CustomSslCustomSslOptionsArgs;
 * 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 CustomSsl("example", CustomSslArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .customSslOptions(CustomSslCustomSslOptionsArgs.builder()
 *                 .certificate("-----INSERT CERTIFICATE-----")
 *                 .privateKey("-----INSERT PRIVATE KEY-----")
 *                 .bundleMethod("ubiquitous")
 *                 .geoRestrictions("us")
 *                 .type("legacy_custom")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:CustomSsl
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       customSslOptions:
 *         certificate: '-----INSERT CERTIFICATE-----'
 *         privateKey: '-----INSERT PRIVATE KEY-----'
 *         bundleMethod: ubiquitous
 *         geoRestrictions: us
 *         type: legacy_custom
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/customSsl:CustomSsl example /
 * ```
 * @property customSslOptions The certificate associated parameters. **Modifying this attribute will force creation of a new resource.**
 * @property customSslPriorities
 * @property zoneId The zone identifier to target for the resource.
 */
public data class CustomSslArgs(
    public val customSslOptions: Output? = null,
    public val customSslPriorities: Output>? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.CustomSslArgs =
        com.pulumi.cloudflare.CustomSslArgs.builder()
            .customSslOptions(customSslOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .customSslPriorities(
                customSslPriorities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CustomSslArgs].
 */
@PulumiTagMarker
public class CustomSslArgsBuilder internal constructor() {
    private var customSslOptions: Output? = null

    private var customSslPriorities: Output>? = null

    private var zoneId: Output? = null

    /**
     * @param value The certificate associated parameters. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("bfohceiuqanihmla")
    public suspend fun customSslOptions(`value`: Output) {
        this.customSslOptions = value
    }

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

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

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

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

    /**
     * @param value The certificate associated parameters. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("mtlspgeitbensger")
    public suspend fun customSslOptions(`value`: CustomSslCustomSslOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customSslOptions = mapped
    }

    /**
     * @param argument The certificate associated parameters. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("fnuvnntbfehtefss")
    public suspend fun customSslOptions(argument: suspend CustomSslCustomSslOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = CustomSslCustomSslOptionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.customSslOptions = mapped
    }

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

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

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

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

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

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

    internal fun build(): CustomSslArgs = CustomSslArgs(
        customSslOptions = customSslOptions,
        customSslPriorities = customSslPriorities,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy