UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

60 lines 2.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AwsConfigDynamoDBClient = void 0; const client_dynamodb_1 = require("@aws-sdk/client-dynamodb"); const AbstractClient_js_1 = require("../../customClients/AbstractClient.js"); const AwsConfigClientContext_js_1 = require("../AwsConfigClientContext.js"); /** * AWS Config-based DynamoDB client implementation * * Since policies are not available in AWS Config, this client provides limited functionality * and returns empty results for all operations. */ class AwsConfigDynamoDBClient extends AbstractClient_js_1.AbstractClient { static clientName = client_dynamodb_1.DynamoDBClient.name; constructor(options, customContext) { super(options, customContext); } /** * Register all DynamoDB command implementations */ registerCommands() { this.registerCommand(AwsConfigListTablesCommand); this.registerCommand(AwsConfigListTagsOfResourceCommand); } } exports.AwsConfigDynamoDBClient = AwsConfigDynamoDBClient; /** * Config-based implementation of DynamoDB ListTablesCommand * * Note: DynamoDB resource policies are not available in AWS Config. * Without policy data, this service provides no meaningful value for IAM analysis. * Returning empty result to indicate no actionable data available. */ const AwsConfigListTablesCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_dynamodb_1.ListTablesCommand, execute: async (input, context) => { // Note: DynamoDB resource policies are not available in AWS Config. // Without policy data, this service provides no meaningful value for IAM analysis. return { TableNames: [] // Empty - no actionable data without policies }; } }); /** * Config-based implementation of DynamoDB ListTagsOfResourceCommand * * Note: DynamoDB resource policies are not available in AWS Config. * Without policy data, tag information provides no meaningful value for IAM analysis. * Returning empty result to indicate no actionable data available. */ const AwsConfigListTagsOfResourceCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_dynamodb_1.ListTagsOfResourceCommand, execute: async (input, context) => { // Note: Without resource policies, tag information provides no IAM analysis value return { Tags: [] // Empty - no actionable data without policies }; } }); //# sourceMappingURL=AwsConfigDynamoDBClient.js.map