Repository: Avaiga/taipy
File: taipy/core/data/aws_s3.py (Python)

Code before:
            the current version is used.
        validity_period (Optional[timedelta]): The duration implemented as a timedelta since the last edit date for
            which the data node can be considered up-to-date. Once the validity period has passed, the data node is
            considered stale and relevant tasks will run even if they are skippable (see the
            [Task management](../../userman/scenario_features/sdm/task/index.md) page for more details).
            If _validity_period_ is set to `None`, the data node is always up-to-date.
        edit_in_progress (bool): True if a task computing the data node has been submitted
            and not completed yet. False otherwise.
        editor_id (Optional[str]): The identifier of the user who is currently editing the data node.
        editor_expiration_date (Optional[datetime]): The expiration date of the editor lock.
        properties (dict[str, Any]): A dictionary of additional properties. Note that the
            _properties_ parameter must at least contain an entry for _"aws_access_key"_ , _"aws_secret_access_key"_ ,
            _aws_s3_bucket_name_ and _aws_s3_object_key_ :

            - _"aws_access_key"_ `(str)`: Amazon Web Services ID for to identify account\n
            - _"aws_secret_access_key"_ `(str)`: Amazon Web Services access key to authenticate programmatic requests.\n
            - _"aws_region"_ `(Any)`: Self-contained geographic area where Amazon Web Services (AWS) infrastructure is
                    located.\n
            - _"aws_s3_bucket_name"_ `(str)`: unique identifier for a container that stores objects in Amazon Simple
                    Storage Service (S3).\n
            - _"aws_s3_object_key"_ `(str)`:  unique idntifier for the name of the object(file) that has to be read
                    or written. \n
            - _"aws_s3_client_parameters"_ `(Optional[Dict[str, Any])`: Additional parameters for S3 client creation\n
            - _"aws_s3_get_object_parameters"_ `(Optional[Dict[str, Any])`: : A dictionary of additional arguments to
                    be passed into AWS S3 bucket access string\n
            - _"aws_s3_client_parameters"_ `(Optional[Dict[str, Any])`: Additional parameters for uploading the object\n
    """

    __STORAGE_TYPE = "s3_object"

    __AWS_ACCESS_KEY_ID = "aws_access_key"
    __AWS_SECRET_ACCESS_KEY = "aws_secret_access_key"
    __AWS_STORAGE_BUCKET_NAME = "aws_s3_bucket_name"
    __AWS_S3_OBJECT_KEY = "aws_s3_object_key"
    __AWS_REGION = "aws_region"
    __AWS_S3_CLIENT_PARAMETERS = "aws_s3_client_parameters"
    __AWS_S3_GET_OBJECT_PARAMETERS = "aws_s3_get_object_parameters"
    __AWS_S3_PUT_OBJECT_PARAMETERS = "aws_s3_put_object_parameters"


    _REQUIRED_PROPERTIES: List[str] = [
        __AWS_ACCESS_KEY_ID,
        __AWS_SECRET_ACCESS_KEY,
        __AWS_STORAGE_BUCKET_NAME,
        __AWS_S3_OBJECT_KEY,
    ]

    def __init__(
        self,
        config_id: str,
        scope: Scope,

Review comment (security):
We don't document the Data node attributes like that anymore. We add a new docstring for each public attribute right after its declaration. In this class, None of the attributes are directly exposed (only the ones from the parent classes), so there is nothing to add at the attribute level.

However, we can describe what must/can contain the properties in the dictionary as follows.

```suggestion
    The *properties* attribute must contain the following required entries:
    
    - *aws_access_key* (`str`): Amazon Web Services (AWS) ID to identify the account.
    - *aws_secret_access_key* (`str`): Amazon Web Services (AWS) access key to 
        authenticate programmatic requests.
    - *aws_s3_bucket_name* (`str`): The Amazon Web Services (AWS) S3 bucket to read 
        from and to write the data to.
    - *aws_s3_object_key* (`str`): The Amazon Web Services (AWS) S3 object key to read
        or write.
       
    The *properties* attribute can also contain the following optional entries:
    
    - *aws_region* (`Optional[str]`): Self-contained geographic area where Amazon Web 
        Services (AWS) infrastructure is located.
    - *aws_s3_object_parameters* (`Optional[dict[str, any]]`): A dictionary of 
        additional arguments to be passed into the AWS S3 bucket access string.
    - *aws_s3_client_parameters* (`Optional[dict]`): Additional parameters for advanced 
        use cases to be passed to the Amazon Web Services (AWS) S3 client.<br/>
        Each parameter key must match the name of a parameter of the
        `boto3.session.Session.client` API.
    - *aws_s3_get_object_parameters* (`Optional[dict]`): Additional parameters to be
        passed to the Amazon Web Services (AWS) S3 client get function for
        advanced reading use cases. <br/>
        Each parameter key must match the name of a parameter of the 
        `boto3.client.get_object` API.
    - *aws_s3_put_object_parameters* (`Optional[dict]`): Additional parameters to be
        passed to the Amazon Web Services (AWS) S3 client put function for advanced
        writing use cases. <br/>
        Each parameter key must match the name of a parameter of the
        `boto3.client.put_object` API.
```

Code after:
        Services (AWS) infrastructure is located.
    - *aws_s3_object_parameters* (`Optional[dict[str, any]]`): A dictionary of
        additional arguments to be passed into the AWS S3 bucket access string.
    - *aws_s3_client_parameters* (`Optional[dict]`): Additional parameters for advanced
        use cases to be passed to the Amazon Web Services (AWS) S3 client.<br/>
        Each parameter key must match the name of a parameter of the
        `boto3.session.Session.client` API.
    - *aws_s3_get_object_parameters* (`Optional[dict]`): Additional parameters to be
        passed to the Amazon Web Services (AWS) S3 client get function for
        advanced reading use cases. <br/>
        Each parameter key must match the name of a parameter of the
        `boto3.client.get_object` API.
    - *aws_s3_put_object_parameters* (`Optional[dict]`): Additional parameters to be
        passed to the Amazon Web Services (AWS) S3 client put function for advanced
        writing use cases. <br/>
        Each parameter key must match the name of a parameter of the
        `boto3.client.put_object` API.
    """

    __STORAGE_TYPE = "s3_object"

    __AWS_ACCESS_KEY_ID = "aws_access_key"
    __AWS_SECRET_ACCESS_KEY = "aws_secret_access_key"
    __AWS_STORAGE_BUCKET_NAME = "aws_s3_bucket_name"
    __AWS_S3_OBJECT_KEY = "aws_s3_object_key"
    __AWS_REGION = "aws_region"
    __AWS_S3_CLIENT_PARAMETERS = "aws_s3_client_parameters"
    __AWS_S3_GET_OBJECT_PARAMETERS = "aws_s3_get_object_parameters"
    __AWS_S3_PUT_OBJECT_PARAMETERS = "aws_s3_put_object_parameters"


    _REQUIRED_PROPERTIES: List[str] = [
        __AWS_ACCESS_KEY_ID,
        __AWS_SECRET_ACCESS_KEY,
        __AWS_STORAGE_BUCKET_NAME,
        __AWS_S3_OBJECT_KEY,
    ]

    def __init__(
        self,
        config_id: str,
        scope: Scope,
        id: Optional[DataNodeId] = None,
        owner_id: Optional[str] = None,
        parent_ids: Optional[Set[str]] = None,
        last_edit_date: Optional[datetime] = None,
        edits: Optional[List[Edit]] = None,
        version: str = None,
        validity_period: Optional[timedelta] = None,
        edit_in_progress: bool = False,
        editor_id: Optional[str] = None,