export interface Instance {
    InstanceId?: string;
    ImageId?: string;
    InstanceType?: string;
    State?: {
        Code?: number;
        Name?: 'pending' | 'running' | 'shutting-down' | 'terminated' | 'stopping' | 'stopped';
    };
    PrivateIpAddress?: string;
    PublicIpAddress?: string;
    SubnetId?: string;
    VpcId?: string;
    SecurityGroups?: {
        GroupId?: string;
        GroupName?: string;
    }[];
    Tags?: {
        Key?: string;
        Value?: string;
    }[];
    LaunchTime?: string;
    Placement?: {
        AvailabilityZone?: string;
        Tenancy?: string;
    };
    Architecture?: string;
    RootDeviceType?: string;
    RootDeviceName?: string;
    BlockDeviceMappings?: {
        DeviceName?: string;
        Ebs?: {
            VolumeId?: string;
            Status?: string;
            AttachTime?: string;
            DeleteOnTermination?: boolean;
        };
    }[];
    IamInstanceProfile?: {
        Arn?: string;
        Id?: string;
    };
}
export interface Vpc {
    VpcId?: string;
    CidrBlock?: string;
    State?: 'pending' | 'available';
    DhcpOptionsId?: string;
    InstanceTenancy?: string;
    IsDefault?: boolean;
    Tags?: {
        Key?: string;
        Value?: string;
    }[];
}
export interface Subnet {
    SubnetId?: string;
    VpcId?: string;
    CidrBlock?: string;
    AvailabilityZone?: string;
    AvailableIpAddressCount?: number;
    State?: 'pending' | 'available';
    MapPublicIpOnLaunch?: boolean;
    Tags?: {
        Key?: string;
        Value?: string;
    }[];
}
export interface SecurityGroup {
    GroupId?: string;
    GroupName?: string;
    Description?: string;
    VpcId?: string;
    IpPermissions?: IpPermission[];
    IpPermissionsEgress?: IpPermission[];
    Tags?: {
        Key?: string;
        Value?: string;
    }[];
}
export interface IpPermission {
    IpProtocol?: string;
    FromPort?: number;
    ToPort?: number;
    IpRanges?: {
        CidrIp?: string;
        Description?: string;
    }[];
    Ipv6Ranges?: {
        CidrIpv6?: string;
        Description?: string;
    }[];
    UserIdGroupPairs?: {
        GroupId?: string;
        UserId?: string;
        Description?: string;
    }[];
}
export interface InternetGateway {
    InternetGatewayId?: string;
    Attachments?: {
        VpcId?: string;
        State?: string;
    }[];
    Tags?: {
        Key?: string;
        Value?: string;
    }[];
}
export interface RouteTable {
    RouteTableId?: string;
    VpcId?: string;
    Routes?: {
        DestinationCidrBlock?: string;
        GatewayId?: string;
        NatGatewayId?: string;
        State?: string;
    }[];
    Associations?: {
        RouteTableAssociationId?: string;
        SubnetId?: string;
        Main?: boolean;
    }[];
    Tags?: {
        Key?: string;
        Value?: string;
    }[];
}
export interface Address {
    PublicIp?: string;
    AllocationId?: string;
    AssociationId?: string;
    InstanceId?: string;
    NetworkInterfaceId?: string;
    PrivateIpAddress?: string;
    Domain?: 'vpc' | 'standard';
    Tags?: {
        Key?: string;
        Value?: string;
    }[];
}
export interface ConsoleOutput {
    InstanceId?: string;
    Output?: string;
    Timestamp?: string;
}
export interface InstanceStatus {
    InstanceId?: string;
    InstanceState?: {
        Code?: number;
        Name?: string;
    };
    InstanceStatus?: {
        Status?: string;
        Details?: {
            Name?: string;
            Status?: string;
        }[];
    };
    SystemStatus?: {
        Status?: string;
        Details?: {
            Name?: string;
            Status?: string;
        }[];
    };
}
/**
 * EC2 client using direct API calls
 */
