UNPKG

@cloud-carbon-footprint/aws

Version:

The core logic to get cloud usage data and estimate energy and carbon emissions from Amazon Web Services.

20 lines (19 loc) 1.19 kB
import { CloudProviderAccount, ICloudService } from '@cloud-carbon-footprint/core'; import { AWS_RECOMMENDATIONS_TARGETS, EstimationResult, GroupBy, LookupTableInput, LookupTableOutput, RecommendationResult } from '@cloud-carbon-footprint/common'; export default class AWSAccount extends CloudProviderAccount { id: string; name: string; private regions; private readonly credentials; constructor(id: string, name: string, regions: string[]); getDataForRegions(startDate: Date, endDate: Date, grouping: GroupBy): Promise<EstimationResult[]>; getDataForRegion(regionId: string, startDate: Date, endDate: Date, grouping: GroupBy): Promise<EstimationResult[]>; getServices(regionId: string): ICloudService[]; getDataForRecommendations(recommendationTarget: AWS_RECOMMENDATIONS_TARGETS): Promise<RecommendationResult[]>; getDataFromCostAndUsageReports(startDate: Date, endDate: Date, grouping: GroupBy): Promise<EstimationResult[]>; static getCostAndUsageReportsDataFromInputData(inputData: LookupTableInput[]): Promise<LookupTableOutput[]>; private getService; private getClientConfig; private createServiceWrapper; private services; }