![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.wafv2.kotlin.LoggingConfiguration.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.wafv2.kotlin
import com.pulumi.awsnative.wafv2.kotlin.outputs.LoggingConfigurationFieldToMatch
import com.pulumi.awsnative.wafv2.kotlin.outputs.LoggingFilterProperties
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.wafv2.kotlin.outputs.LoggingConfigurationFieldToMatch.Companion.toKotlin as loggingConfigurationFieldToMatchToKotlin
import com.pulumi.awsnative.wafv2.kotlin.outputs.LoggingFilterProperties.Companion.toKotlin as loggingFilterPropertiesToKotlin
/**
* Builder for [LoggingConfiguration].
*/
@PulumiTagMarker
public class LoggingConfigurationResourceBuilder internal constructor() {
public var name: String? = null
public var args: LoggingConfigurationArgs = LoggingConfigurationArgs()
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 LoggingConfigurationArgsBuilder.() -> Unit) {
val builder = LoggingConfigurationArgsBuilder()
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(): LoggingConfiguration {
val builtJavaResource = com.pulumi.awsnative.wafv2.LoggingConfiguration(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LoggingConfiguration(builtJavaResource)
}
}
/**
* A WAFv2 Logging Configuration Resource Provider
*/
public class LoggingConfiguration internal constructor(
override val javaResource: com.pulumi.awsnative.wafv2.LoggingConfiguration,
) : KotlinCustomResource(javaResource, LoggingConfigurationMapper) {
/**
* The Amazon Resource Names (ARNs) of the logging destinations that you want to associate with the web ACL.
*/
public val logDestinationConfigs: Output>
get() = javaResource.logDestinationConfigs().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
*/
public val loggingFilter: Output?
get() = javaResource.loggingFilter().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> loggingFilterPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* Indicates whether the logging configuration was created by AWS Firewall Manager, as part of an AWS WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.
*/
public val managedByFirewallManager: Output
get() = javaResource.managedByFirewallManager().applyValue({ args0 -> args0 })
/**
* The parts of the request that you want to keep out of the logs. For example, if you redact the HEADER field, the HEADER field in the firehose will be xxx.
*/
public val redactedFields: Output>?
get() = javaResource.redactedFields().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
loggingConfigurationFieldToMatchToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs.
*/
public val resourceArn: Output
get() = javaResource.resourceArn().applyValue({ args0 -> args0 })
}
public object LoggingConfigurationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.wafv2.LoggingConfiguration::class == javaResource::class
override fun map(javaResource: Resource): LoggingConfiguration = LoggingConfiguration(
javaResource
as com.pulumi.awsnative.wafv2.LoggingConfiguration,
)
}
/**
* @see [LoggingConfiguration].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [LoggingConfiguration].
*/
public suspend fun loggingConfiguration(
name: String,
block: suspend LoggingConfigurationResourceBuilder.() -> Unit,
): LoggingConfiguration {
val builder = LoggingConfigurationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [LoggingConfiguration].
* @param name The _unique_ name of the resulting resource.
*/
public fun loggingConfiguration(name: String): LoggingConfiguration {
val builder = LoggingConfigurationResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy