# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class GetInstanceTypeResult:
    """
    A collection of values returned by getInstanceType.
    """
    def __init__(__self__, addons=None, class_=None, disk=None, id=None, label=None, memory=None, network_out=None, price=None, transfer=None, vcpus=None):
        if addons and not isinstance(addons, dict):
            raise TypeError("Expected argument 'addons' to be a dict")
        __self__.addons = addons
        if class_ and not isinstance(class_, str):
            raise TypeError("Expected argument 'class_' to be a str")
        __self__.class_ = class_
        if disk and not isinstance(disk, float):
            raise TypeError("Expected argument 'disk' to be a float")
        __self__.disk = disk
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        if label and not isinstance(label, str):
            raise TypeError("Expected argument 'label' to be a str")
        __self__.label = label
        if memory and not isinstance(memory, float):
            raise TypeError("Expected argument 'memory' to be a float")
        __self__.memory = memory
        if network_out and not isinstance(network_out, float):
            raise TypeError("Expected argument 'network_out' to be a float")
        __self__.network_out = network_out
        if price and not isinstance(price, dict):
            raise TypeError("Expected argument 'price' to be a dict")
        __self__.price = price
        if transfer and not isinstance(transfer, float):
            raise TypeError("Expected argument 'transfer' to be a float")
        __self__.transfer = transfer
        if vcpus and not isinstance(vcpus, float):
            raise TypeError("Expected argument 'vcpus' to be a float")
        __self__.vcpus = vcpus
class AwaitableGetInstanceTypeResult(GetInstanceTypeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInstanceTypeResult(
            addons=self.addons,
            class_=self.class_,
            disk=self.disk,
            id=self.id,
            label=self.label,
            memory=self.memory,
            network_out=self.network_out,
            price=self.price,
            transfer=self.transfer,
            vcpus=self.vcpus)

def get_instance_type(id=None,label=None,opts=None):
    """
    Provides information about a Linode instance type


    ## Attributes

    The Linode Instance Type resource exports the following attributes:

    * `id` - The ID representing the Linode Type

    * `label` - The Linode Type's label is for display purposes only

    * `class` - The class of the Linode Type

    * `disk` - The Disk size, in MB, of the Linode Type

    * `price.0.hourly` -  Cost (in US dollars) per hour.

    * `price.0.monthly` - Cost (in US dollars) per month.

    * `addons.0.backups.0.price.0.hourly` - The cost (in US dollars) per hour to add Backups service.

    * `addons.0.backups.0.price.0.monthly` - The cost (in US dollars) per month to add Backups service.

    > This content is derived from https://github.com/terraform-providers/terraform-provider-linode/blob/master/website/docs/d/instance_type.html.md.


    :param str id: Label used to identify instance type
    """
    __args__ = dict()


    __args__['id'] = id
    __args__['label'] = label
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('linode:index/getInstanceType:getInstanceType', __args__, opts=opts).value

    return AwaitableGetInstanceTypeResult(
        addons=__ret__.get('addons'),
        class_=__ret__.get('class'),
        disk=__ret__.get('disk'),
        id=__ret__.get('id'),
        label=__ret__.get('label'),
        memory=__ret__.get('memory'),
        network_out=__ret__.get('networkOut'),
        price=__ret__.get('price'),
        transfer=__ret__.get('transfer'),
        vcpus=__ret__.get('vcpus'))
