UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

87 lines 3.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AwsConfigKinesisClient = void 0; const client_kinesis_1 = require("@aws-sdk/client-kinesis"); const AbstractClient_js_1 = require("../../customClients/AbstractClient.js"); const AwsConfigClientContext_js_1 = require("../AwsConfigClientContext.js"); /** * AWS Config-based Kinesis client implementation * Returns empty responses since stream policies are not tracked in AWS Config * * Since policies are not available in AWS Config, this client provides limited functionality * and returns empty results for all operations. */ class AwsConfigKinesisClient extends AbstractClient_js_1.AbstractClient { static clientName = client_kinesis_1.KinesisClient.name; constructor(options, customContext) { super(options, customContext); } /** * Register all Kinesis command implementations */ registerCommands() { this.registerCommand(AwsConfigListStreamsCommand); this.registerCommand(AwsConfigDescribeStreamCommand); this.registerCommand(AwsConfigGetResourcePolicyCommand); this.registerCommand(AwsConfigListTagsForStreamCommand); } } exports.AwsConfigKinesisClient = AwsConfigKinesisClient; /** * Config-based implementation of Kinesis ListStreamsCommand * Returns empty list since stream policies are not available for analysis */ const AwsConfigListStreamsCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_kinesis_1.ListStreamsCommand, execute: async (input, context) => { // Return empty list since we can't analyze stream policies from Config return { StreamNames: [], HasMoreStreams: false }; } }); /** * Config-based implementation of Kinesis DescribeStreamCommand * Returns minimal response since stream policies are not available for analysis */ const AwsConfigDescribeStreamCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_kinesis_1.DescribeStreamCommand, execute: async (input, context) => { const { StreamName, StreamARN } = input; if (!StreamName && !StreamARN) { throw new Error('StreamName or StreamARN is required for DescribeStreamCommand'); } // Return minimal stream description since we can't analyze policies return {}; } }); /** * Config-based implementation of Kinesis GetResourcePolicyCommand * Returns empty result as stream policies are not tracked in AWS Config */ const AwsConfigGetResourcePolicyCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_kinesis_1.GetResourcePolicyCommand, execute: async (input, context) => { // Stream resource policies are not available in AWS Config // Return empty response to maintain compatibility return { Policy: undefined }; } }); /** * Config-based implementation of Kinesis ListTagsForStreamCommand * Returns empty tags since stream policies are not available for analysis */ const AwsConfigListTagsForStreamCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_kinesis_1.ListTagsForStreamCommand, execute: async (input, context) => { // Return empty tags since we can't analyze stream policies return { Tags: [], HasMoreTags: false }; } }); //# sourceMappingURL=AwsConfigKinesisClient.js.map