# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = [
    'GetComputeResult',
    'AwaitableGetComputeResult',
    'get_compute',
    'get_compute_output',
]

@pulumi.output_type
class GetComputeResult:
    """
    A collection of values returned by getCompute.
    """
    def __init__(__self__, cpu=None, created=None, disk_size=None, hostname=None, id=None, ip6_address=None, ip_address=None, memory=None, private_network_ip_addresses=None, size=None, state=None, tags=None, template=None, zone=None):
        if cpu and not isinstance(cpu, int):
            raise TypeError("Expected argument 'cpu' to be a int")
        pulumi.set(__self__, "cpu", cpu)
        if created and not isinstance(created, str):
            raise TypeError("Expected argument 'created' to be a str")
        pulumi.set(__self__, "created", created)
        if disk_size and not isinstance(disk_size, int):
            raise TypeError("Expected argument 'disk_size' to be a int")
        pulumi.set(__self__, "disk_size", disk_size)
        if hostname and not isinstance(hostname, str):
            raise TypeError("Expected argument 'hostname' to be a str")
        pulumi.set(__self__, "hostname", hostname)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ip6_address and not isinstance(ip6_address, str):
            raise TypeError("Expected argument 'ip6_address' to be a str")
        pulumi.set(__self__, "ip6_address", ip6_address)
        if ip_address and not isinstance(ip_address, str):
            raise TypeError("Expected argument 'ip_address' to be a str")
        pulumi.set(__self__, "ip_address", ip_address)
        if memory and not isinstance(memory, int):
            raise TypeError("Expected argument 'memory' to be a int")
        pulumi.set(__self__, "memory", memory)
        if private_network_ip_addresses and not isinstance(private_network_ip_addresses, list):
            raise TypeError("Expected argument 'private_network_ip_addresses' to be a list")
        pulumi.set(__self__, "private_network_ip_addresses", private_network_ip_addresses)
        if size and not isinstance(size, str):
            raise TypeError("Expected argument 'size' to be a str")
        pulumi.set(__self__, "size", size)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        pulumi.set(__self__, "tags", tags)
        if template and not isinstance(template, str):
            raise TypeError("Expected argument 'template' to be a str")
        pulumi.set(__self__, "template", template)
        if zone and not isinstance(zone, str):
            raise TypeError("Expected argument 'zone' to be a str")
        pulumi.set(__self__, "zone", zone)

    @property
    @pulumi.getter
    def cpu(self) -> int:
        """
        The compute instance number of CPUs.
        """
        return pulumi.get(self, "cpu")

    @property
    @pulumi.getter
    def created(self) -> str:
        """
        The instance creation date.
        """
        return pulumi.get(self, "created")

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> int:
        """
        The instance disk size (GiB).
        """
        return pulumi.get(self, "disk_size")

    @property
    @pulumi.getter
    def hostname(self) -> Optional[str]:
        return pulumi.get(self, "hostname")

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="ip6Address")
    def ip6_address(self) -> str:
        """
        The instance (main network interface) IPv6 address (if enabled).
        """
        return pulumi.get(self, "ip6_address")

    @property
    @pulumi.getter(name="ipAddress")
    def ip_address(self) -> str:
        """
        The instance (main network interface) IPv4 address.
        """
        return pulumi.get(self, "ip_address")

    @property
    @pulumi.getter
    def memory(self) -> int:
        """
        The instance allocated memory.
        """
        return pulumi.get(self, "memory")

    @property
    @pulumi.getter(name="privateNetworkIpAddresses")
    def private_network_ip_addresses(self) -> Sequence[str]:
        """
        List of compute private IPv4 addresses (in *managed* private networks only).
        """
        return pulumi.get(self, "private_network_ip_addresses")

    @property
    @pulumi.getter
    def size(self) -> str:
        """
        The instance size.
        """
        return pulumi.get(self, "size")

    @property
    @pulumi.getter
    def state(self) -> str:
        """
        The current instance state.
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter
    def tags(self) -> Optional[Mapping[str, str]]:
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def template(self) -> str:
        """
        The instance template.
        """
        return pulumi.get(self, "template")

    @property
    @pulumi.getter
    def zone(self) -> str:
        """
        Exoscale Zone name.
        """
        return pulumi.get(self, "zone")


class AwaitableGetComputeResult(GetComputeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetComputeResult(
            cpu=self.cpu,
            created=self.created,
            disk_size=self.disk_size,
            hostname=self.hostname,
            id=self.id,
            ip6_address=self.ip6_address,
            ip_address=self.ip_address,
            memory=self.memory,
            private_network_ip_addresses=self.private_network_ip_addresses,
            size=self.size,
            state=self.state,
            tags=self.tags,
            template=self.template,
            zone=self.zone)


def get_compute(hostname: Optional[str] = None,
                id: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetComputeResult:
    """
    !> **WARNING:** This data source is **DEPRECATED** and will be removed in the next major version. Please use ComputeInstance instead.


    :param str hostname: The instance hostname to match.
    :param str id: The compute instance ID to match.
    :param Mapping[str, str] tags: The instance tags to match (map of key/value).
    """
    __args__ = dict()
    __args__['hostname'] = hostname
    __args__['id'] = id
    __args__['tags'] = tags
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('exoscale:index/getCompute:getCompute', __args__, opts=opts, typ=GetComputeResult).value

    return AwaitableGetComputeResult(
        cpu=__ret__.cpu,
        created=__ret__.created,
        disk_size=__ret__.disk_size,
        hostname=__ret__.hostname,
        id=__ret__.id,
        ip6_address=__ret__.ip6_address,
        ip_address=__ret__.ip_address,
        memory=__ret__.memory,
        private_network_ip_addresses=__ret__.private_network_ip_addresses,
        size=__ret__.size,
        state=__ret__.state,
        tags=__ret__.tags,
        template=__ret__.template,
        zone=__ret__.zone)


@_utilities.lift_output_func(get_compute)
def get_compute_output(hostname: Optional[pulumi.Input[Optional[str]]] = None,
                       id: Optional[pulumi.Input[Optional[str]]] = None,
                       tags: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetComputeResult]:
    """
    !> **WARNING:** This data source is **DEPRECATED** and will be removed in the next major version. Please use ComputeInstance instead.


    :param str hostname: The instance hostname to match.
    :param str id: The compute instance ID to match.
    :param Mapping[str, str] tags: The instance tags to match (map of key/value).
    """
    ...
