All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.cloudtrail.kotlin.TrailArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudtrail.kotlin

import com.pulumi.awsnative.cloudtrail.TrailArgs.builder
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.TrailAdvancedEventSelectorArgs
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.TrailAdvancedEventSelectorArgsBuilder
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.TrailEventSelectorArgs
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.TrailEventSelectorArgsBuilder
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.TrailInsightSelectorArgs
import com.pulumi.awsnative.cloudtrail.kotlin.inputs.TrailInsightSelectorArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
 * @property advancedEventSelectors The advanced event selectors that were used to select events for the data store.
 * @property cloudWatchLogsLogGroupArn Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
 * @property cloudWatchLogsRoleArn Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
 * @property enableLogFileValidation Specifies whether log file validation is enabled. The default is false.
 * @property eventSelectors Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
 * @property includeGlobalServiceEvents Specifies whether the trail is publishing events from global services such as IAM to the log files.
 * @property insightSelectors Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
 * @property isLogging Whether the CloudTrail is currently logging AWS API calls.
 * @property isMultiRegionTrail Specifies whether the trail applies only to the current region or to all regions. The default is false. If the trail exists only in the current region and this value is set to true, shadow trails (replications of the trail) will be created in the other regions. If the trail exists in all regions and this value is set to false, the trail will remain in the region where it was created, and its shadow trails in other regions will be deleted. As a best practice, consider using trails that log events in all regions.
 * @property isOrganizationTrail Specifies whether the trail is created for all accounts in an organization in AWS Organizations, or only for the current AWS account. The default is false, and cannot be true unless the call is made on behalf of an AWS account that is the master account for an organization in AWS Organizations.
 * @property kmsKeyId Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by 'alias/', a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
 * @property s3BucketName Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
 * @property s3KeyPrefix Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
 * @property snsTopicName Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
 * @property tags A custom set of tags (key-value pairs) for this trail.
 * @property trailName Specifies the name of the trail. The name must meet the following requirements:
 * - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
 * - Start with a letter or number, and end with a letter or number
 * - Be between 3 and 128 characters
 * - Have no adjacent periods, underscores or dashes. Names like `my-_namespace` and `my--namespace` are not valid.
 * - Not be in IP address format (for example, 192.168.5.4)
 */
