def METHOD_NAME(self, read, write, delete, retention, timeout=None, version=None):
    t_logging, t_retention_policy = get_sdk(self.cli_ctx, ResourceType.DATA_STORAGE, 'Logging', 'RetentionPolicy',
                                            mod='common.models')
    retention_policy = t_retention_policy(enabled=retention != 0, days=retention)
    logging = t_logging(delete, read, write, retention_policy)
    if version:
        logging.version = str(version)
    return self.set_service_properties()(logging=logging, timeout=timeout)