UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

46 lines 1.71 kB
import { GetResourcePolicyCommand, ListSecretsCommand, SecretsManagerClient } from '@aws-sdk/client-secrets-manager'; import {} from '../../aws/coreAuth.js'; import { AbstractClient } from '../../customClients/AbstractClient.js'; import { awsConfigCommand } from '../AwsConfigClientContext.js'; /** * Secrets Manager client implementation using AWS Config as data source * * Since policies are not available in AWS Config, this client provides limited functionality * and returns empty results for all operations. */ export class AwsConfigSecretsManagerClient extends AbstractClient { constructor(options, customContext) { super(options, customContext); } /** * Register all Secrets Manager command implementations */ registerCommands() { this.registerCommand(AwsConfigListSecretsCommand); this.registerCommand(AwsConfigGetResourcePolicyCommand); } } AwsConfigSecretsManagerClient.clientName = SecretsManagerClient.name; /** * Config-based implementation of Secrets Manager ListSecretsCommand */ const AwsConfigListSecretsCommand = awsConfigCommand({ command: ListSecretsCommand, execute: async (input, context) => { // Policy not available in Config, so return an empty list return { SecretList: [] }; } }); /** * Config-based implementation of Secrets Manager GetResourcePolicyCommand */ const AwsConfigGetResourcePolicyCommand = awsConfigCommand({ command: GetResourcePolicyCommand, execute: async (input, context) => { // Policy not available in Config, so fetch directly from Secrets Manager return {}; } }); //# sourceMappingURL=AwsConfigSecretsManagerClient.js.map