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.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