UNPKG

@csermet/multiprovider

Version:

cloud-graph provider plugin for AWS used to fetch AWS cloud data.

32 lines (31 loc) 961 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const sdk_1 = require("@cloudgraph/sdk"); /** * Organization */ exports.default = ({ service: data, account, }) => { const { Id: id, Arn: arn, MasterAccountArn: masterAccountArn, MasterAccountId: masterAccountId, MasterAccountEmail: masterAccountEmail, FeatureSet: featureSet, AvailablePolicyTypes: availablePolicyTypes = [], } = data; const policyTypes = availablePolicyTypes.map(({ Status: status, Type: type }) => { return { id: sdk_1.generateUniqueId({ arn, status, type, }), status, type, }; }); const organization = { id, accountId: account, arn, masterAccountArn, masterAccountId, masterAccountEmail, featureSet, availablePolicyTypes: policyTypes, }; return organization; };