UNPKG

@cloud-carbon-footprint/gcp

Version:

The core logic to get cloud usage data and estimate energy and carbon emissions from Google Cloud Platform.

17 lines (16 loc) 994 B
import { ICloudService, CloudProviderAccount } from '@cloud-carbon-footprint/core'; import { EstimationResult, RecommendationResult, LookupTableInput, LookupTableOutput, GroupBy } from '@cloud-carbon-footprint/common'; export default class GCPAccount extends CloudProviderAccount { id: string; name: string; private regions; 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[]>; getDataFromBillingExportTable(startDate: Date, endDate: Date, grouping: GroupBy): Promise<EstimationResult[]>; static getBillingExportDataFromInputData(inputData: LookupTableInput[]): Promise<LookupTableOutput[]>; getServices(): ICloudService[]; getDataForRecommendations(): Promise<RecommendationResult[]>; private getService; private services; }