export declare class EC2Client {
    private client;
    private region;
    constructor(region?: string);
    /**
     * Describe EC2 instances
     */
    describeInstances(options?: {
        InstanceIds?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
        MaxResults?: number;
        NextToken?: string;
    }): Promise<{
        Reservations?: {
            ReservationId?: string;
            Instances?: Instance[];
        }[];
        NextToken?: string;
    }>;
    /**
     * Get a single instance by ID
     */
    getInstance(instanceId: string): Promise<Instance | undefined>;
    /**
     * Get console output from an EC2 instance
     */
    getConsoleOutput(instanceId: string, latest?: boolean): Promise<ConsoleOutput>;
    /**
     * Get console output decoded (convenience method)
     */
    getConsoleOutputDecoded(instanceId: string, options?: {
        latest?: boolean;
        tailLines?: number;
    }): Promise<string>;
    /**
     * Describe instance status
     */
    describeInstanceStatus(options?: {
        InstanceIds?: string[];
        IncludeAllInstances?: boolean;
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        InstanceStatuses?: InstanceStatus[];
    }>;
    /**
     * Start instances
     */
    startInstances(instanceIds: string[]): Promise<{
        StartingInstances?: {
            InstanceId?: string;
            CurrentState?: {
                Name?: string;
            };
            PreviousState?: {
                Name?: string;
            };
        }[];
    }>;
    /**
     * Stop instances
     */
    stopInstances(instanceIds: string[], force?: boolean): Promise<{
        StoppingInstances?: {
            InstanceId?: string;
            CurrentState?: {
                Name?: string;
            };
            PreviousState?: {
                Name?: string;
            };
        }[];
    }>;
    /**
     * Reboot instances
     */
    rebootInstances(instanceIds: string[]): Promise<void>;
    /**
     * Terminate instances
     */
    terminateInstances(instanceIds: string[]): Promise<{
        TerminatingInstances?: {
            InstanceId?: string;
            CurrentState?: {
                Name?: string;
            };
            PreviousState?: {
                Name?: string;
            };
        }[];
    }>;
    /**
     * Create an AMI from a running instance (golden-image bake without Packer).
     * `noReboot: true` snapshots the live root volume without rebooting.
     */
    createImage(options: {
        InstanceId: string;
        Name: string;
        Description?: string;
        NoReboot?: boolean;
        TagSpecifications?: {
            ResourceType: string;
            Tags: {
                Key: string;
                Value: string;
            }[];
        }[];
    }): Promise<{
        ImageId?: string;
    }>;
    /** Deregister an AMI (cleanup). */
    deregisterImage(imageId: string): Promise<void>;
    /**
     * Describe VPCs
     */
    describeVpcs(options?: {
        VpcIds?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        Vpcs?: Vpc[];
    }>;
    /**
     * Describe Subnets
     */
    describeSubnets(options?: {
        SubnetIds?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        Subnets?: Subnet[];
    }>;
    /**
     * Describe Security Groups
     */
    describeSecurityGroups(options?: {
        GroupIds?: string[];
        GroupNames?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        SecurityGroups?: SecurityGroup[];
    }>;
    /**
     * Describe Internet Gateways
     */
    describeInternetGateways(options?: {
        InternetGatewayIds?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        InternetGateways?: InternetGateway[];
    }>;
    /**
     * Describe Elastic IPs (Addresses)
     */
    describeAddresses(options?: {
        AllocationIds?: string[];
        PublicIps?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        Addresses?: Address[];
    }>;
    /**
     * Allocate Elastic IP
     */
    allocateAddress(options?: {
        Domain?: 'vpc' | 'standard';
        TagSpecifications?: {
            ResourceType: string;
            Tags: {
                Key: string;
                Value: string;
            }[];
        }[];
    }): Promise<{
        AllocationId?: string;
        PublicIp?: string;
        Domain?: string;
    }>;
    /**
     * Associate Elastic IP with instance
     */
    associateAddress(options: {
        AllocationId?: string;
        PublicIp?: string;
        InstanceId?: string;
        NetworkInterfaceId?: string;
        PrivateIpAddress?: string;
        AllowReassociation?: boolean;
    }): Promise<{
        AssociationId?: string;
    }>;
    /**
     * Create tags for resources
     */
    createTags(options: {
        Resources: string[];
        Tags: {
            Key: string;
            Value: string;
        }[];
    }): Promise<void>;
    /**
     * Wait for instance to reach a specific state
     */
    waitForInstanceState(instanceId: string, targetState: 'running' | 'stopped' | 'terminated', options?: {
        maxWaitMs?: number;
        pollIntervalMs?: number;
    }): Promise<Instance | undefined>;
    /**
     * Create a VPC
     */
    createVpc(options: {
        CidrBlock: string;
        InstanceTenancy?: string;
        TagSpecifications?: {
            ResourceType: string;
            Tags: {
                Key: string;
                Value: string;
            }[];
        }[];
    }): Promise<{
        Vpc?: Vpc;
    }>;
    /**
     * Create a Subnet
     */
    createSubnet(options: {
        VpcId: string;
        CidrBlock: string;
        AvailabilityZone?: string;
        TagSpecifications?: {
            ResourceType: string;
            Tags: {
                Key: string;
                Value: string;
            }[];
        }[];
    }): Promise<{
        Subnet?: Subnet;
    }>;
    /**
     * Modify a Subnet attribute
     */
    modifySubnetAttribute(options: {
        SubnetId: string;
        MapPublicIpOnLaunch?: {
            Value: boolean;
        };
    }): Promise<void>;
    /**
     * Create a Security Group
     */
    createSecurityGroup(options: {
        GroupName: string;
        Description: string;
        VpcId?: string;
        TagSpecifications?: {
            ResourceType: string;
            Tags: {
                Key: string;
                Value: string;
            }[];
        }[];
    }): Promise<{
        GroupId?: string;
    }>;
    /**
     * Authorize Security Group Ingress (add inbound rule)
     */
    authorizeSecurityGroupIngress(options: {
        GroupId: string;
        IpPermissions: IpPermission[];
    }): Promise<void>;
    /**
     * Authorize Security Group Egress (add outbound rule)
     */
    authorizeSecurityGroupEgress(options: {
        GroupId: string;
        IpPermissions: IpPermission[];
    }): Promise<void>;
    /**
     * Describe Route Tables
     */
    describeRouteTables(options?: {
        RouteTableIds?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        RouteTables?: RouteTable[];
    }>;
    /**
     * Delete a VPC
     */
    deleteVpc(vpcId: string): Promise<void>;
    /**
     * Delete a subnet
     */
    deleteSubnet(subnetId: string): Promise<void>;
    /** Delete a security group (fails while still attached to an instance/ENI). */
    deleteSecurityGroup(groupId: string): Promise<void>;
    /**
     * Describe network interfaces
     */
    describeNetworkInterfaces(options?: {
        NetworkInterfaceIds?: string[];
        Filters?: {
            Name: string;
            Values: string[];
        }[];
    }): Promise<{
        NetworkInterfaces?: {
            NetworkInterfaceId?: string;
            SubnetId?: string;
            VpcId?: string;
            Status?: string;
            Attachment?: {
                AttachmentId?: string;
                InstanceId?: string;
                Status?: string;
            };
        }[];
    }>;
    /**
     * Detach a network interface
     */
    detachNetworkInterface(attachmentId: string, force?: boolean): Promise<void>;
    /**
     * Delete a network interface
     */
    deleteNetworkInterface(networkInterfaceId: string): Promise<void>;
    /**
     * Describe AWS regions
     */
    describeRegions(): Promise<{
        Regions?: {
            RegionName?: string;
            Endpoint?: string;
        }[];
    }>;
    /**
     * Run new EC2 instances
     */
    runInstances(options: {
        ImageId: string;
        InstanceType: string;
        MinCount: number;
        MaxCount: number;
        SecurityGroupIds?: string[];
        SubnetId?: string;
        UserData?: string;
        IamInstanceProfile?: {
            Name?: string;
            Arn?: string;
        };
        TagSpecifications?: {
            ResourceType: string;
            Tags: {
                Key: string;
                Value: string;
            }[];
        }[];
    }): Promise<{
        Instances?: Instance[];
    }>;
    /**
     * Encode IpPermissions into query parameters for security group rules
     */
    private encodeIpPermissions;
    private parseArray;
    private parseTags;
    private parseReservations;
    private parseInstances;
    private parseIpPermissions;
}
