import * as SDK from 'aws-sdk'; import { AWS } from "./AWS"; import { VPC } from "./VPC"; import { EBS } from "./EBS"; import { CUR } from "./CUR"; export declare namespace EC2 { type Platform = "Windows" | "Linux"; class Instance extends AWS.Resource { lifecycle: string; arn: string; private _az; private _subnet; state: string; type: string; platform: Platform; publicDNSName: string; publicIP: string; private _vpc; rootDeviceType: string; rootDeviceName: string; hypervisor: string; amiId: string; private _gpus; private _deviceAttrs; private _devices; private _cpuUtilization; private _memoryUtilization; private _inventoryEntries; private static _sshKey; static getSshKey(): Promise; static isTypeOf(resource: AWS.Resource): resource is Instance; static new(session: AWS.Session, id?: string, az?: VPC.AvailabilityZone, subnet?: VPC.Subnet, state?: string, lifecycle?: string, type?: string, hypervisor?: string, platform?: string, amiId?: string, vpc?: VPC, publicDNSName?: string, publicIP?: string, rootDeviceName?: string, rootDeviceType?: string, devices?: { volumeId: string; attrs: Instance.Device.Attributes; }[], tags?: AWS.Tag[]): Instance; private constructor(); private setSshKey; run(command: string): Promise; protected updatePreferredParent(parents: AWS.Resource[]): AWS.Resource | undefined; devices(): Promise; get az(): VPC.AvailabilityZone | undefined; get vpc(): VPC | undefined; get subnet(): VPC.Subnet | undefined; protected updateChildren(): Promise; isProd(): boolean; hasState(): boolean; hasPublicDNSName(): boolean; hasAmiId(): boolean; hasPublicIP(): boolean; hasHypervisor(): boolean; isNitro(): boolean; hasAZ(): boolean; hasSubnet(): boolean; hasType(): boolean; hasVPC(): boolean; hasRootDeviceType(): boolean; hasRootDeviceName(): boolean; hasLifecycle(): boolean; private getGpus; hasGpus(): Promise; gpus(): Promise; deletesAllVolumesOnTermination(): boolean; onlyHasRootDevice(): boolean; getDeviceName(volumeId: string): string | undefined; get rootVolumeId(): string | undefined; isSpot(): boolean; isWindows(): boolean; getDataTransferCosts(year: number): AWS.Resource.Costs | undefined; getEc2Costs(year: number): AWS.Resource.Costs | undefined; yearlyPriceListCost(): Promise; cpuUtilization(days: number): Promise; memoryUtilization(days: number): Promise; private getInventoryEntries; hasInventoryEntries(type: string): Promise; inventoryEntries(type: string): Promise; } namespace Instance { const type = "EC2.Instance"; class Device extends AWS.Child.Resource { resource: EBS.Volume; constructor(volume: EBS.Volume, name?: string, deleteOnTermination?: boolean); } namespace Device { type Attributes = { name?: string; deleteOnTermination?: boolean; }; } class GPU extends AWS.Resource { instance: EC2.Instance; static new(session: AWS.Session, instance: EC2.Instance, id?: string): GPU; private constructor(); protected updateChildren(): Promise; } namespace GPU { const type = "EC2.Instance.GPU"; } class Metric extends AWS.Metric { } namespace Metric { function create(session: AWS.Session, MetricClass: AWS.Metric.Class, resource: AWS.Resource, metric: string, statistic: string, period: number, days: number, namespace?: string): Promise; namespace Memory { class Utilization extends Metric { static new(session: AWS.Session, resource: AWS.Resource, days: number): Promise; } } namespace CPU { class Utilization extends AWS.Metric { static new(session: AWS.Session, resource: AWS.Resource, days: number): Promise; isUnderUtilized(threshold: number): boolean; } } } } class Instances extends Array { private static describeInstances; static fetch(session: AWS.Session, instanceIds?: string[]): Promise; static costs(account: string, curSession: AWS.Session, catalog: string, database: string, table: string, outputLocation: string, year: number): Promise; } class AutoScalingGroup extends AWS.Resource { loadBalancers: string[]; maxSize: number; minSize: number; newInstancesProtectedFromScaleIn: boolean; warmPoolSize: number; instances: AutoScalingGroup.Instance[]; static isTypeOf(resource: AWS.Resource): resource is AutoScalingGroup; static new(session: AWS.Session, id?: string, loadBalancers?: string[], maxSize?: number, minSize?: number, newInstancesProtectedFromScaleIn?: boolean, warmPoolSize?: number, instances?: AutoScalingGroup.Instance[]): AutoScalingGroup; private constructor(); protected updateChildren(): Promise; hasInstances(): boolean; hasMaxSize(): boolean; hasMinSize(): boolean; hasWarmPoolSize(): boolean; deletesAllVolumesOnTermination(): boolean; onlyHasRootDevice(): boolean; isSpot(): boolean; isWindows(): boolean; hasGpus(): Promise; } namespace AutoScalingGroup { const type = "EC2.AutoScalingGroup"; class Instance extends AWS.Child.Resource { resource: EC2.Instance; constructor(instance: EC2.Instance, lifecycleState?: string); } } class AutoScalingGroups extends Array { private static describeGroups; static fetch(session: AWS.Session): Promise; } namespace SSM { class InventoryEntry extends AWS.Resource { content: InventoryEntry.Content; static new(session: AWS.Session, id?: string, content?: InventoryEntry.Content): InventoryEntry; private constructor(); protected updateChildren(): Promise; hasContent(): boolean; } namespace InventoryEntry { const type = "SSM.InventoryEntry"; type Content = { [key: string]: { [key: string]: string; }[]; }; function contentFromInventoryResultItemMap(inventoryResultMap: SDK.SSM.Types.InventoryResultItemMap): Content; } class InventoryEntries extends Array { private static getEntries; static fetch(session: AWS.Session): Promise; } } }