@cloud-carbon-footprint/aws
Version:
The core logic to get cloud usage data and estimate energy and carbon emissions from Amazon Web Services.
15 lines (14 loc) • 844 B
TypeScript
import { Logger } from '@cloud-carbon-footprint/common';
import { ICloudService, FootprintEstimate, Cost, CloudConstantsEmissionsFactors, CloudConstants } from '@cloud-carbon-footprint/core';
import { VolumeUsage } from './StorageUsageMapper';
import { ServiceWrapper } from './ServiceWrapper';
export default class RDSStorage implements ICloudService {
private readonly serviceWrapper;
serviceName: string;
rdsStorageLogger: Logger;
constructor(serviceWrapper: ServiceWrapper);
getEstimates(start: Date, end: Date, region: string, emissionsFactors: CloudConstantsEmissionsFactors, constants: CloudConstants): Promise<FootprintEstimate[]>;
getUsage(startDate: Date, endDate: Date, region: string): Promise<VolumeUsage[]>;
private getDiskType;
getCosts(start: Date, end: Date, region: string): Promise<Cost[]>;
}