
com.pulumi.awsnative.s3.kotlin.inputs.BucketLoggingConfigurationArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3.kotlin.inputs
import com.pulumi.awsnative.s3.inputs.BucketLoggingConfigurationArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For examples and more information, see [PUT Bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in the *Amazon S3 API Reference*.
* To successfully complete the ``AWS::S3::Bucket LoggingConfiguration`` request, you must have ``s3:PutObject`` and ``s3:PutObjectAcl`` in your IAM permissions.
* @property destinationBucketName The name of the bucket where Amazon S3 should store server access log files. You can store log files in any bucket that you own. By default, logs are stored in the bucket where the ``LoggingConfiguration`` property is defined.
* @property logFilePrefix A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.
* @property targetObjectKeyFormat Amazon S3 key format for log objects. Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
*/
public data class BucketLoggingConfigurationArgs(
public val destinationBucketName: Output? = null,
public val logFilePrefix: Output? = null,
public val targetObjectKeyFormat: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketLoggingConfigurationArgs =
com.pulumi.awsnative.s3.inputs.BucketLoggingConfigurationArgs.builder()
.destinationBucketName(destinationBucketName?.applyValue({ args0 -> args0 }))
.logFilePrefix(logFilePrefix?.applyValue({ args0 -> args0 }))
.targetObjectKeyFormat(
targetObjectKeyFormat?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [BucketLoggingConfigurationArgs].
*/
@PulumiTagMarker
public class BucketLoggingConfigurationArgsBuilder internal constructor() {
private var destinationBucketName: Output? = null
private var logFilePrefix: Output? = null
private var targetObjectKeyFormat: Output? = null
/**
* @param value The name of the bucket where Amazon S3 should store server access log files. You can store log files in any bucket that you own. By default, logs are stored in the bucket where the ``LoggingConfiguration`` property is defined.
*/
@JvmName("lofvvynhqecwctus")
public suspend fun destinationBucketName(`value`: Output) {
this.destinationBucketName = value
}
/**
* @param value A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.
*/
@JvmName("mpjvxcyddcysuvry")
public suspend fun logFilePrefix(`value`: Output) {
this.logFilePrefix = value
}
/**
* @param value Amazon S3 key format for log objects. Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
*/
@JvmName("dcnefjdidjnbosjj")
public suspend fun targetObjectKeyFormat(`value`: Output) {
this.targetObjectKeyFormat = value
}
/**
* @param value The name of the bucket where Amazon S3 should store server access log files. You can store log files in any bucket that you own. By default, logs are stored in the bucket where the ``LoggingConfiguration`` property is defined.
*/
@JvmName("qigfgfpaqsnehkmq")
public suspend fun destinationBucketName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.destinationBucketName = mapped
}
/**
* @param value A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.
*/
@JvmName("xepxhqulxhuacete")
public suspend fun logFilePrefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.logFilePrefix = mapped
}
/**
* @param value Amazon S3 key format for log objects. Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
*/
@JvmName("twcmqsdlrrulcsqp")
public suspend fun targetObjectKeyFormat(`value`: BucketTargetObjectKeyFormatArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetObjectKeyFormat = mapped
}
/**
* @param argument Amazon S3 key format for log objects. Only one format, either PartitionedPrefix or SimplePrefix, is allowed.
*/
@JvmName("rhofhmgctgureykt")
public suspend fun targetObjectKeyFormat(argument: suspend BucketTargetObjectKeyFormatArgsBuilder.() -> Unit) {
val toBeMapped = BucketTargetObjectKeyFormatArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.targetObjectKeyFormat = mapped
}
internal fun build(): BucketLoggingConfigurationArgs = BucketLoggingConfigurationArgs(
destinationBucketName = destinationBucketName,
logFilePrefix = logFilePrefix,
targetObjectKeyFormat = targetObjectKeyFormat,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy