@csermet/multiprovider
Version:
cloud-graph provider plugin for AWS used to fetch AWS cloud data.
33 lines (32 loc) • 1.41 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const format_1 = require("../../utils/format");
exports.default = ({ service, account, region, }) => {
const { FileSystemArn: arn, OwnerId: ownerId, CreationToken: creationToken, FileSystemId: fileSystemId, CreationTime: creationTime, LifeCycleState: lifeCycleState, Name: name, NumberOfMountTargets: numberOfMountTargets, SizeInBytes: sizeInBytes, PerformanceMode: performanceMode, Encrypted: encrypted, ThroughputMode: throughputMode, ProvisionedThroughputInMibps: provisionedThroughputInMibps, AvailabilityZoneName: availabilityZoneName, AvailabilityZoneId: availabilityZoneId, Tags, } = service;
return {
id: arn,
arn,
accountId: account,
region,
ownerId,
creationToken,
fileSystemId,
creationTime: creationTime?.toISOString(),
lifeCycleState,
name,
numberOfMountTargets,
sizeInBytes: {
value: sizeInBytes?.Value,
timestamp: sizeInBytes?.Timestamp?.toISOString(),
valueInIA: sizeInBytes?.ValueInIA,
valueInStandard: sizeInBytes?.ValueInStandard
},
performanceMode,
encrypted,
throughputMode,
provisionedThroughputInMibps,
availabilityZoneName,
availabilityZoneId,
tags: format_1.formatTagsFromMap(Tags),
};
};