public data class TrailArgs(
    public val advancedEventSelectors: Output>? = null,
    public val cloudWatchLogsLogGroupArn: Output? = null,
    public val cloudWatchLogsRoleArn: Output? = null,
    public val enableLogFileValidation: Output? = null,
    public val eventSelectors: Output>? = null,
    public val includeGlobalServiceEvents: Output? = null,
    public val insightSelectors: Output>? = null,
    public val isLogging: Output? = null,
    public val isMultiRegionTrail: Output? = null,
    public val isOrganizationTrail: Output? = null,
    public val kmsKeyId: Output? = null,
    public val s3BucketName: Output? = null,
    public val s3KeyPrefix: Output? = null,
    public val snsTopicName: Output? = null,
    public val tags: Output>? = null,
    public val trailName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudtrail.TrailArgs =
        com.pulumi.awsnative.cloudtrail.TrailArgs.builder()
            .advancedEventSelectors(
                advancedEventSelectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .cloudWatchLogsLogGroupArn(cloudWatchLogsLogGroupArn?.applyValue({ args0 -> args0 }))
            .cloudWatchLogsRoleArn(cloudWatchLogsRoleArn?.applyValue({ args0 -> args0 }))
            .enableLogFileValidation(enableLogFileValidation?.applyValue({ args0 -> args0 }))
            .eventSelectors(
                eventSelectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .includeGlobalServiceEvents(includeGlobalServiceEvents?.applyValue({ args0 -> args0 }))
            .insightSelectors(
                insightSelectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .isLogging(isLogging?.applyValue({ args0 -> args0 }))
            .isMultiRegionTrail(isMultiRegionTrail?.applyValue({ args0 -> args0 }))
            .isOrganizationTrail(isOrganizationTrail?.applyValue({ args0 -> args0 }))
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .s3BucketName(s3BucketName?.applyValue({ args0 -> args0 }))
            .s3KeyPrefix(s3KeyPrefix?.applyValue({ args0 -> args0 }))
            .snsTopicName(snsTopicName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .trailName(trailName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TrailArgs].
 */
@PulumiTagMarker
public class TrailArgsBuilder internal constructor() {
    private var advancedEventSelectors: Output>? = null

    private var cloudWatchLogsLogGroupArn: Output? = null

    private var cloudWatchLogsRoleArn: Output? = null

    private var enableLogFileValidation: Output? = null

    private var eventSelectors: Output>? = null

    private var includeGlobalServiceEvents: Output? = null

    private var insightSelectors: Output>? = null

    private var isLogging: Output? = null

    private var isMultiRegionTrail: Output? = null

    private var isOrganizationTrail: Output? = null

    private var kmsKeyId: Output? = null

    private var s3BucketName: Output? = null

    private var s3KeyPrefix: Output? = null

    private var snsTopicName: Output? = null

    private var tags: Output>? = null

    private var trailName: Output? = null

    /**
     * @param value The advanced event selectors that were used to select events for the data store.
     */
    @JvmName("psmrhdvcyalessci")
    public suspend fun advancedEventSelectors(`value`: Output>) {
        this.advancedEventSelectors = value
    }

    @JvmName("uycxljfduwtyamyr")
    public suspend fun advancedEventSelectors(vararg values: Output) {
        this.advancedEventSelectors = Output.all(values.asList())
    }

    /**
     * @param values The advanced event selectors that were used to select events for the data store.
     */
    @JvmName("gupsillfffogqdls")
    public suspend fun advancedEventSelectors(values: List>) {
        this.advancedEventSelectors = Output.all(values)
    }

    /**
     * @param value Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
     */
    @JvmName("cdtqydtjrxijaufv")
    public suspend fun cloudWatchLogsLogGroupArn(`value`: Output) {
        this.cloudWatchLogsLogGroupArn = value
    }

    /**
     * @param value Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
     */
    @JvmName("jautegnxsyulmono")
    public suspend fun cloudWatchLogsRoleArn(`value`: Output) {
        this.cloudWatchLogsRoleArn = value
    }

    /**
     * @param value Specifies whether log file validation is enabled. The default is false.
     */
    @JvmName("rauabdrxlgdpfjof")
    public suspend fun enableLogFileValidation(`value`: Output) {
        this.enableLogFileValidation = value
    }

    /**
     * @param value Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
     */
    @JvmName("rmfieepyonpbilom")
    public suspend fun eventSelectors(`value`: Output>) {
        this.eventSelectors = value
    }

    @JvmName("phhvoprvveypkrtj")
    public suspend fun eventSelectors(vararg values: Output) {
        this.eventSelectors = Output.all(values.asList())
    }

    /**
     * @param values Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
     */
    @JvmName("wpxmvksaxekoemhu")
    public suspend fun eventSelectors(values: List>) {
        this.eventSelectors = Output.all(values)
    }

    /**
     * @param value Specifies whether the trail is publishing events from global services such as IAM to the log files.
     */
    @JvmName("hrvsftqrxufwgnya")
    public suspend fun includeGlobalServiceEvents(`value`: Output) {
        this.includeGlobalServiceEvents = value
    }

    /**
     * @param value Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
     */
    @JvmName("wsglgpbysyynvpfq")
    public suspend fun insightSelectors(`value`: Output>) {
        this.insightSelectors = value
    }

    @JvmName("pdfvjbkuwivaadmy")
    public suspend fun insightSelectors(vararg values: Output) {
        this.insightSelectors = Output.all(values.asList())
    }

    /**
     * @param values Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
     */
    @JvmName("awsxvlkywjmfnaxh")
    public suspend fun insightSelectors(values: List>) {
        this.insightSelectors = Output.all(values)
    }

    /**
     * @param value Whether the CloudTrail is currently logging AWS API calls.
     */
    @JvmName("jbmynsqdkfgylbaw")
    public suspend fun isLogging(`value`: Output) {
        this.isLogging = value
    }

    /**
     * @param value Specifies whether the trail applies only to the current region or to all regions. The default is false. If the trail exists only in the current region and this value is set to true, shadow trails (replications of the trail) will be created in the other regions. If the trail exists in all regions and this value is set to false, the trail will remain in the region where it was created, and its shadow trails in other regions will be deleted. As a best practice, consider using trails that log events in all regions.
     */
    @JvmName("gndiomsebndedanf")
    public suspend fun isMultiRegionTrail(`value`: Output) {
        this.isMultiRegionTrail = value
    }

    /**
     * @param value Specifies whether the trail is created for all accounts in an organization in AWS Organizations, or only for the current AWS account. The default is false, and cannot be true unless the call is made on behalf of an AWS account that is the master account for an organization in AWS Organizations.
     */
    @JvmName("thcdrulqpliialej")
    public suspend fun isOrganizationTrail(`value`: Output) {
        this.isOrganizationTrail = value
    }

    /**
     * @param value Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by 'alias/', a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
     */
    @JvmName("bvscpybckskiqfau")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
     */
    @JvmName("hjysvfxbevjpsxyq")
    public suspend fun s3BucketName(`value`: Output) {
        this.s3BucketName = value
    }

    /**
     * @param value Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
     */
    @JvmName("cuesqkxvoqthaeqf")
    public suspend fun s3KeyPrefix(`value`: Output) {
        this.s3KeyPrefix = value
    }

    /**
     * @param value Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
     */
    @JvmName("wpatpvxwtlaooqqp")
    public suspend fun snsTopicName(`value`: Output) {
        this.snsTopicName = value
    }

    /**
     * @param value A custom set of tags (key-value pairs) for this trail.
     */
    @JvmName("wufxrwdxkfldkebs")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("isfejhxfmcvgfkbv")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values A custom set of tags (key-value pairs) for this trail.
     */
    @JvmName("xaqeucwreurmutyp")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Specifies the name of the trail. The name must meet the following requirements:
     * - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
     * - Start with a letter or number, and end with a letter or number
     * - Be between 3 and 128 characters
     * - Have no adjacent periods, underscores or dashes. Names like `my-_namespace` and `my--namespace` are not valid.
     * - Not be in IP address format (for example, 192.168.5.4)
     */
    @JvmName("lxmmypetakajopih")
    public suspend fun trailName(`value`: Output) {
        this.trailName = value
    }

    /**
     * @param value The advanced event selectors that were used to select events for the data store.
     */
    @JvmName("nwfgrocegwaidnpy")
    public suspend fun advancedEventSelectors(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advancedEventSelectors = mapped
    }

    /**
     * @param argument The advanced event selectors that were used to select events for the data store.
     */
    @JvmName("hvpoxyimumoloakr")
    public suspend fun advancedEventSelectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrailAdvancedEventSelectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.advancedEventSelectors = mapped
    }

    /**
     * @param argument The advanced event selectors that were used to select events for the data store.
     */
    @JvmName("ynnohphogxqoyycm")
    public suspend fun advancedEventSelectors(vararg argument: suspend TrailAdvancedEventSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TrailAdvancedEventSelectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.advancedEventSelectors = mapped
    }

    /**
     * @param argument The advanced event selectors that were used to select events for the data store.
     */
    @JvmName("wdfohgsburiftsqy")
    public suspend fun advancedEventSelectors(argument: suspend TrailAdvancedEventSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TrailAdvancedEventSelectorArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.advancedEventSelectors = mapped
    }

    /**
     * @param values The advanced event selectors that were used to select events for the data store.
     */
    @JvmName("uiiqnifloeqnkxsf")
    public suspend fun advancedEventSelectors(vararg values: TrailAdvancedEventSelectorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.advancedEventSelectors = mapped
    }

    /**
     * @param value Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
     */
    @JvmName("pirrcsomrlosbahf")
    public suspend fun cloudWatchLogsLogGroupArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudWatchLogsLogGroupArn = mapped
    }

    /**
     * @param value Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
     */
    @JvmName("kqvmamnolhbyiesp")
    public suspend fun cloudWatchLogsRoleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudWatchLogsRoleArn = mapped
    }

    /**
     * @param value Specifies whether log file validation is enabled. The default is false.
     */
    @JvmName("hbmuwchpajmkkukd")
    public suspend fun enableLogFileValidation(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableLogFileValidation = mapped
    }

    /**
     * @param value Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
     */
    @JvmName("tsytppfqlodrlofm")
    public suspend fun eventSelectors(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventSelectors = mapped
    }

    /**
     * @param argument Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
     */
    @JvmName("uerasfpeglvnrblo")
    public suspend fun eventSelectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrailEventSelectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.eventSelectors = mapped
    }

    /**
     * @param argument Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
     */
    @JvmName("xlrtegguuskelete")
    public suspend fun eventSelectors(vararg argument: suspend TrailEventSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TrailEventSelectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.eventSelectors = mapped
    }

    /**
     * @param argument Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
     */
    @JvmName("sehnumonwbxiuunj")
    public suspend fun eventSelectors(argument: suspend TrailEventSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TrailEventSelectorArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.eventSelectors = mapped
    }

    /**
     * @param values Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event. You can configure up to five event selectors for a trail.
     */
    @JvmName("qqypjicpawkwmjxw")
    public suspend fun eventSelectors(vararg values: TrailEventSelectorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventSelectors = mapped
    }

    /**
     * @param value Specifies whether the trail is publishing events from global services such as IAM to the log files.
     */
    @JvmName("xhposwbbqtysroqc")
    public suspend fun includeGlobalServiceEvents(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.includeGlobalServiceEvents = mapped
    }

    /**
     * @param value Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
     */
    @JvmName("hskuycduhhvuygym")
    public suspend fun insightSelectors(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.insightSelectors = mapped
    }

    /**
     * @param argument Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
     */
    @JvmName("rvdlqcdvuqratsdc")
    public suspend fun insightSelectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrailInsightSelectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.insightSelectors = mapped
    }

    /**
     * @param argument Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
     */
    @JvmName("drcscjjufexjdkms")
    public suspend fun insightSelectors(vararg argument: suspend TrailInsightSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TrailInsightSelectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.insightSelectors = mapped
    }

    /**
     * @param argument Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
     */
    @JvmName("oxaadmjpspnryvoc")
    public suspend fun insightSelectors(argument: suspend TrailInsightSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TrailInsightSelectorArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.insightSelectors = mapped
    }

    /**
     * @param values Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail.
     */
    @JvmName("ckytqvturksjumsu")
    public suspend fun insightSelectors(vararg values: TrailInsightSelectorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.insightSelectors = mapped
    }

    /**
     * @param value Whether the CloudTrail is currently logging AWS API calls.
     */
    @JvmName("wxnfjnrdlbwfcxio")
    public suspend fun isLogging(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isLogging = mapped
    }

    /**
     * @param value Specifies whether the trail applies only to the current region or to all regions. The default is false. If the trail exists only in the current region and this value is set to true, shadow trails (replications of the trail) will be created in the other regions. If the trail exists in all regions and this value is set to false, the trail will remain in the region where it was created, and its shadow trails in other regions will be deleted. As a best practice, consider using trails that log events in all regions.
     */
    @JvmName("nkyvdfayghotjkrr")
    public suspend fun isMultiRegionTrail(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isMultiRegionTrail = mapped
    }

    /**
     * @param value Specifies whether the trail is created for all accounts in an organization in AWS Organizations, or only for the current AWS account. The default is false, and cannot be true unless the call is made on behalf of an AWS account that is the master account for an organization in AWS Organizations.
     */
    @JvmName("qacyenhknyfradfr")
    public suspend fun isOrganizationTrail(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isOrganizationTrail = mapped
    }

    /**
     * @param value Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by 'alias/', a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
     */
    @JvmName("yrygxflskpnkxdyj")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
     */
    @JvmName("uuerbgbbplnodgek")
    public suspend fun s3BucketName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.s3BucketName = mapped
    }

    /**
     * @param value Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
     */
    @JvmName("eknknppmqldtrcwq")
    public suspend fun s3KeyPrefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.s3KeyPrefix = mapped
    }

    /**
     * @param value Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
     */
    @JvmName("meamjapgbdblxddg")
    public suspend fun snsTopicName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snsTopicName = mapped
    }

    /**
     * @param value A custom set of tags (key-value pairs) for this trail.
     */
    @JvmName("vqqfihlqauksixmr")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument A custom set of tags (key-value pairs) for this trail.
     */
    @JvmName("xgonrrchvwjoauoy")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A custom set of tags (key-value pairs) for this trail.
     */
    @JvmName("pbachqmaqkugksra")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A custom set of tags (key-value pairs) for this trail.
     */
    @JvmName("myaxvkvokcgrmoms")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values A custom set of tags (key-value pairs) for this trail.
     */
    @JvmName("bihkadjnkcmwkdrg")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies the name of the trail. The name must meet the following requirements:
     * - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
     * - Start with a letter or number, and end with a letter or number
     * - Be between 3 and 128 characters
     * - Have no adjacent periods, underscores or dashes. Names like `my-_namespace` and `my--namespace` are not valid.
     * - Not be in IP address format (for example, 192.168.5.4)
     */
    @JvmName("epirorvckdtjosgl")
    public suspend fun trailName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trailName = mapped
    }

    internal fun build(): TrailArgs = TrailArgs(
        advancedEventSelectors = advancedEventSelectors,
        cloudWatchLogsLogGroupArn = cloudWatchLogsLogGroupArn,
        cloudWatchLogsRoleArn = cloudWatchLogsRoleArn,
        enableLogFileValidation = enableLogFileValidation,
        eventSelectors = eventSelectors,
        includeGlobalServiceEvents = includeGlobalServiceEvents,
        insightSelectors = insightSelectors,
        isLogging = isLogging,
        isMultiRegionTrail = isMultiRegionTrail,
        isOrganizationTrail = isOrganizationTrail,
        kmsKeyId = kmsKeyId,
        s3BucketName = s3BucketName,
        s3KeyPrefix = s3KeyPrefix,
        snsTopicName = snsTopicName,
        tags = tags,
        trailName = trailName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy