# 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__ = [
    'HostsEntry',
    'Vm2Cdrom',
    'Vm2Clone',
    'Vm2Cpu',
    'Vm2Timeouts',
    'Vm2Vga',
    'GetVm2CloneResult',
    'GetVm2CpuResult',
    'GetVm2TimeoutsResult',
    'GetVm2VgaResult',
]

@pulumi.output_type
class HostsEntry(dict):
    def __init__(__self__, *,
                 address: str,
                 hostnames: Sequence[str]):
        """
        :param str address: The IP address.
        :param Sequence[str] hostnames: The hostnames.
        """
        pulumi.set(__self__, "address", address)
        pulumi.set(__self__, "hostnames", hostnames)

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

    @property
    @pulumi.getter
    def hostnames(self) -> Sequence[str]:
        """
        The hostnames.
        """
        return pulumi.get(self, "hostnames")


@pulumi.output_type
class Vm2Cdrom(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "fileId":
            suggest = "file_id"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in Vm2Cdrom. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        Vm2Cdrom.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        Vm2Cdrom.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 file_id: Optional[str] = None):
        """
        :param str file_id: The file ID of the CD-ROM, or `cdrom|none`. Defaults to `none` to leave the CD-ROM empty. Use `cdrom` to connect to the physical drive.
        """
        if file_id is not None:
            pulumi.set(__self__, "file_id", file_id)

    @property
    @pulumi.getter(name="fileId")
    def file_id(self) -> Optional[str]:
        """
        The file ID of the CD-ROM, or `cdrom|none`. Defaults to `none` to leave the CD-ROM empty. Use `cdrom` to connect to the physical drive.
        """
        return pulumi.get(self, "file_id")


@pulumi.output_type
class Vm2Clone(dict):
    def __init__(__self__, *,
                 id: int,
                 retries: Optional[int] = None):
        """
        :param int id: The ID of the VM to clone.
        :param int retries: The number of retries to perform when cloning the VM (default: 3).
        """
        pulumi.set(__self__, "id", id)
        if retries is not None:
            pulumi.set(__self__, "retries", retries)

    @property
    @pulumi.getter
    def id(self) -> int:
        """
        The ID of the VM to clone.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def retries(self) -> Optional[int]:
        """
        The number of retries to perform when cloning the VM (default: 3).
        """
        return pulumi.get(self, "retries")


@pulumi.output_type
class Vm2Cpu(dict):
    def __init__(__self__, *,
                 affinity: Optional[str] = None,
                 architecture: Optional[str] = None,
                 cores: Optional[int] = None,
                 flags: Optional[Sequence[str]] = None,
                 hotplugged: Optional[int] = None,
                 limit: Optional[int] = None,
                 numa: Optional[bool] = None,
                 sockets: Optional[int] = None,
                 type: Optional[str] = None,
                 units: Optional[int] = None):
        """
        :param str affinity: The CPU cores that are used to run the VM’s vCPU. The value is a list of CPU IDs, separated by commas. The CPU IDs are zero-based.  For example, `0,1,2,3` (which also can be shortened to `0-3`) means that the VM’s vCPUs are run on the first four CPU cores. Setting `affinity` is only allowed for `root@pam` authenticated user.
        :param str architecture: The CPU architecture `<aarch64 | x86_64>` (defaults to the host). Setting `affinity` is only allowed for `root@pam` authenticated user.
        :param int cores: The number of CPU cores per socket (defaults to `1`).
        :param Sequence[str] flags: Set of additional CPU flags. Use `+FLAG` to enable, `-FLAG` to disable a flag. Custom CPU models can specify any flag supported by QEMU/KVM, VM-specific flags must be from the following set for security reasons: `pcid`, `spec-ctrl`, `ibpb`, `ssbd`, `virt-ssbd`, `amd-ssbd`, `amd-no-ssb`, `pdpe1gb`, `md-clear`, `hv-tlbflush`, `hv-evmcs`, `aes`.
        :param int hotplugged: The number of hotplugged vCPUs (defaults to `0`).
        :param int limit: Limit of CPU usage (defaults to `0` which means no limit).
        :param bool numa: Enable NUMA (defaults to `false`).
        :param int sockets: The number of CPU sockets (defaults to `1`).
        :param str type: Emulated CPU type, it's recommended to use `x86-64-v2-AES` or higher (defaults to `kvm64`). See https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_virtual_machines_settings for more information.
        :param int units: CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.
        """
        if affinity is not None:
            pulumi.set(__self__, "affinity", affinity)
        if architecture is not None:
            pulumi.set(__self__, "architecture", architecture)
        if cores is not None:
            pulumi.set(__self__, "cores", cores)
        if flags is not None:
            pulumi.set(__self__, "flags", flags)
        if hotplugged is not None:
            pulumi.set(__self__, "hotplugged", hotplugged)
        if limit is not None:
            pulumi.set(__self__, "limit", limit)
        if numa is not None:
            pulumi.set(__self__, "numa", numa)
        if sockets is not None:
            pulumi.set(__self__, "sockets", sockets)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if units is not None:
            pulumi.set(__self__, "units", units)

    @property
    @pulumi.getter
    def affinity(self) -> Optional[str]:
        """
        The CPU cores that are used to run the VM’s vCPU. The value is a list of CPU IDs, separated by commas. The CPU IDs are zero-based.  For example, `0,1,2,3` (which also can be shortened to `0-3`) means that the VM’s vCPUs are run on the first four CPU cores. Setting `affinity` is only allowed for `root@pam` authenticated user.
        """
        return pulumi.get(self, "affinity")

    @property
    @pulumi.getter
    def architecture(self) -> Optional[str]:
        """
        The CPU architecture `<aarch64 | x86_64>` (defaults to the host). Setting `affinity` is only allowed for `root@pam` authenticated user.
        """
        return pulumi.get(self, "architecture")

    @property
    @pulumi.getter
    def cores(self) -> Optional[int]:
        """
        The number of CPU cores per socket (defaults to `1`).
        """
        return pulumi.get(self, "cores")

    @property
    @pulumi.getter
    def flags(self) -> Optional[Sequence[str]]:
        """
        Set of additional CPU flags. Use `+FLAG` to enable, `-FLAG` to disable a flag. Custom CPU models can specify any flag supported by QEMU/KVM, VM-specific flags must be from the following set for security reasons: `pcid`, `spec-ctrl`, `ibpb`, `ssbd`, `virt-ssbd`, `amd-ssbd`, `amd-no-ssb`, `pdpe1gb`, `md-clear`, `hv-tlbflush`, `hv-evmcs`, `aes`.
        """
        return pulumi.get(self, "flags")

    @property
    @pulumi.getter
    def hotplugged(self) -> Optional[int]:
        """
        The number of hotplugged vCPUs (defaults to `0`).
        """
        return pulumi.get(self, "hotplugged")

    @property
    @pulumi.getter
    def limit(self) -> Optional[int]:
        """
        Limit of CPU usage (defaults to `0` which means no limit).
        """
        return pulumi.get(self, "limit")

    @property
    @pulumi.getter
    def numa(self) -> Optional[bool]:
        """
        Enable NUMA (defaults to `false`).
        """
        return pulumi.get(self, "numa")

    @property
    @pulumi.getter
    def sockets(self) -> Optional[int]:
        """
        The number of CPU sockets (defaults to `1`).
        """
        return pulumi.get(self, "sockets")

    @property
    @pulumi.getter
    def type(self) -> Optional[str]:
        """
        Emulated CPU type, it's recommended to use `x86-64-v2-AES` or higher (defaults to `kvm64`). See https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_virtual_machines_settings for more information.
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter
    def units(self) -> Optional[int]:
        """
        CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.
        """
        return pulumi.get(self, "units")


@pulumi.output_type
class Vm2Timeouts(dict):
    def __init__(__self__, *,
                 create: Optional[str] = None,
                 delete: Optional[str] = None,
                 read: Optional[str] = None,
                 update: Optional[str] = None):
        """
        :param str create: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
        :param str delete: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
        :param str read: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
        :param str update: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
        """
        if create is not None:
            pulumi.set(__self__, "create", create)
        if delete is not None:
            pulumi.set(__self__, "delete", delete)
        if read is not None:
            pulumi.set(__self__, "read", read)
        if update is not None:
            pulumi.set(__self__, "update", update)

    @property
    @pulumi.getter
    def create(self) -> Optional[str]:
        """
        A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
        """
        return pulumi.get(self, "create")

    @property
    @pulumi.getter
    def delete(self) -> Optional[str]:
        """
        A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
        """
        return pulumi.get(self, "delete")

    @property
    @pulumi.getter
    def read(self) -> Optional[str]:
        """
        A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
        """
        return pulumi.get(self, "read")

    @property
    @pulumi.getter
    def update(self) -> Optional[str]:
        """
        A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
        """
        return pulumi.get(self, "update")


@pulumi.output_type
class Vm2Vga(dict):
    def __init__(__self__, *,
                 clipboard: Optional[str] = None,
                 memory: Optional[int] = None,
                 type: Optional[str] = None):
        """
        :param str clipboard: Enable a specific clipboard. If not set, depending on the display type the SPICE one will be added. Currently only `vnc` is available. Migration with VNC clipboard is not supported by Proxmox.
        :param int memory: The VGA memory in megabytes (4-512 MB). Has no effect with serial display.
        :param str type: The VGA type (defaults to `std`).
        """
        if clipboard is not None:
            pulumi.set(__self__, "clipboard", clipboard)
        if memory is not None:
            pulumi.set(__self__, "memory", memory)
        if type is not None:
            pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter
    def clipboard(self) -> Optional[str]:
        """
        Enable a specific clipboard. If not set, depending on the display type the SPICE one will be added. Currently only `vnc` is available. Migration with VNC clipboard is not supported by Proxmox.
        """
        return pulumi.get(self, "clipboard")

    @property
    @pulumi.getter
    def memory(self) -> Optional[int]:
        """
        The VGA memory in megabytes (4-512 MB). Has no effect with serial display.
        """
        return pulumi.get(self, "memory")

    @property
    @pulumi.getter
    def type(self) -> Optional[str]:
        """
        The VGA type (defaults to `std`).
        """
        return pulumi.get(self, "type")


