![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.wafv2.kotlin.RegexPatternSet.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.wafv2.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.wafv2.kotlin.enums.RegexPatternSetScope
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.wafv2.kotlin.enums.RegexPatternSetScope.Companion.toKotlin as regexPatternSetScopeToKotlin
/**
* Builder for [RegexPatternSet].
*/
@PulumiTagMarker
public class RegexPatternSetResourceBuilder internal constructor() {
public var name: String? = null
public var args: RegexPatternSetArgs = RegexPatternSetArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend RegexPatternSetArgsBuilder.() -> Unit) {
val builder = RegexPatternSetArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): RegexPatternSet {
val builtJavaResource = com.pulumi.awsnative.wafv2.RegexPatternSet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RegexPatternSet(builtJavaResource)
}
}
/**
* Contains a list of Regular expressions based on the provided inputs. RegexPatternSet can be used with other WAF entities with RegexPatternSetReferenceStatement to perform other actions .
*/
public class RegexPatternSet internal constructor(
override val javaResource: com.pulumi.awsnative.wafv2.RegexPatternSet,
) : KotlinCustomResource(javaResource, RegexPatternSetMapper) {
/**
* ARN of the WAF entity.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Id of the RegexPatternSet
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* Description of the entity.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Name of the RegexPatternSet.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The regular expression patterns in the set.
*/
public val regularExpressionList: Output>
get() = javaResource.regularExpressionList().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Use CLOUDFRONT for CloudFront RegexPatternSet, use REGIONAL for Application Load Balancer and API Gateway.
*/
public val scope: Output
get() = javaResource.scope().applyValue({ args0 ->
args0.let({ args0 ->
regexPatternSetScopeToKotlin(args0)
})
})
/**
* Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
* > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object RegexPatternSetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.wafv2.RegexPatternSet::class == javaResource::class
override fun map(javaResource: Resource): RegexPatternSet = RegexPatternSet(
javaResource as
com.pulumi.awsnative.wafv2.RegexPatternSet,
)
}
/**
* @see [RegexPatternSet].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [RegexPatternSet].
*/
public suspend fun regexPatternSet(
name: String,
block: suspend RegexPatternSetResourceBuilder.() -> Unit,
): RegexPatternSet {
val builder = RegexPatternSetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [RegexPatternSet].
* @param name The _unique_ name of the resulting resource.
*/
public fun regexPatternSet(name: String): RegexPatternSet {
val builder = RegexPatternSetResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy