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.
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3.kotlin
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.s3.BucketArgs.builder
import com.pulumi.awsnative.s3.kotlin.enums.BucketAccessControl
import com.pulumi.awsnative.s3.kotlin.inputs.BucketAccelerateConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketAccelerateConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketAnalyticsConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketAnalyticsConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketCorsConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketCorsConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketEncryptionArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketEncryptionArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketIntelligentTieringConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketIntelligentTieringConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketInventoryConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketInventoryConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketLifecycleConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketLifecycleConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketLoggingConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketLoggingConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketMetricsConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketMetricsConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketNotificationConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketNotificationConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketObjectLockConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketObjectLockConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketOwnershipControlsArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketOwnershipControlsArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketPublicAccessBlockConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketPublicAccessBlockConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketReplicationConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketReplicationConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketVersioningConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketVersioningConfigurationArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.BucketWebsiteConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.BucketWebsiteConfigurationArgsBuilder
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
/**
* The ``AWS::S3::Bucket`` resource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack.
* To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to *retain* the bucket or to *delete* the bucket. For more information, see [DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html).
* You can only delete empty buckets. Deletion fails for buckets that have contents.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* @property accelerateConfiguration Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see [Amazon S3 Transfer Acceleration](https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) in the *Amazon S3 User Guide*.
* @property accessControl This is a legacy property, and it is not recommended for most use cases. A majority of modern use cases in Amazon S3 no longer require the use of ACLs, and we recommend that you keep ACLs disabled. For more information, see [Controlling object ownership](https://docs.aws.amazon.com//AmazonS3/latest/userguide/about-object-ownership.html) in the *Amazon S3 User Guide*.
* A canned access control list (ACL) that grants predefined permissions to the bucket. For more information about canned ACLs, see [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) in the *Amazon S3 User Guide*.
* S3 buckets are created with ACLs disabled by default. Therefore, unless you explicitly set the [AWS::S3::OwnershipControls](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.html) property to enable ACLs, your resource will fail to deploy with any value other than Private. Use cases requiring ACLs are uncommon.
* The majority of access control configurations can be successfully and more easily achieved with bucket policies. For more information, see [AWS::S3::BucketPolicy](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html). For examples of common policy configurations, including S3 Server Access Logs buckets and more, see [Bucket policy examples](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html) in the *Amazon S3 User Guide*.
* @property analyticsConfigurations Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.
* @property bucketEncryption Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS). For information about the Amazon S3 default encryption feature, see [Amazon S3 Default Encryption for S3 Buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) in the *Amazon S3 User Guide*.
* @property bucketName A name for the bucket. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow [Amazon S3 bucket restrictions and limitations](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html). For more information, see [Rules for naming Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules) in the *Amazon S3 User Guide*.
* If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.
* @property corsConfiguration Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see [Enabling Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the *Amazon S3 User Guide*.
* @property intelligentTieringConfigurations Defines how Amazon S3 handles Intelligent-Tiering storage.
* @property inventoryConfigurations Specifies the inventory configuration for an Amazon S3 bucket. For more information, see [GET Bucket inventory](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html) in the *Amazon S3 API Reference*.
* @property lifecycleConfiguration Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more information, see [Object Lifecycle Management](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) in the *Amazon S3 User Guide*.
* @property loggingConfiguration Settings that define where logs are stored.
* @property metricsConfigurations Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don't include the elements you want to keep, they are erased. For more information, see [PutBucketMetricsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html).
* @property notificationConfiguration Configuration that defines how Amazon S3 handles bucket notifications.
* @property objectLockConfiguration This operation is not supported by directory buckets.
* Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see [Locking Objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
* + The ``DefaultRetention`` settings require both a mode and a period.
* + The ``DefaultRetention`` period can be either ``Days`` or ``Years`` but you must select one. You cannot specify ``Days`` and ``Years`` at the same time.
* + You can enable Object Lock for new or existing buckets. For more information, see [Configuring Object Lock](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.html).
* @property objectLockEnabled Indicates whether this bucket has an Object Lock configuration enabled. Enable ``ObjectLockEnabled`` when you apply ``ObjectLockConfiguration`` to a bucket.
* @property ownershipControls Configuration that defines how Amazon S3 handles Object Ownership rules.
* @property publicAccessBlockConfiguration Configuration that defines how Amazon S3 handles public access.
* @property replicationConfiguration Configuration for replicating objects in an S3 bucket. To enable replication, you must also enable versioning by using the ``VersioningConfiguration`` property.
* Amazon S3 can store replicated objects in a single destination bucket or multiple destination buckets. The destination bucket or buckets must already exist.
* @property tags An arbitrary set of tags (key-value pairs) for this S3 bucket.
* @property versioningConfiguration Enables multiple versions of all objects in this bucket. You might enable versioning to prevent objects from being deleted or overwritten by mistake or to archive objects so that you can retrieve previous versions of them.
* @property websiteConfiguration Information used to configure the bucket as a static website. For more information, see [Hosting Websites on Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
*/
public data class BucketArgs(
public val accelerateConfiguration: Output? = null,
public val accessControl: Output? = null,
public val analyticsConfigurations: Output>? = null,
public val bucketEncryption: Output? = null,
public val bucketName: Output? = null,
public val corsConfiguration: Output? = null,
public val intelligentTieringConfigurations: Output>? = null,
public val inventoryConfigurations: Output>? = null,
public val lifecycleConfiguration: Output? = null,
public val loggingConfiguration: Output? = null,
public val metricsConfigurations: Output>? = null,
public val notificationConfiguration: Output? = null,
public val objectLockConfiguration: Output? = null,
public val objectLockEnabled: Output? = null,
public val ownershipControls: Output? = null,
public val publicAccessBlockConfiguration: Output? =
null,
public val replicationConfiguration: Output? = null,
public val tags: Output>? = null,
public val versioningConfiguration: Output? = null,
public val websiteConfiguration: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.s3.BucketArgs =
com.pulumi.awsnative.s3.BucketArgs.builder()
.accelerateConfiguration(
accelerateConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.accessControl(accessControl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.analyticsConfigurations(
analyticsConfigurations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.bucketEncryption(bucketEncryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.bucketName(bucketName?.applyValue({ args0 -> args0 }))
.corsConfiguration(corsConfiguration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.intelligentTieringConfigurations(
intelligentTieringConfigurations?.applyValue({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.inventoryConfigurations(
inventoryConfigurations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.lifecycleConfiguration(
lifecycleConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.loggingConfiguration(
loggingConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.metricsConfigurations(
metricsConfigurations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.notificationConfiguration(
notificationConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.objectLockConfiguration(
objectLockConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.objectLockEnabled(objectLockEnabled?.applyValue({ args0 -> args0 }))
.ownershipControls(ownershipControls?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.publicAccessBlockConfiguration(
publicAccessBlockConfiguration?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
)
.replicationConfiguration(
replicationConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.versioningConfiguration(
versioningConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.websiteConfiguration(
websiteConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [BucketArgs].
*/
@PulumiTagMarker
public class BucketArgsBuilder internal constructor() {
private var accelerateConfiguration: Output? = null
private var accessControl: Output? = null
private var analyticsConfigurations: Output>? = null
private var bucketEncryption: Output? = null
private var bucketName: Output? = null
private var corsConfiguration: Output? = null
private var intelligentTieringConfigurations:
Output>? = null
private var inventoryConfigurations: Output>? = null
private var lifecycleConfiguration: Output? = null
private var loggingConfiguration: Output? = null
private var metricsConfigurations: Output>? = null
private var notificationConfiguration: Output? = null
private var objectLockConfiguration: Output? = null
private var objectLockEnabled: Output? = null
private var ownershipControls: Output? = null
private var publicAccessBlockConfiguration: Output? =
null
private var replicationConfiguration: Output? = null
private var tags: Output>? = null
private var versioningConfiguration: Output? = null
private var websiteConfiguration: Output? = null
/**
* @param value Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see [Amazon S3 Transfer Acceleration](https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) in the *Amazon S3 User Guide*.
*/
@JvmName("oxvqfxiyrgbttghf")
public suspend fun accelerateConfiguration(`value`: Output) {
this.accelerateConfiguration = value
}
/**
* @param value This is a legacy property, and it is not recommended for most use cases. A majority of modern use cases in Amazon S3 no longer require the use of ACLs, and we recommend that you keep ACLs disabled. For more information, see [Controlling object ownership](https://docs.aws.amazon.com//AmazonS3/latest/userguide/about-object-ownership.html) in the *Amazon S3 User Guide*.
* A canned access control list (ACL) that grants predefined permissions to the bucket. For more information about canned ACLs, see [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) in the *Amazon S3 User Guide*.
* S3 buckets are created with ACLs disabled by default. Therefore, unless you explicitly set the [AWS::S3::OwnershipControls](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ownershipcontrols.html) property to enable ACLs, your resource will fail to deploy with any value other than Private. Use cases requiring ACLs are uncommon.
* The majority of access control configurations can be successfully and more easily achieved with bucket policies. For more information, see [AWS::S3::BucketPolicy](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html). For examples of common policy configurations, including S3 Server Access Logs buckets and more, see [Bucket policy examples](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html) in the *Amazon S3 User Guide*.
*/
@JvmName("qivjtavsbjkbfhny")
public suspend fun accessControl(`value`: Output) {
this.accessControl = value
}
/**
* @param value Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.
*/
@JvmName("tvrcsbvrwmpwpghs")
public suspend fun analyticsConfigurations(`value`: Output>) {
this.analyticsConfigurations = value
}
@JvmName("ubmasehbfjgepkwc")
public suspend fun analyticsConfigurations(vararg values: Output) {
this.analyticsConfigurations = Output.all(values.asList())
}
/**
* @param values Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.
*/
@JvmName("hwdewsmajsphipbu")
public suspend fun analyticsConfigurations(values: List