@pulumi.output_type
class GetVm2CloneResult(dict):
    def __init__(__self__, *,
                 id: int,
                 retries: int):
        """
        :param int id: The ID of the VM to clone.
        :param int retries: The number of retries to perform when cloning the VM (default: 3).
        """
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "retries", retries)

    @property
    @pulumi.getter
    def id(self) -> int:
        """
        The ID of the VM to clone.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def retries(self) -> int:
        """
        The number of retries to perform when cloning the VM (default: 3).
        """
        return pulumi.get(self, "retries")


@pulumi.output_type
class GetVm2CpuResult(dict):
    def __init__(__self__, *,
                 affinity: str,
                 architecture: str,
                 cores: int,
                 flags: Sequence[str],
                 hotplugged: int,
                 limit: int,
                 numa: bool,
                 sockets: int,
                 type: str,
                 units: int):
        """
        :param str affinity: List of host cores used to execute guest processes, for example: '0,5,8-11'
        :param str architecture: The CPU architecture.
        :param int cores: The number of CPU cores per socket.
        :param Sequence[str] flags: Set of additional CPU flags.
        :param int hotplugged: The number of hotplugged vCPUs.
        :param int limit: Limit of CPU usage.
        :param bool numa: Enable NUMA.
        :param int sockets: The number of CPU sockets.
        :param str type: Emulated CPU type.
        :param int units: CPU weight for a VM
        """
        pulumi.set(__self__, "affinity", affinity)
        pulumi.set(__self__, "architecture", architecture)
        pulumi.set(__self__, "cores", cores)
        pulumi.set(__self__, "flags", flags)
        pulumi.set(__self__, "hotplugged", hotplugged)
        pulumi.set(__self__, "limit", limit)
        pulumi.set(__self__, "numa", numa)
        pulumi.set(__self__, "sockets", sockets)
        pulumi.set(__self__, "type", type)
        pulumi.set(__self__, "units", units)

    @property
    @pulumi.getter
    def affinity(self) -> str:
        """
        List of host cores used to execute guest processes, for example: '0,5,8-11'
        """
        return pulumi.get(self, "affinity")

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

    @property
    @pulumi.getter
    def cores(self) -> int:
        """
        The number of CPU cores per socket.
        """
        return pulumi.get(self, "cores")

    @property
    @pulumi.getter
    def flags(self) -> Sequence[str]:
        """
        Set of additional CPU flags.
        """
        return pulumi.get(self, "flags")

    @property
    @pulumi.getter
    def hotplugged(self) -> int:
        """
        The number of hotplugged vCPUs.
        """
        return pulumi.get(self, "hotplugged")

    @property
    @pulumi.getter
    def limit(self) -> int:
        """
        Limit of CPU usage.
        """
        return pulumi.get(self, "limit")

    @property
    @pulumi.getter
    def numa(self) -> bool:
        """
        Enable NUMA.
        """
        return pulumi.get(self, "numa")

    @property
    @pulumi.getter
    def sockets(self) -> int:
        """
        The number of CPU sockets.
        """
        return pulumi.get(self, "sockets")

    @property
    @pulumi.getter
    def type(self) -> str:
        """
        Emulated CPU type.
        """
        return pulumi.get(self, "type")

    @property
    @pulumi.getter
    def units(self) -> int:
        """
        CPU weight for a VM
        """
        return pulumi.get(self, "units")


@pulumi.output_type
class GetVm2TimeoutsResult(dict):
    def __init__(__self__, *,
                 read: Optional[str] = None):
        """
        :param str read: A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
        """
        if read is not None:
            pulumi.set(__self__, "read", read)

    @property
    @pulumi.getter
    def read(self) -> Optional[str]:
        """
        A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
        """
        return pulumi.get(self, "read")


@pulumi.output_type
class GetVm2VgaResult(dict):
    def __init__(__self__, *,
                 clipboard: str,
                 memory: int,
                 type: str):
        """
        :param str clipboard: Enable a specific clipboard.
        :param int memory: The VGA memory in megabytes (4-512 MB). Has no effect with serial display.
        :param str type: The VGA type.
        """
        pulumi.set(__self__, "clipboard", clipboard)
        pulumi.set(__self__, "memory", memory)
        pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter
    def clipboard(self) -> str:
        """
        Enable a specific clipboard.
        """
        return pulumi.get(self, "clipboard")

    @property
    @pulumi.getter
    def memory(self) -> int:
        """
        The VGA memory in megabytes (4-512 MB). Has no effect with serial display.
        """
        return pulumi.get(self, "memory")

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


