# 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__ = [
    'GetHAGroupResult',
    'AwaitableGetHAGroupResult',
    'get_ha_group',
    'get_ha_group_output',
]

@pulumi.output_type
class GetHAGroupResult:
    """
    A collection of values returned by getHAGroup.
    """
    def __init__(__self__, comment=None, group=None, id=None, no_failback=None, nodes=None, restricted=None):
        if comment and not isinstance(comment, str):
            raise TypeError("Expected argument 'comment' to be a str")
        pulumi.set(__self__, "comment", comment)
        if group and not isinstance(group, str):
            raise TypeError("Expected argument 'group' to be a str")
        pulumi.set(__self__, "group", group)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if no_failback and not isinstance(no_failback, bool):
            raise TypeError("Expected argument 'no_failback' to be a bool")
        pulumi.set(__self__, "no_failback", no_failback)
        if nodes and not isinstance(nodes, dict):
            raise TypeError("Expected argument 'nodes' to be a dict")
        pulumi.set(__self__, "nodes", nodes)
        if restricted and not isinstance(restricted, bool):
            raise TypeError("Expected argument 'restricted' to be a bool")
        pulumi.set(__self__, "restricted", restricted)

    @property
    @pulumi.getter
    def comment(self) -> str:
        """
        The comment associated with this group
        """
        return pulumi.get(self, "comment")

    @property
    @pulumi.getter
    def group(self) -> str:
        """
        The identifier of the High Availability group to read.
        """
        return pulumi.get(self, "group")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The unique identifier of this resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="noFailback")
    def no_failback(self) -> bool:
        """
        A flag that indicates that failing back to a higher priority node is disabled for this HA group.
        """
        return pulumi.get(self, "no_failback")

    @property
    @pulumi.getter
    def nodes(self) -> Mapping[str, int]:
        """
        The member nodes for this group. They are provided as a map, where the keys are the node names and the values represent their priority: integers for known priorities or `null` for unset priorities.
        """
        return pulumi.get(self, "nodes")

    @property
    @pulumi.getter
    def restricted(self) -> bool:
        """
        A flag that indicates that other nodes may not be used to run resources associated to this HA group.
        """
        return pulumi.get(self, "restricted")


class AwaitableGetHAGroupResult(GetHAGroupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetHAGroupResult(
            comment=self.comment,
            group=self.group,
            id=self.id,
            no_failback=self.no_failback,
            nodes=self.nodes,
            restricted=self.restricted)


def get_ha_group(group: Optional[str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHAGroupResult:
    """
    Retrieves information about a specific High Availability group.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    all = proxmoxve.HA.get_ha_groups()
    example = [proxmoxve.HA.get_ha_group(group=__value) for __key, __value in all.group_ids]
    pulumi.export("proxmoxVirtualEnvironmentHagroupsFull", example)
    ```
    <!--End PulumiCodeChooser -->


    :param str group: The identifier of the High Availability group to read.
    """
    __args__ = dict()
    __args__['group'] = group
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('proxmoxve:HA/getHAGroup:getHAGroup', __args__, opts=opts, typ=GetHAGroupResult).value

    return AwaitableGetHAGroupResult(
        comment=pulumi.get(__ret__, 'comment'),
        group=pulumi.get(__ret__, 'group'),
        id=pulumi.get(__ret__, 'id'),
        no_failback=pulumi.get(__ret__, 'no_failback'),
        nodes=pulumi.get(__ret__, 'nodes'),
        restricted=pulumi.get(__ret__, 'restricted'))


@_utilities.lift_output_func(get_ha_group)
def get_ha_group_output(group: Optional[pulumi.Input[str]] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetHAGroupResult]:
    """
    Retrieves information about a specific High Availability group.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    all = proxmoxve.HA.get_ha_groups()
    example = [proxmoxve.HA.get_ha_group(group=__value) for __key, __value in all.group_ids]
    pulumi.export("proxmoxVirtualEnvironmentHagroupsFull", example)
    ```
    <!--End PulumiCodeChooser -->


    :param str group: The identifier of the High Availability group to read.
    """
    ...
