UNPKG

@csermet/multiprovider

Version:

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

27 lines (26 loc) 948 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const generateArns_1 = require("../../utils/generateArns"); const format_1 = require("../../utils/format"); exports.default = ({ service, account: accountId, region, }) => { const { id, description, policy, endpointConfiguration, apiKeySource, createdDate, minimumCompressionSize, binaryMediaTypes, tags = {}, } = service; const arn = generateArns_1.apiGatewayRestApiArn({ restApiArn: generateArns_1.apiGatewayArn({ region: service.region }), id, }); return { id, accountId, arn, region, description, rawPolicy: policy, policy: format_1.formatIamJsonPolicy(policy), endpointConfiguration, apiKeySource, createdDate: createdDate.toISOString(), minimumCompressionSize, binaryMediaTypes, tags: format_1.formatTagsFromMap(tags), }; };