com.pulumi.aws.wafv2.kotlin.WebAcl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.wafv2.kotlin
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclAssociationConfig
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclCaptchaConfig
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclChallengeConfig
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclCustomResponseBody
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclDefaultAction
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclRule
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclVisibilityConfig
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.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclAssociationConfig.Companion.toKotlin as webAclAssociationConfigToKotlin
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclCaptchaConfig.Companion.toKotlin as webAclCaptchaConfigToKotlin
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclChallengeConfig.Companion.toKotlin as webAclChallengeConfigToKotlin
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclCustomResponseBody.Companion.toKotlin as webAclCustomResponseBodyToKotlin
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclDefaultAction.Companion.toKotlin as webAclDefaultActionToKotlin
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclRule.Companion.toKotlin as webAclRuleToKotlin
import com.pulumi.aws.wafv2.kotlin.outputs.WebAclVisibilityConfig.Companion.toKotlin as webAclVisibilityConfigToKotlin
/**
* Builder for [WebAcl].
*/
@PulumiTagMarker
public class WebAclResourceBuilder internal constructor() {
public var name: String? = null
public var args: WebAclArgs = WebAclArgs()
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 WebAclArgsBuilder.() -> Unit) {
val builder = WebAclArgsBuilder()
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(): WebAcl {
val builtJavaResource = com.pulumi.aws.wafv2.WebAcl(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return WebAcl(builtJavaResource)
}
}
public class WebAcl internal constructor(
override val javaResource: com.pulumi.aws.wafv2.WebAcl,
) : KotlinCustomResource(javaResource, WebAclMapper) {
/**
* The URL to use in SDK integrations with managed rule groups.
*/
public val applicationIntegrationUrl: Output
get() = javaResource.applicationIntegrationUrl().applyValue({ args0 -> args0 })
/**
* The ARN of the WAF WebACL.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specifies custom configurations for the associations between the web ACL and protected resources. See `association_config` below for details.
*/
public val associationConfig: Output?
get() = javaResource.associationConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> webAclAssociationConfigToKotlin(args0) })
}).orElse(null)
})
/**
* Web ACL capacity units (WCUs) currently being used by this web ACL.
*/
public val capacity: Output
get() = javaResource.capacity().applyValue({ args0 -> args0 })
/**
* Specifies how AWS WAF should handle CAPTCHA evaluations on the ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `captcha_config` below for details.
*/
public val captchaConfig: Output?
get() = javaResource.captchaConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> webAclCaptchaConfigToKotlin(args0) })
}).orElse(null)
})
/**
* Specifies how AWS WAF should handle Challenge evaluations on the ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `challenge_config` below for details.
*/
public val challengeConfig: Output?
get() = javaResource.challengeConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> webAclChallengeConfigToKotlin(args0) })
}).orElse(null)
})
/**
* Defines custom response bodies that can be referenced by `custom_response` actions. See `custom_response_body` below for details.
*/
public val customResponseBodies: Output>?
get() = javaResource.customResponseBodies().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
webAclCustomResponseBodyToKotlin(args0)
})
})
}).orElse(null)
})
/**
* Action to perform if none of the `rules` contained in the WebACL match. See `default_action` below for details.
*/
public val defaultAction: Output
get() = javaResource.defaultAction().applyValue({ args0 ->
args0.let({ args0 ->
webAclDefaultActionToKotlin(args0)
})
})
/**
* Friendly description of the WebACL.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
public val lockToken: Output
get() = javaResource.lockToken().applyValue({ args0 -> args0 })
/**
* Friendly name of the WebACL.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Raw JSON string to allow more than three nested statements. Conflicts with `rule` attribute. This is for advanced use cases where more than 3 levels of nested statements are required. **There is no drift detection at this time**. If you use this attribute instead of `rule`, you will be foregoing drift detection. See the AWS [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateWebACL.html) for the JSON structure.
*/
public val ruleJson: Output?
get() = javaResource.ruleJson().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Rule blocks used to identify the web requests that you want to `allow`, `block`, or `count`. See `rule` below for details.
*/
public val rules: Output>?
get() = javaResource.rules().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> webAclRuleToKotlin(args0) })
})
}).orElse(null)
})
/**
* Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider.
*/
public val scope: Output
get() = javaResource.scope().applyValue({ args0 -> args0 })
/**
* Map of key-value pairs to associate with the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy