UNPKG

@cloud-copilot/iam-collect

Version:

Collect IAM information from AWS Accounts

174 lines 7.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AwsConfigOrganizationsClient = void 0; const client_organizations_1 = require("@aws-sdk/client-organizations"); const AbstractClient_js_1 = require("../../customClients/AbstractClient.js"); const AwsConfigClientContext_js_1 = require("../AwsConfigClientContext.js"); /** * AWS Config-based Organizations client implementation * Returns empty responses since organization data is 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 AwsConfigOrganizationsClient extends AbstractClient_js_1.AbstractClient { static clientName = client_organizations_1.OrganizationsClient.name; constructor(options, customContext) { super(options, customContext); } /** * Register all Organizations command implementations */ registerCommands() { this.registerCommand(AwsConfigDescribeOrganizationCommand); this.registerCommand(AwsConfigDescribePolicyCommand); this.registerCommand(AwsConfigDescribeResourcePolicyCommand); this.registerCommand(AwsConfigListAccountsForParentCommand); this.registerCommand(AwsConfigListDelegatedAdministratorsCommand); this.registerCommand(AwsConfigListDelegatedServicesForAccountCommand); this.registerCommand(AwsConfigListOrganizationalUnitsForParentCommand); this.registerCommand(AwsConfigListPoliciesCommand); this.registerCommand(AwsConfigListPoliciesForTargetCommand); this.registerCommand(AwsConfigListRootsCommand); this.registerCommand(AwsConfigListTagsForResourceCommand); } } exports.AwsConfigOrganizationsClient = AwsConfigOrganizationsClient; /** * Config-based implementation of Organizations DescribeOrganizationCommand * Returns empty result since organization data is not available in Config */ const AwsConfigDescribeOrganizationCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.DescribeOrganizationCommand, execute: async (input, context) => { // Organization data is not available in AWS Config return {}; } }); /** * Config-based implementation of Organizations DescribePolicyCommand * Returns empty result since organization policies are not available in Config */ const AwsConfigDescribePolicyCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.DescribePolicyCommand, execute: async (input, context) => { // Organization policies are not available in AWS Config return {}; } }); /** * Config-based implementation of Organizations DescribeResourcePolicyCommand * Returns empty result since organization resource policies are not available in Config */ const AwsConfigDescribeResourcePolicyCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.DescribeResourcePolicyCommand, execute: async (input, context) => { // Organization resource policies are not available in AWS Config return {}; } }); /** * Config-based implementation of Organizations ListAccountsForParentCommand * Returns empty list since organization structure is not available in Config */ const AwsConfigListAccountsForParentCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListAccountsForParentCommand, execute: async (input, context) => { // Organization structure is not available in AWS Config return { Accounts: [] }; } }); /** * Config-based implementation of Organizations ListDelegatedAdministratorsCommand * Returns empty list since delegated administrators are not available in Config */ const AwsConfigListDelegatedAdministratorsCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListDelegatedAdministratorsCommand, execute: async (input, context) => { // Delegated administrators are not available in AWS Config return { DelegatedAdministrators: [] }; } }); /** * Config-based implementation of Organizations ListDelegatedServicesForAccountCommand * Returns empty list since delegated services are not available in Config */ const AwsConfigListDelegatedServicesForAccountCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListDelegatedServicesForAccountCommand, execute: async (input, context) => { // Delegated services are not available in AWS Config return { DelegatedServices: [] }; } }); /** * Config-based implementation of Organizations ListOrganizationalUnitsForParentCommand * Returns empty list since organizational units are not available in Config */ const AwsConfigListOrganizationalUnitsForParentCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListOrganizationalUnitsForParentCommand, execute: async (input, context) => { // Organizational units are not available in AWS Config return { OrganizationalUnits: [] }; } }); /** * Config-based implementation of Organizations ListPoliciesCommand * Returns empty list since organization policies are not available in Config */ const AwsConfigListPoliciesCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListPoliciesCommand, execute: async (input, context) => { // Organization policies are not available in AWS Config return { Policies: [] }; } }); /** * Config-based implementation of Organizations ListPoliciesForTargetCommand * Returns empty list since organization policies are not available in Config */ const AwsConfigListPoliciesForTargetCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListPoliciesForTargetCommand, execute: async (input, context) => { // Organization policies are not available in AWS Config return { Policies: [] }; } }); /** * Config-based implementation of Organizations ListRootsCommand * Returns empty list since organization structure is not available in Config */ const AwsConfigListRootsCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListRootsCommand, execute: async (input, context) => { // Organization structure is not available in AWS Config return { Roots: [] }; } }); /** * Config-based implementation of Organizations ListTagsForResourceCommand * Returns empty list since organization resource tags are not available in Config */ const AwsConfigListTagsForResourceCommand = (0, AwsConfigClientContext_js_1.awsConfigCommand)({ command: client_organizations_1.ListTagsForResourceCommand, execute: async (input, context) => { // Organization resource tags are not available in AWS Config return { Tags: [] }; } }); //# sourceMappingURL=AwsConfigOrganizationsClient.js.map