|
1 | 1 | /* Copyright (C) 2024 NooBaa */
|
2 | 2 | 'use strict';
|
3 | 3 |
|
| 4 | +const AWS = require('aws-sdk'); |
4 | 5 | const config = require('../../config');
|
5 |
| -const { throw_cli_error, write_stdout_response} = require('../manage_nsfs/manage_nsfs_cli_utils'); |
| 6 | +const http_utils = require('../util/http_utils'); |
| 7 | +const { CONFIG_TYPES } = require('../sdk/config_fs'); |
| 8 | +const { export_logs_to_target } = require('../util/bucket_logs_utils'); |
6 | 9 | const ManageCLIError = require('../manage_nsfs/manage_nsfs_cli_errors').ManageCLIError;
|
7 | 10 | const ManageCLIResponse = require('../manage_nsfs/manage_nsfs_cli_responses').ManageCLIResponse;
|
8 |
| -const { export_logs_to_target } = require('../util/bucket_logs_utils'); |
9 |
| -const http_utils = require('../util/http_utils'); |
10 |
| -const AWS = require('aws-sdk'); |
| 11 | +const { throw_cli_error, write_stdout_response} = require('../manage_nsfs/manage_nsfs_cli_utils'); |
11 | 12 |
|
12 | 13 | let config_fs;
|
13 | 14 | /** This command goes over the logs in the persistent log and move the entries to log objects in the target buckets
|
@@ -40,7 +41,8 @@ async function export_bucket_logging(shared_config_fs) {
|
40 | 41 | async function get_bucket_owner_keys(log_bucket_name) {
|
41 | 42 | const log_bucket_config_data = await config_fs.get_bucket_by_name(log_bucket_name);
|
42 | 43 | const log_bucket_owner = log_bucket_config_data.owner_account;
|
43 |
| - const owner_config_data = await config_fs.get_identities_by_id(log_bucket_owner, { show_secrets: true, decrypt_secret_key: true }); |
| 44 | + const owner_config_data = await config_fs.get_identity_by_id(log_bucket_owner, |
| 45 | + CONFIG_TYPES.ACCOUNT, { show_secrets: true, decrypt_secret_key: true }); |
44 | 46 | return owner_config_data.access_keys;
|
45 | 47 | }
|
46 | 48 |
|
|
0 commit comments