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

com.pulumi.awsnative.cloudfront.kotlin.inputs.DistributionRestrictionsArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudfront.kotlin.inputs

import com.pulumi.awsnative.cloudfront.inputs.DistributionRestrictionsArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * A complex type that identifies ways in which you want to restrict distribution of your content.
 * @property geoRestriction A complex type that controls the countries in which your content is distributed. CF determines the location of your users using ``MaxMind`` GeoIP databases. To disable geo restriction, remove the [Restrictions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-restrictions) property from your stack template.
 */
public data class DistributionRestrictionsArgs(
    public val geoRestriction: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudfront.inputs.DistributionRestrictionsArgs =
        com.pulumi.awsnative.cloudfront.inputs.DistributionRestrictionsArgs.builder()
            .geoRestriction(
                geoRestriction.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [DistributionRestrictionsArgs].
 */
@PulumiTagMarker
public class DistributionRestrictionsArgsBuilder internal constructor() {
    private var geoRestriction: Output? = null

    /**
     * @param value A complex type that controls the countries in which your content is distributed. CF determines the location of your users using ``MaxMind`` GeoIP databases. To disable geo restriction, remove the [Restrictions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-restrictions) property from your stack template.
     */
    @JvmName("khweidvujjkddahj")
    public suspend fun geoRestriction(`value`: Output) {
        this.geoRestriction = value
    }

    /**
     * @param value A complex type that controls the countries in which your content is distributed. CF determines the location of your users using ``MaxMind`` GeoIP databases. To disable geo restriction, remove the [Restrictions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-restrictions) property from your stack template.
     */
    @JvmName("djvybyrqeghekuvb")
    public suspend fun geoRestriction(`value`: DistributionGeoRestrictionArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.geoRestriction = mapped
    }

    /**
     * @param argument A complex type that controls the countries in which your content is distributed. CF determines the location of your users using ``MaxMind`` GeoIP databases. To disable geo restriction, remove the [Restrictions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-restrictions) property from your stack template.
     */
    @JvmName("evteewaestlqonom")
    public suspend fun geoRestriction(argument: suspend DistributionGeoRestrictionArgsBuilder.() -> Unit) {
        val toBeMapped = DistributionGeoRestrictionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.geoRestriction = mapped
    }

    internal fun build(): DistributionRestrictionsArgs = DistributionRestrictionsArgs(
        geoRestriction = geoRestriction ?: throw PulumiNullFieldException("geoRestriction"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy