@cloud-copilot/iam-lens
Version:
Visibility in IAM in and across AWS accounts
26 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadCollectConfigs = loadCollectConfigs;
exports.getCollectClient = getCollectClient;
const iam_collect_1 = require("@cloud-copilot/iam-collect");
const client_js_1 = require("./client.js");
/**
* Load IAM collect configs from the specified paths.
*
* @param configPaths the paths to the config files
* @returns the top-level configs
*/
async function loadCollectConfigs(configPaths) {
return (0, iam_collect_1.loadConfigFiles)(configPaths);
}
/**
* Get a collect client for the specified partition using the provided configs.
*
* @param configs the top-level configs to use for storage
* @param partition which partition to use (aws, aws-cn, aws-us-gov)
* @returns the iam-collect client to use for retrieving IAM resources
*/
function getCollectClient(configs, partition) {
return new client_js_1.IamCollectClient((0, iam_collect_1.createStorageClient)(configs, partition));
}
//# sourceMappingURL=collect.js.map