com.pulumi.awsnative.shield.kotlin.DrtAccess.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.shield.kotlin
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
/**
* Builder for [DrtAccess].
*/
@PulumiTagMarker
public class DrtAccessResourceBuilder internal constructor() {
public var name: String? = null
public var args: DrtAccessArgs = DrtAccessArgs()
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 DrtAccessArgsBuilder.() -> Unit) {
val builder = DrtAccessArgsBuilder()
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(): DrtAccess {
val builtJavaResource = com.pulumi.awsnative.shield.DrtAccess(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DrtAccess(builtJavaResource)
}
}
/**
* Config the role and list of Amazon S3 log buckets used by the Shield Response Team (SRT) to access your AWS account while assisting with attack mitigation.
*/
public class DrtAccess internal constructor(
override val javaResource: com.pulumi.awsnative.shield.DrtAccess,
) : KotlinCustomResource(javaResource, DrtAccessMapper) {
/**
* The ID of the account that submitted the template.
*/
public val accountId: Output
get() = javaResource.accountId().applyValue({ args0 -> args0 })
/**
* Authorizes the Shield Response Team (SRT) to access the specified Amazon S3 bucket containing log data such as Application Load Balancer access logs, CloudFront logs, or logs from third party sources. You can associate up to 10 Amazon S3 buckets with your subscription.
*/
public val logBucketList: Output>?
get() = javaResource.logBucketList().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* Authorizes the Shield Response Team (SRT) using the specified role, to access your AWS account to assist with DDoS attack mitigation during potential attacks. This enables the SRT to inspect your AWS WAF configuration and create or update AWS WAF rules and web ACLs.
*/
public val roleArn: Output
get() = javaResource.roleArn().applyValue({ args0 -> args0 })
}
public object DrtAccessMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.shield.DrtAccess::class == javaResource::class
override fun map(javaResource: Resource): DrtAccess = DrtAccess(
javaResource as
com.pulumi.awsnative.shield.DrtAccess,
)
}
/**
* @see [DrtAccess].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DrtAccess].
*/
public suspend fun drtAccess(name: String, block: suspend DrtAccessResourceBuilder.() -> Unit): DrtAccess {
val builder = DrtAccessResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DrtAccess].
* @param name The _unique_ name of the resulting resource.
*/
public fun drtAccess(name: String): DrtAccess {
val builder = DrtAccessResourceBuilder()
builder.name(name)
return builder.build()
}