# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetBucketServerSideEncryptionConfigurationResult',
    'AwaitableGetBucketServerSideEncryptionConfigurationResult',
    'get_bucket_server_side_encryption_configuration',
    'get_bucket_server_side_encryption_configuration_output',
]

@pulumi.output_type
class GetBucketServerSideEncryptionConfigurationResult:
    """
    A collection of values returned by getBucketServerSideEncryptionConfiguration.
    """
    def __init__(__self__, bucket=None, bucket_server_side_encryption_configuration_id=None, id=None, rules=None):
        if bucket and not isinstance(bucket, str):
            raise TypeError("Expected argument 'bucket' to be a str")
        pulumi.set(__self__, "bucket", bucket)
        if bucket_server_side_encryption_configuration_id and not isinstance(bucket_server_side_encryption_configuration_id, str):
            raise TypeError("Expected argument 'bucket_server_side_encryption_configuration_id' to be a str")
        pulumi.set(__self__, "bucket_server_side_encryption_configuration_id", bucket_server_side_encryption_configuration_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if rules and not isinstance(rules, list):
            raise TypeError("Expected argument 'rules' to be a list")
        pulumi.set(__self__, "rules", rules)

    @_builtins.property
    @pulumi.getter
    def bucket(self) -> Optional[_builtins.str]:
        """
        (String) The bucket's name or regional ID.
        """
        return pulumi.get(self, "bucket")

    @_builtins.property
    @pulumi.getter(name="bucketServerSideEncryptionConfigurationId")
    def bucket_server_side_encryption_configuration_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "bucket_server_side_encryption_configuration_id")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def rules(self) -> Sequence['outputs.GetBucketServerSideEncryptionConfigurationRuleResult']:
        """
        (Set of Object) Set of server-side encryption configuration rules.
        """
        return pulumi.get(self, "rules")


class AwaitableGetBucketServerSideEncryptionConfigurationResult(GetBucketServerSideEncryptionConfigurationResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBucketServerSideEncryptionConfigurationResult(
            bucket=self.bucket,
            bucket_server_side_encryption_configuration_id=self.bucket_server_side_encryption_configuration_id,
            id=self.id,
            rules=self.rules)


def get_bucket_server_side_encryption_configuration(bucket: Optional[_builtins.str] = None,
                                                    bucket_server_side_encryption_configuration_id: Optional[_builtins.str] = None,
                                                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBucketServerSideEncryptionConfigurationResult:
    """
    Get information about a bucket server side encryption configuration. This data source allows you to retrieve information about the server-side encryption configuration of a bucket.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get by ID
    by_id = scaleway.object.get_bucket_server_side_encryption_configuration(bucket_server_side_encryption_configuration_id=main["id"])
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get by Bucket Name
    by_bucket = scaleway.object.get_bucket_server_side_encryption_configuration(bucket=main["name"])
    ```


    :param _builtins.str bucket: The bucket's name or regional ID. Conflicts with `bucket_server_side_encryption_configuration_id`.
    :param _builtins.str bucket_server_side_encryption_configuration_id: The ID of the bucket server side encryption configuration. Conflicts with `bucket`.
    """
    __args__ = dict()
    __args__['bucket'] = bucket
    __args__['bucketServerSideEncryptionConfigurationId'] = bucket_server_side_encryption_configuration_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:object/getBucketServerSideEncryptionConfiguration:getBucketServerSideEncryptionConfiguration', __args__, opts=opts, typ=GetBucketServerSideEncryptionConfigurationResult).value

    return AwaitableGetBucketServerSideEncryptionConfigurationResult(
        bucket=pulumi.get(__ret__, 'bucket'),
        bucket_server_side_encryption_configuration_id=pulumi.get(__ret__, 'bucket_server_side_encryption_configuration_id'),
        id=pulumi.get(__ret__, 'id'),
        rules=pulumi.get(__ret__, 'rules'))
def get_bucket_server_side_encryption_configuration_output(bucket: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                                                           bucket_server_side_encryption_configuration_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                                                           opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetBucketServerSideEncryptionConfigurationResult]:
    """
    Get information about a bucket server side encryption configuration. This data source allows you to retrieve information about the server-side encryption configuration of a bucket.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get by ID
    by_id = scaleway.object.get_bucket_server_side_encryption_configuration(bucket_server_side_encryption_configuration_id=main["id"])
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get by Bucket Name
    by_bucket = scaleway.object.get_bucket_server_side_encryption_configuration(bucket=main["name"])
    ```


    :param _builtins.str bucket: The bucket's name or regional ID. Conflicts with `bucket_server_side_encryption_configuration_id`.
    :param _builtins.str bucket_server_side_encryption_configuration_id: The ID of the bucket server side encryption configuration. Conflicts with `bucket`.
    """
    __args__ = dict()
    __args__['bucket'] = bucket
    __args__['bucketServerSideEncryptionConfigurationId'] = bucket_server_side_encryption_configuration_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:object/getBucketServerSideEncryptionConfiguration:getBucketServerSideEncryptionConfiguration', __args__, opts=opts, typ=GetBucketServerSideEncryptionConfigurationResult)
    return __ret__.apply(lambda __response__: GetBucketServerSideEncryptionConfigurationResult(
        bucket=pulumi.get(__response__, 'bucket'),
        bucket_server_side_encryption_configuration_id=pulumi.get(__response__, 'bucket_server_side_encryption_configuration_id'),
        id=pulumi.get(__response__, 'id'),
        rules=pulumi.get(__response__, 'rules')))
