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

com.pulumi.alicloud.scdn.kotlin.DomainConfigArgs.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.scdn.kotlin

import com.pulumi.alicloud.scdn.DomainConfigArgs.builder
import com.pulumi.alicloud.scdn.kotlin.inputs.DomainConfigFunctionArgArgs
import com.pulumi.alicloud.scdn.kotlin.inputs.DomainConfigFunctionArgArgsBuilder
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 SCDN Accelerated Domain resource.
 * For information about domain config and how to use it, see [Batch set config](https://help.aliyun.com/document_detail/92912.html)
 * > **NOTE:** Available in v1.131.0+.
 * > **NOTE:** Alibaba Cloud SCDN has stopped new customer purchases from January 26, 2023, and you can choose to buy Alibaba Cloud DCDN products with more comprehensive acceleration and protection capabilities. If you are already a SCDN customer, you can submit a work order at any time to apply for a smooth migration to Alibaba Cloud DCDN products. In the future, we will provide better acceleration and security protection services in Alibaba Cloud DCDN, thank you for your understanding and cooperation.
 * > **DEPRECATED:**  This resource has been [deprecated](https://www.aliyun.com/product/scdn) from version `1.219.0`.
 * ## Example Usage
 * Basic Usage
 * 
 * ```yaml
 * resources:
 *   # Create a new Domain config.
 *   domain:
 *     type: alicloud:scdn:Domain
 *     properties:
 *       domainName: mydomain.alicloud-provider.cn
 *       cdnType: web
 *       scope: overseas
 *       sources:
 *         - content: 1.1.1.1
 *           type: ipaddr
 *           priority: '20'
 *           port: 80
 *   config:
 *     type: alicloud:scdn:DomainConfig
 *     properties:
 *       domainName: ${domain.domainName}
 *       functionName: ip_allow_list_set
 *       functionArgs:
 *         - argName: ip_list
 *           argValue: 110.110.110.110
 * ```
 * 
 * ## Import
 * SCDN domain config can be imported using the id, e.g.
 * ```sh
 * $ pulumi import alicloud:scdn/domainConfig:DomainConfig example ::
 * ```
 * @property domainName Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix `.sh` and `.tel` are not supported.
 * @property functionArgs The args of the domain config.
 * @property functionName The name of the domain config.
 */
public data class DomainConfigArgs(
    public val domainName: Output? = null,
    public val functionArgs: Output>? = null,
    public val functionName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.scdn.DomainConfigArgs =
        com.pulumi.alicloud.scdn.DomainConfigArgs.builder()
            .domainName(domainName?.applyValue({ args0 -> args0 }))
            .functionArgs(
                functionArgs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .functionName(functionName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DomainConfigArgs].
 */
@PulumiTagMarker
public class DomainConfigArgsBuilder internal constructor() {
    private var domainName: Output? = null

    private var functionArgs: Output>? = null

    private var functionName: Output? = null

    /**
     * @param value Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix `.sh` and `.tel` are not supported.
     */
    @JvmName("xxluiusemxcnanxx")
    public suspend fun domainName(`value`: Output) {
        this.domainName = value
    }

    /**
     * @param value The args of the domain config.
     */
    @JvmName("fjonixwegijvhgja")
    public suspend fun functionArgs(`value`: Output>) {
        this.functionArgs = value
    }

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

    /**
     * @param values The args of the domain config.
     */
    @JvmName("ndkrdjlymcdlhlek")
    public suspend fun functionArgs(values: List>) {
        this.functionArgs = Output.all(values)
    }

    /**
     * @param value The name of the domain config.
     */
    @JvmName("hjlnuidbmyedofev")
    public suspend fun functionName(`value`: Output) {
        this.functionName = value
    }

    /**
     * @param value Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix `.sh` and `.tel` are not supported.
     */
    @JvmName("nwxvxfvitnmvvgpp")
    public suspend fun domainName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainName = mapped
    }

    /**
     * @param value The args of the domain config.
     */
    @JvmName("slgnvrsrcgfjpmjq")
    public suspend fun functionArgs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionArgs = mapped
    }

    /**
     * @param argument The args of the domain config.
     */
    @JvmName("lkccidnhoufgekbc")
    public suspend fun functionArgs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DomainConfigFunctionArgArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.functionArgs = mapped
    }

    /**
     * @param argument The args of the domain config.
     */
    @JvmName("exnakrtvgamvfwew")
    public suspend fun functionArgs(vararg argument: suspend DomainConfigFunctionArgArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DomainConfigFunctionArgArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.functionArgs = mapped
    }

    /**
     * @param argument The args of the domain config.
     */
    @JvmName("ytevhgvlrnqxaapl")
    public suspend fun functionArgs(argument: suspend DomainConfigFunctionArgArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DomainConfigFunctionArgArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.functionArgs = mapped
    }

    /**
     * @param values The args of the domain config.
     */
    @JvmName("krafbqrbtibaccfq")
    public suspend fun functionArgs(vararg values: DomainConfigFunctionArgArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.functionArgs = mapped
    }

    /**
     * @param value The name of the domain config.
     */
    @JvmName("rfhhswcyofmepvyh")
    public suspend fun functionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionName = mapped
    }

    internal fun build(): DomainConfigArgs = DomainConfigArgs(
        domainName = domainName,
        functionArgs = functionArgs,
        functionName = functionName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy