Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@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.RuleGroupScope
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupCustomResponseBody
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupLabelSummary
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupRule
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupVisibilityConfig
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.wafv2.kotlin.enums.RuleGroupScope.Companion.toKotlin as ruleGroupScopeToKotlin
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupCustomResponseBody.Companion.toKotlin as ruleGroupCustomResponseBodyToKotlin
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupLabelSummary.Companion.toKotlin as ruleGroupLabelSummaryToKotlin
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupRule.Companion.toKotlin as ruleGroupRuleToKotlin
import com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupVisibilityConfig.Companion.toKotlin as ruleGroupVisibilityConfigToKotlin
/**
* Builder for [RuleGroup].
*/
@PulumiTagMarker
public class RuleGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: RuleGroupArgs = RuleGroupArgs()
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 RuleGroupArgsBuilder.() -> Unit) {
val builder = RuleGroupArgsBuilder()
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(): RuleGroup {
val builtJavaResource = com.pulumi.awsnative.wafv2.RuleGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RuleGroup(builtJavaResource)
}
}
/**
* Contains the Rules that identify the requests that you want to allow, block, or count. In a RuleGroup, you also specify a default action (ALLOW or BLOCK), and the action for each Rule that you add to a RuleGroup, for example, block requests from specified IP addresses or block requests from specified referrers. You also associate the RuleGroup with a CloudFront distribution to identify the requests that you want AWS WAF to filter. If you add more than one Rule to a RuleGroup, a request needs to match only one of the specifications to be allowed, blocked, or counted.
*/
public class RuleGroup internal constructor(
override val javaResource: com.pulumi.awsnative.wafv2.RuleGroup,
) : KotlinCustomResource(javaResource, RuleGroupMapper) {
/**
* The Amazon Resource Name (ARN) of the rule group.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Collection of Available Labels.
*/
public val availableLabels: Output>?
get() = javaResource.availableLabels().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
ruleGroupLabelSummaryToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The ID of the rule group.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* The web ACL capacity units (WCUs) required for this rule group.
* When you create your own rule group, you define this, and you cannot change it after creation. When you add or modify the rules in a rule group, AWS WAF enforces this limit.
* AWS WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. AWS WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
*/
public val capacity: Output
get() = javaResource.capacity().applyValue({ args0 -> args0 })
/**
* Collection of Consumed Labels.
*/
public val consumedLabels: Output>?
get() = javaResource.consumedLabels().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
ruleGroupLabelSummaryToKotlin(args0)
})
})
}).orElse(null)
})
/**
* A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.
* For information about customizing web requests and responses, see [Customizing web requests and responses in AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) in the *AWS WAF Developer Guide* .
* For information about the limits on count and size for custom request and response settings, see [AWS WAF quotas](https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the *AWS WAF Developer Guide* .
*/
public val customResponseBodies: Output