# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class Bucket(pulumi.CustomResource):
    acceleration_status: pulumi.Output[str]
    """
    Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
    """
    acl: pulumi.Output[str]
    """
    The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Defaults to "private".  Conflicts with `grant`.
    """
    arn: pulumi.Output[str]
    """
    The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
    """
    bucket: pulumi.Output[str]
    """
    The name of the bucket. If omitted, this provider will assign a random, unique name.
    """
    bucket_domain_name: pulumi.Output[str]
    """
    The bucket domain name. Will be of format `bucketname.s3.amazonaws.com`.
    """
    bucket_prefix: pulumi.Output[str]
    """
    Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`.
    """
    bucket_regional_domain_name: pulumi.Output[str]
    """
    The bucket region-specific domain name. The bucket domain name including the region name, please refer [here](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent [redirect issues](https://forums.aws.amazon.com/thread.jspa?threadID=216814) from CloudFront to S3 Origin URL.
    """
    cors_rules: pulumi.Output[list]
    """
    A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).

      * `allowedHeaders` (`list`) - Specifies which headers are allowed.
      * `allowedMethods` (`list`) - Specifies which methods are allowed. Can be `GET`, `PUT`, `POST`, `DELETE` or `HEAD`.
      * `allowedOrigins` (`list`) - Specifies which origins are allowed.
      * `exposeHeaders` (`list`) - Specifies expose header in the response.
      * `maxAgeSeconds` (`float`) - Specifies time in seconds that browser can cache the response for a preflight request.
    """
    force_destroy: pulumi.Output[bool]
    """
    A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
    """
    grants: pulumi.Output[list]
    """
    An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.

      * `id` (`str`) - Canonical user id to grant for. Used only when `type` is `CanonicalUser`.  
      * `permissions` (`list`) - List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
      * `type` (`str`) - - Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
      * `uri` (`str`) - Uri address to grant for. Used only when `type` is `Group`.
    """
    hosted_zone_id: pulumi.Output[str]
    """
    The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
    """
    lifecycle_rules: pulumi.Output[list]
    """
    A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).

      * `abortIncompleteMultipartUploadDays` (`float`) - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
      * `enabled` (`bool`) - Specifies lifecycle rule status.
      * `expiration` (`dict`) - Specifies a period in the object's expire (documented below).
        * `date` (`str`) - Specifies the date after which you want the corresponding action to take effect.
        * `days` (`float`) - Specifies the number of days after object creation when the specific rule action takes effect.
        * `expiredObjectDeleteMarker` (`bool`) - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Amazon S3 to delete expired object delete markers.

      * `id` (`str`) - Unique identifier for the rule.
      * `noncurrentVersionExpiration` (`dict`) - Specifies when noncurrent object versions expire (documented below).
        * `days` (`float`) - Specifies the number of days an object is noncurrent object versions expire.

      * `noncurrentVersionTransitions` (`list`) - Specifies when noncurrent object versions transitions (documented below).
        * `days` (`float`) - Specifies the number of days an object is noncurrent object versions expire.
        * `storage_class` (`str`) - Specifies the Amazon S3 storage class to which you want the noncurrent versions object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

      * `prefix` (`str`) - Object key prefix identifying one or more objects to which the rule applies.
      * `tags` (`dict`) - Specifies object tags key and value.
      * `transitions` (`list`) - Specifies a period in the object's transitions (documented below).
        * `date` (`str`) - Specifies the date after which you want the corresponding action to take effect.
        * `days` (`float`) - Specifies the number of days after object creation when the specific rule action takes effect.
        * `storage_class` (`str`) - Specifies the Amazon S3 storage class to which you want the object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.
    """
    loggings: pulumi.Output[list]
    """
    A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).

      * `targetBucket` (`str`) - The name of the bucket that will receive the log objects.
      * `targetPrefix` (`str`) - To specify a key prefix for log objects.
    """
    object_lock_configuration: pulumi.Output[dict]
    """
    A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)

      * `objectLockEnabled` (`str`) - Indicates whether this bucket has an Object Lock configuration enabled. Valid value is `Enabled`.
      * `rule` (`dict`) - The Object Lock rule in place for this bucket.
        * `defaultRetention` (`dict`) - The default retention period that you want to apply to new objects placed in this bucket.
          * `days` (`float`) - The number of days that you want to specify for the default retention period.
          * `mode` (`str`) - The default Object Lock retention mode you want to apply to new objects placed in this bucket. Valid values are `GOVERNANCE` and `COMPLIANCE`.
          * `years` (`float`) - The number of years that you want to specify for the default retention period.
    """
    policy: pulumi.Output[str]
    """
    A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document.
    """
    region: pulumi.Output[str]
    """
    If specified, the AWS region this bucket should reside in. Otherwise, the region used by the callee.
    """
    replication_configuration: pulumi.Output[dict]
    """
    A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).

      * `role` (`str`) - The ARN of the IAM role for Amazon S3 to assume when replicating the objects.
      * `rules` (`list`) - Specifies the rules managing the replication (documented below).
        * `destination` (`dict`) - Specifies the destination for the rule (documented below).
          * `accessControlTranslation` (`dict`) - Specifies the overrides to use for object owners on replication. Must be used in conjunction with `account_id` owner override configuration.
            * `owner` (`str`) - The override value for the owner on replicated objects. Currently only `Destination` is supported.

          * `account_id` (`str`) - The Account ID to use for overriding the object owner on replication. Must be used in conjunction with `access_control_translation` override configuration.
          * `bucket` (`str`) - The ARN of the S3 bucket where you want Amazon S3 to store replicas of the object identified by the rule.
          * `replicaKmsKeyId` (`str`) - Destination KMS encryption key ARN for SSE-KMS replication. Must be used in conjunction with
            `sse_kms_encrypted_objects` source selection criteria.
          * `storage_class` (`str`) - The class of storage used to store the object. Can be `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`, `ONEZONE_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

        * `filter` (`dict`) - Filter that identifies subset of objects to which the replication rule applies (documented below).
          * `prefix` (`str`) - Object keyname prefix that identifies subset of objects to which the rule applies.
          * `tags` (`dict`) - A mapping of tags that identifies subset of objects to which the rule applies.
            The rule applies only to objects having all the tags in its tagset.

        * `id` (`str`) - Unique identifier for the rule.
        * `prefix` (`str`) - Object keyname prefix identifying one or more objects to which the rule applies.
        * `priority` (`float`) - The priority associated with the rule.
        * `sourceSelectionCriteria` (`dict`) - Specifies special object selection criteria (documented below).
          * `sseKmsEncryptedObjects` (`dict`) - Match SSE-KMS encrypted objects (documented below). If specified, `replica_kms_key_id`
            in `destination` must be specified as well.
            * `enabled` (`bool`) - Boolean which indicates if this criteria is enabled.

        * `status` (`str`) - The status of the rule. Either `Enabled` or `Disabled`. The rule is ignored if status is not Enabled.
    """
    request_payer: pulumi.Output[str]
    """
    Specifies who should bear the cost of Amazon S3 data transfer.
    Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
    the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
    developer guide for more information.
    """
    server_side_encryption_configuration: pulumi.Output[dict]
    """
    A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)

      * `rule` (`dict`) - A single object for server-side encryption by default configuration. (documented below)
        * `applyServerSideEncryptionByDefault` (`dict`) - A single object for setting server-side encryption by default. (documented below)
          * `kms_master_key_id` (`str`) - The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of `sse_algorithm` as `aws:kms`. The default `aws/s3` AWS KMS master key is used if this element is absent while the `sse_algorithm` is `aws:kms`.
          * `sseAlgorithm` (`str`) - The server-side encryption algorithm to use. Valid values are `AES256` and `aws:kms`
    """
    tags: pulumi.Output[dict]
    """
    A mapping of tags to assign to the bucket.
    """
    versioning: pulumi.Output[dict]
    """
    A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)

      * `enabled` (`bool`) - Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
      * `mfaDelete` (`bool`) - Enable MFA delete for either `Change the versioning state of your bucket` or `Permanently delete an object version`. Default is `false`.
    """
    website: pulumi.Output[dict]
    """
    A website object (documented below).

      * `errorDocument` (`str`) - An absolute path to the document to return in case of a 4XX error.
      * `indexDocument` (`str`) - Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders.
      * `redirectAllRequestsTo` (`str`) - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (`http://` or `https://`) to use when redirecting requests. The default is the protocol that is used in the original request.
      * `routingRules` (`dict`) - A json array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html)
        describing redirect behavior and when redirects are applied.
    """
    website_domain: pulumi.Output[str]
    """
    The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
    """
    website_endpoint: pulumi.Output[str]
    """
    The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.
    """
    def __init__(__self__, resource_name, opts=None, acceleration_status=None, acl=None, arn=None, bucket=None, bucket_prefix=None, cors_rules=None, force_destroy=None, grants=None, hosted_zone_id=None, lifecycle_rules=None, loggings=None, object_lock_configuration=None, policy=None, region=None, replication_configuration=None, request_payer=None, server_side_encryption_configuration=None, tags=None, versioning=None, website=None, website_domain=None, website_endpoint=None, __props__=None, __name__=None, __opts__=None):
        """
        Provides a S3 bucket resource.



        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] acceleration_status: Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
        :param pulumi.Input[dict] acl: The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Defaults to "private".  Conflicts with `grant`.
        :param pulumi.Input[str] arn: The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
        :param pulumi.Input[str] bucket: The name of the bucket. If omitted, this provider will assign a random, unique name.
        :param pulumi.Input[str] bucket_prefix: Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`.
        :param pulumi.Input[list] cors_rules: A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
        :param pulumi.Input[bool] force_destroy: A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
        :param pulumi.Input[list] grants: An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
        :param pulumi.Input[str] hosted_zone_id: The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
        :param pulumi.Input[list] lifecycle_rules: A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
        :param pulumi.Input[list] loggings: A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
        :param pulumi.Input[dict] object_lock_configuration: A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
        :param pulumi.Input[dict] policy: A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document.
        :param pulumi.Input[str] region: If specified, the AWS region this bucket should reside in. Otherwise, the region used by the callee.
        :param pulumi.Input[dict] replication_configuration: A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
        :param pulumi.Input[str] request_payer: Specifies who should bear the cost of Amazon S3 data transfer.
               Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
               the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
               developer guide for more information.
        :param pulumi.Input[dict] server_side_encryption_configuration: A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
        :param pulumi.Input[dict] tags: A mapping of tags to assign to the bucket.
        :param pulumi.Input[dict] versioning: A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
        :param pulumi.Input[dict] website: A website object (documented below).
        :param pulumi.Input[str] website_domain: The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
        :param pulumi.Input[str] website_endpoint: The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

        The **cors_rules** object supports the following:

          * `allowedHeaders` (`pulumi.Input[list]`) - Specifies which headers are allowed.
          * `allowedMethods` (`pulumi.Input[list]`) - Specifies which methods are allowed. Can be `GET`, `PUT`, `POST`, `DELETE` or `HEAD`.
          * `allowedOrigins` (`pulumi.Input[list]`) - Specifies which origins are allowed.
          * `exposeHeaders` (`pulumi.Input[list]`) - Specifies expose header in the response.
          * `maxAgeSeconds` (`pulumi.Input[float]`) - Specifies time in seconds that browser can cache the response for a preflight request.

        The **grants** object supports the following:

          * `id` (`pulumi.Input[str]`) - Canonical user id to grant for. Used only when `type` is `CanonicalUser`.  
          * `permissions` (`pulumi.Input[list]`) - List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
          * `type` (`pulumi.Input[str]`) - - Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
          * `uri` (`pulumi.Input[str]`) - Uri address to grant for. Used only when `type` is `Group`.

        The **lifecycle_rules** object supports the following:

          * `abortIncompleteMultipartUploadDays` (`pulumi.Input[float]`) - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
          * `enabled` (`pulumi.Input[bool]`) - Specifies lifecycle rule status.
          * `expiration` (`pulumi.Input[dict]`) - Specifies a period in the object's expire (documented below).
            * `date` (`pulumi.Input[str]`) - Specifies the date after which you want the corresponding action to take effect.
            * `days` (`pulumi.Input[float]`) - Specifies the number of days after object creation when the specific rule action takes effect.
            * `expiredObjectDeleteMarker` (`pulumi.Input[bool]`) - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Amazon S3 to delete expired object delete markers.

          * `id` (`pulumi.Input[str]`) - Unique identifier for the rule.
          * `noncurrentVersionExpiration` (`pulumi.Input[dict]`) - Specifies when noncurrent object versions expire (documented below).
            * `days` (`pulumi.Input[float]`) - Specifies the number of days an object is noncurrent object versions expire.

          * `noncurrentVersionTransitions` (`pulumi.Input[list]`) - Specifies when noncurrent object versions transitions (documented below).
            * `days` (`pulumi.Input[float]`) - Specifies the number of days an object is noncurrent object versions expire.
            * `storage_class` (`pulumi.Input[str]`) - Specifies the Amazon S3 storage class to which you want the noncurrent versions object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

          * `prefix` (`pulumi.Input[str]`) - Object key prefix identifying one or more objects to which the rule applies.
          * `tags` (`pulumi.Input[dict]`) - Specifies object tags key and value.
          * `transitions` (`pulumi.Input[list]`) - Specifies a period in the object's transitions (documented below).
            * `date` (`pulumi.Input[str]`) - Specifies the date after which you want the corresponding action to take effect.
            * `days` (`pulumi.Input[float]`) - Specifies the number of days after object creation when the specific rule action takes effect.
            * `storage_class` (`pulumi.Input[str]`) - Specifies the Amazon S3 storage class to which you want the object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

        The **loggings** object supports the following:

          * `targetBucket` (`pulumi.Input[str]`) - The name of the bucket that will receive the log objects.
          * `targetPrefix` (`pulumi.Input[str]`) - To specify a key prefix for log objects.

        The **object_lock_configuration** object supports the following:

          * `objectLockEnabled` (`pulumi.Input[str]`) - Indicates whether this bucket has an Object Lock configuration enabled. Valid value is `Enabled`.
          * `rule` (`pulumi.Input[dict]`) - The Object Lock rule in place for this bucket.
            * `defaultRetention` (`pulumi.Input[dict]`) - The default retention period that you want to apply to new objects placed in this bucket.
              * `days` (`pulumi.Input[float]`) - The number of days that you want to specify for the default retention period.
              * `mode` (`pulumi.Input[str]`) - The default Object Lock retention mode you want to apply to new objects placed in this bucket. Valid values are `GOVERNANCE` and `COMPLIANCE`.
              * `years` (`pulumi.Input[float]`) - The number of years that you want to specify for the default retention period.

        The **replication_configuration** object supports the following:

          * `role` (`pulumi.Input[str]`) - The ARN of the IAM role for Amazon S3 to assume when replicating the objects.
          * `rules` (`pulumi.Input[list]`) - Specifies the rules managing the replication (documented below).
            * `destination` (`pulumi.Input[dict]`) - Specifies the destination for the rule (documented below).
              * `accessControlTranslation` (`pulumi.Input[dict]`) - Specifies the overrides to use for object owners on replication. Must be used in conjunction with `account_id` owner override configuration.
                * `owner` (`pulumi.Input[str]`) - The override value for the owner on replicated objects. Currently only `Destination` is supported.

              * `account_id` (`pulumi.Input[str]`) - The Account ID to use for overriding the object owner on replication. Must be used in conjunction with `access_control_translation` override configuration.
              * `bucket` (`pulumi.Input[str]`) - The ARN of the S3 bucket where you want Amazon S3 to store replicas of the object identified by the rule.
              * `replicaKmsKeyId` (`pulumi.Input[str]`) - Destination KMS encryption key ARN for SSE-KMS replication. Must be used in conjunction with
                `sse_kms_encrypted_objects` source selection criteria.
              * `storage_class` (`pulumi.Input[str]`) - The class of storage used to store the object. Can be `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`, `ONEZONE_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

            * `filter` (`pulumi.Input[dict]`) - Filter that identifies subset of objects to which the replication rule applies (documented below).
              * `prefix` (`pulumi.Input[str]`) - Object keyname prefix that identifies subset of objects to which the rule applies.
              * `tags` (`pulumi.Input[dict]`) - A mapping of tags that identifies subset of objects to which the rule applies.
                The rule applies only to objects having all the tags in its tagset.

            * `id` (`pulumi.Input[str]`) - Unique identifier for the rule.
            * `prefix` (`pulumi.Input[str]`) - Object keyname prefix identifying one or more objects to which the rule applies.
            * `priority` (`pulumi.Input[float]`) - The priority associated with the rule.
            * `sourceSelectionCriteria` (`pulumi.Input[dict]`) - Specifies special object selection criteria (documented below).
              * `sseKmsEncryptedObjects` (`pulumi.Input[dict]`) - Match SSE-KMS encrypted objects (documented below). If specified, `replica_kms_key_id`
                in `destination` must be specified as well.
                * `enabled` (`pulumi.Input[bool]`) - Boolean which indicates if this criteria is enabled.

            * `status` (`pulumi.Input[str]`) - The status of the rule. Either `Enabled` or `Disabled`. The rule is ignored if status is not Enabled.

        The **server_side_encryption_configuration** object supports the following:

          * `rule` (`pulumi.Input[dict]`) - A single object for server-side encryption by default configuration. (documented below)
            * `applyServerSideEncryptionByDefault` (`pulumi.Input[dict]`) - A single object for setting server-side encryption by default. (documented below)
              * `kms_master_key_id` (`pulumi.Input[str]`) - The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of `sse_algorithm` as `aws:kms`. The default `aws/s3` AWS KMS master key is used if this element is absent while the `sse_algorithm` is `aws:kms`.
              * `sseAlgorithm` (`pulumi.Input[str]`) - The server-side encryption algorithm to use. Valid values are `AES256` and `aws:kms`

        The **versioning** object supports the following:

          * `enabled` (`pulumi.Input[bool]`) - Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
          * `mfaDelete` (`pulumi.Input[bool]`) - Enable MFA delete for either `Change the versioning state of your bucket` or `Permanently delete an object version`. Default is `false`.

        The **website** object supports the following:

          * `errorDocument` (`pulumi.Input[str]`) - An absolute path to the document to return in case of a 4XX error.
          * `indexDocument` (`pulumi.Input[str]`) - Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders.
          * `redirectAllRequestsTo` (`pulumi.Input[str]`) - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (`http://` or `https://`) to use when redirecting requests. The default is the protocol that is used in the original request.
          * `routingRules` (`pulumi.Input[dict]`) - A json array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html)
            describing redirect behavior and when redirects are applied.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            __props__['acceleration_status'] = acceleration_status
            __props__['acl'] = acl
            __props__['arn'] = arn
            __props__['bucket'] = bucket
            __props__['bucket_prefix'] = bucket_prefix
            __props__['cors_rules'] = cors_rules
            __props__['force_destroy'] = force_destroy
            __props__['grants'] = grants
            __props__['hosted_zone_id'] = hosted_zone_id
            __props__['lifecycle_rules'] = lifecycle_rules
            __props__['loggings'] = loggings
            __props__['object_lock_configuration'] = object_lock_configuration
            __props__['policy'] = policy
            __props__['region'] = region
            __props__['replication_configuration'] = replication_configuration
            __props__['request_payer'] = request_payer
            __props__['server_side_encryption_configuration'] = server_side_encryption_configuration
            __props__['tags'] = tags
            __props__['versioning'] = versioning
            __props__['website'] = website
            __props__['website_domain'] = website_domain
            __props__['website_endpoint'] = website_endpoint
            __props__['bucket_domain_name'] = None
            __props__['bucket_regional_domain_name'] = None
        super(Bucket, __self__).__init__(
            'aws:s3/bucket:Bucket',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, acceleration_status=None, acl=None, arn=None, bucket=None, bucket_domain_name=None, bucket_prefix=None, bucket_regional_domain_name=None, cors_rules=None, force_destroy=None, grants=None, hosted_zone_id=None, lifecycle_rules=None, loggings=None, object_lock_configuration=None, policy=None, region=None, replication_configuration=None, request_payer=None, server_side_encryption_configuration=None, tags=None, versioning=None, website=None, website_domain=None, website_endpoint=None):
        """
        Get an existing Bucket resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] acceleration_status: Sets the accelerate configuration of an existing bucket. Can be `Enabled` or `Suspended`.
        :param pulumi.Input[dict] acl: The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply. Defaults to "private".  Conflicts with `grant`.
        :param pulumi.Input[str] arn: The ARN of the bucket. Will be of format `arn:aws:s3:::bucketname`.
        :param pulumi.Input[str] bucket: The name of the bucket. If omitted, this provider will assign a random, unique name.
        :param pulumi.Input[str] bucket_domain_name: The bucket domain name. Will be of format `bucketname.s3.amazonaws.com`.
        :param pulumi.Input[str] bucket_prefix: Creates a unique bucket name beginning with the specified prefix. Conflicts with `bucket`.
        :param pulumi.Input[str] bucket_regional_domain_name: The bucket region-specific domain name. The bucket domain name including the region name, please refer [here](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent [redirect issues](https://forums.aws.amazon.com/thread.jspa?threadID=216814) from CloudFront to S3 Origin URL.
        :param pulumi.Input[list] cors_rules: A rule of [Cross-Origin Resource Sharing](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) (documented below).
        :param pulumi.Input[bool] force_destroy: A boolean that indicates all objects (including any [locked objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)) should be deleted from the bucket so that the bucket can be destroyed without error. These objects are *not* recoverable.
        :param pulumi.Input[list] grants: An [ACL policy grant](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#sample-acl) (documented below). Conflicts with `acl`.
        :param pulumi.Input[str] hosted_zone_id: The [Route 53 Hosted Zone ID](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) for this bucket's region.
        :param pulumi.Input[list] lifecycle_rules: A configuration of [object lifecycle management](http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (documented below).
        :param pulumi.Input[list] loggings: A settings of [bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html) (documented below).
        :param pulumi.Input[dict] object_lock_configuration: A configuration of [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) (documented below)
        :param pulumi.Input[dict] policy: A valid [bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html) JSON document.
        :param pulumi.Input[str] region: If specified, the AWS region this bucket should reside in. Otherwise, the region used by the callee.
        :param pulumi.Input[dict] replication_configuration: A configuration of [replication configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) (documented below).
        :param pulumi.Input[str] request_payer: Specifies who should bear the cost of Amazon S3 data transfer.
               Can be either `BucketOwner` or `Requester`. By default, the owner of the S3 bucket would incur
               the costs of any data transfer. See [Requester Pays Buckets](http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
               developer guide for more information.
        :param pulumi.Input[dict] server_side_encryption_configuration: A configuration of [server-side encryption configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) (documented below)
        :param pulumi.Input[dict] tags: A mapping of tags to assign to the bucket.
        :param pulumi.Input[dict] versioning: A state of [versioning](https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html) (documented below)
        :param pulumi.Input[dict] website: A website object (documented below).
        :param pulumi.Input[str] website_domain: The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.
        :param pulumi.Input[str] website_endpoint: The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

        The **cors_rules** object supports the following:

          * `allowedHeaders` (`pulumi.Input[list]`) - Specifies which headers are allowed.
          * `allowedMethods` (`pulumi.Input[list]`) - Specifies which methods are allowed. Can be `GET`, `PUT`, `POST`, `DELETE` or `HEAD`.
          * `allowedOrigins` (`pulumi.Input[list]`) - Specifies which origins are allowed.
          * `exposeHeaders` (`pulumi.Input[list]`) - Specifies expose header in the response.
          * `maxAgeSeconds` (`pulumi.Input[float]`) - Specifies time in seconds that browser can cache the response for a preflight request.

        The **grants** object supports the following:

          * `id` (`pulumi.Input[str]`) - Canonical user id to grant for. Used only when `type` is `CanonicalUser`.  
          * `permissions` (`pulumi.Input[list]`) - List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
          * `type` (`pulumi.Input[str]`) - - Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
          * `uri` (`pulumi.Input[str]`) - Uri address to grant for. Used only when `type` is `Group`.

        The **lifecycle_rules** object supports the following:

          * `abortIncompleteMultipartUploadDays` (`pulumi.Input[float]`) - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
          * `enabled` (`pulumi.Input[bool]`) - Specifies lifecycle rule status.
          * `expiration` (`pulumi.Input[dict]`) - Specifies a period in the object's expire (documented below).
            * `date` (`pulumi.Input[str]`) - Specifies the date after which you want the corresponding action to take effect.
            * `days` (`pulumi.Input[float]`) - Specifies the number of days after object creation when the specific rule action takes effect.
            * `expiredObjectDeleteMarker` (`pulumi.Input[bool]`) - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Amazon S3 to delete expired object delete markers.

          * `id` (`pulumi.Input[str]`) - Unique identifier for the rule.
          * `noncurrentVersionExpiration` (`pulumi.Input[dict]`) - Specifies when noncurrent object versions expire (documented below).
            * `days` (`pulumi.Input[float]`) - Specifies the number of days an object is noncurrent object versions expire.

          * `noncurrentVersionTransitions` (`pulumi.Input[list]`) - Specifies when noncurrent object versions transitions (documented below).
            * `days` (`pulumi.Input[float]`) - Specifies the number of days an object is noncurrent object versions expire.
            * `storage_class` (`pulumi.Input[str]`) - Specifies the Amazon S3 storage class to which you want the noncurrent versions object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

          * `prefix` (`pulumi.Input[str]`) - Object key prefix identifying one or more objects to which the rule applies.
          * `tags` (`pulumi.Input[dict]`) - Specifies object tags key and value.
          * `transitions` (`pulumi.Input[list]`) - Specifies a period in the object's transitions (documented below).
            * `date` (`pulumi.Input[str]`) - Specifies the date after which you want the corresponding action to take effect.
            * `days` (`pulumi.Input[float]`) - Specifies the number of days after object creation when the specific rule action takes effect.
            * `storage_class` (`pulumi.Input[str]`) - Specifies the Amazon S3 storage class to which you want the object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

        The **loggings** object supports the following:

          * `targetBucket` (`pulumi.Input[str]`) - The name of the bucket that will receive the log objects.
          * `targetPrefix` (`pulumi.Input[str]`) - To specify a key prefix for log objects.

        The **object_lock_configuration** object supports the following:

          * `objectLockEnabled` (`pulumi.Input[str]`) - Indicates whether this bucket has an Object Lock configuration enabled. Valid value is `Enabled`.
          * `rule` (`pulumi.Input[dict]`) - The Object Lock rule in place for this bucket.
            * `defaultRetention` (`pulumi.Input[dict]`) - The default retention period that you want to apply to new objects placed in this bucket.
              * `days` (`pulumi.Input[float]`) - The number of days that you want to specify for the default retention period.
              * `mode` (`pulumi.Input[str]`) - The default Object Lock retention mode you want to apply to new objects placed in this bucket. Valid values are `GOVERNANCE` and `COMPLIANCE`.
              * `years` (`pulumi.Input[float]`) - The number of years that you want to specify for the default retention period.

        The **replication_configuration** object supports the following:

          * `role` (`pulumi.Input[str]`) - The ARN of the IAM role for Amazon S3 to assume when replicating the objects.
          * `rules` (`pulumi.Input[list]`) - Specifies the rules managing the replication (documented below).
            * `destination` (`pulumi.Input[dict]`) - Specifies the destination for the rule (documented below).
              * `accessControlTranslation` (`pulumi.Input[dict]`) - Specifies the overrides to use for object owners on replication. Must be used in conjunction with `account_id` owner override configuration.
                * `owner` (`pulumi.Input[str]`) - The override value for the owner on replicated objects. Currently only `Destination` is supported.

              * `account_id` (`pulumi.Input[str]`) - The Account ID to use for overriding the object owner on replication. Must be used in conjunction with `access_control_translation` override configuration.
              * `bucket` (`pulumi.Input[str]`) - The ARN of the S3 bucket where you want Amazon S3 to store replicas of the object identified by the rule.
              * `replicaKmsKeyId` (`pulumi.Input[str]`) - Destination KMS encryption key ARN for SSE-KMS replication. Must be used in conjunction with
                `sse_kms_encrypted_objects` source selection criteria.
              * `storage_class` (`pulumi.Input[str]`) - The class of storage used to store the object. Can be `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`, `ONEZONE_IA`, `INTELLIGENT_TIERING`, `GLACIER`, or `DEEP_ARCHIVE`.

            * `filter` (`pulumi.Input[dict]`) - Filter that identifies subset of objects to which the replication rule applies (documented below).
              * `prefix` (`pulumi.Input[str]`) - Object keyname prefix that identifies subset of objects to which the rule applies.
              * `tags` (`pulumi.Input[dict]`) - A mapping of tags that identifies subset of objects to which the rule applies.
                The rule applies only to objects having all the tags in its tagset.

            * `id` (`pulumi.Input[str]`) - Unique identifier for the rule.
            * `prefix` (`pulumi.Input[str]`) - Object keyname prefix identifying one or more objects to which the rule applies.
            * `priority` (`pulumi.Input[float]`) - The priority associated with the rule.
            * `sourceSelectionCriteria` (`pulumi.Input[dict]`) - Specifies special object selection criteria (documented below).
              * `sseKmsEncryptedObjects` (`pulumi.Input[dict]`) - Match SSE-KMS encrypted objects (documented below). If specified, `replica_kms_key_id`
                in `destination` must be specified as well.
                * `enabled` (`pulumi.Input[bool]`) - Boolean which indicates if this criteria is enabled.

            * `status` (`pulumi.Input[str]`) - The status of the rule. Either `Enabled` or `Disabled`. The rule is ignored if status is not Enabled.

        The **server_side_encryption_configuration** object supports the following:

          * `rule` (`pulumi.Input[dict]`) - A single object for server-side encryption by default configuration. (documented below)
            * `applyServerSideEncryptionByDefault` (`pulumi.Input[dict]`) - A single object for setting server-side encryption by default. (documented below)
              * `kms_master_key_id` (`pulumi.Input[str]`) - The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of `sse_algorithm` as `aws:kms`. The default `aws/s3` AWS KMS master key is used if this element is absent while the `sse_algorithm` is `aws:kms`.
              * `sseAlgorithm` (`pulumi.Input[str]`) - The server-side encryption algorithm to use. Valid values are `AES256` and `aws:kms`

        The **versioning** object supports the following:

          * `enabled` (`pulumi.Input[bool]`) - Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
          * `mfaDelete` (`pulumi.Input[bool]`) - Enable MFA delete for either `Change the versioning state of your bucket` or `Permanently delete an object version`. Default is `false`.

        The **website** object supports the following:

          * `errorDocument` (`pulumi.Input[str]`) - An absolute path to the document to return in case of a 4XX error.
          * `indexDocument` (`pulumi.Input[str]`) - Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders.
          * `redirectAllRequestsTo` (`pulumi.Input[str]`) - A hostname to redirect all website requests for this bucket to. Hostname can optionally be prefixed with a protocol (`http://` or `https://`) to use when redirecting requests. The default is the protocol that is used in the original request.
          * `routingRules` (`pulumi.Input[dict]`) - A json array containing [routing rules](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html)
            describing redirect behavior and when redirects are applied.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["acceleration_status"] = acceleration_status
        __props__["acl"] = acl
        __props__["arn"] = arn
        __props__["bucket"] = bucket
        __props__["bucket_domain_name"] = bucket_domain_name
        __props__["bucket_prefix"] = bucket_prefix
        __props__["bucket_regional_domain_name"] = bucket_regional_domain_name
        __props__["cors_rules"] = cors_rules
        __props__["force_destroy"] = force_destroy
        __props__["grants"] = grants
        __props__["hosted_zone_id"] = hosted_zone_id
        __props__["lifecycle_rules"] = lifecycle_rules
        __props__["loggings"] = loggings
        __props__["object_lock_configuration"] = object_lock_configuration
        __props__["policy"] = policy
        __props__["region"] = region
        __props__["replication_configuration"] = replication_configuration
        __props__["request_payer"] = request_payer
        __props__["server_side_encryption_configuration"] = server_side_encryption_configuration
        __props__["tags"] = tags
        __props__["versioning"] = versioning
        __props__["website"] = website
        __props__["website_domain"] = website_domain
        __props__["website_endpoint"] = website_endpoint
        return Bucket(resource_name, opts=opts, __props__=__props__)
    def translate_output_property(self, prop):
        return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

