# 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
from . import outputs

__all__ = [
    'GetAlertContactGroupsResult',
    'AwaitableGetAlertContactGroupsResult',
    'get_alert_contact_groups',
    'get_alert_contact_groups_output',
]

@pulumi.output_type
class GetAlertContactGroupsResult:
    """
    A collection of values returned by getAlertContactGroups.
    """
    def __init__(__self__, alert_contact_group_name=None, contact_id=None, contact_name=None, groups=None, id=None, ids=None, name_regex=None, names=None, output_file=None):
        if alert_contact_group_name and not isinstance(alert_contact_group_name, str):
            raise TypeError("Expected argument 'alert_contact_group_name' to be a str")
        pulumi.set(__self__, "alert_contact_group_name", alert_contact_group_name)
        if contact_id and not isinstance(contact_id, str):
            raise TypeError("Expected argument 'contact_id' to be a str")
        pulumi.set(__self__, "contact_id", contact_id)
        if contact_name and not isinstance(contact_name, str):
            raise TypeError("Expected argument 'contact_name' to be a str")
        pulumi.set(__self__, "contact_name", contact_name)
        if groups and not isinstance(groups, list):
            raise TypeError("Expected argument 'groups' to be a list")
        pulumi.set(__self__, "groups", groups)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ids and not isinstance(ids, list):
            raise TypeError("Expected argument 'ids' to be a list")
        pulumi.set(__self__, "ids", ids)
        if name_regex and not isinstance(name_regex, str):
            raise TypeError("Expected argument 'name_regex' to be a str")
        pulumi.set(__self__, "name_regex", name_regex)
        if names and not isinstance(names, list):
            raise TypeError("Expected argument 'names' to be a list")
        pulumi.set(__self__, "names", names)
        if output_file and not isinstance(output_file, str):
            raise TypeError("Expected argument 'output_file' to be a str")
        pulumi.set(__self__, "output_file", output_file)

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

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

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

    @property
    @pulumi.getter
    def groups(self) -> Sequence['outputs.GetAlertContactGroupsGroupResult']:
        return pulumi.get(self, "groups")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

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

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

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

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


class AwaitableGetAlertContactGroupsResult(GetAlertContactGroupsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAlertContactGroupsResult(
            alert_contact_group_name=self.alert_contact_group_name,
            contact_id=self.contact_id,
            contact_name=self.contact_name,
            groups=self.groups,
            id=self.id,
            ids=self.ids,
            name_regex=self.name_regex,
            names=self.names,
            output_file=self.output_file)


def get_alert_contact_groups(alert_contact_group_name: Optional[str] = None,
                             contact_id: Optional[str] = None,
                             contact_name: Optional[str] = None,
                             ids: Optional[Sequence[str]] = None,
                             name_regex: Optional[str] = None,
                             output_file: Optional[str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertContactGroupsResult:
    """
    This data source provides the Arms Alert Contact Groups of the current Alibaba Cloud user.

    > **NOTE:** Available in v1.131.0+.

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    name_regex = alicloud.arms.get_alert_contact_groups(name_regex="^my-AlertContactGroup")
    pulumi.export("armsAlertContactGroupId", name_regex.groups[0].id)
    ```


    :param str alert_contact_group_name: The name of the resource.
    :param str contact_id: The contact id.
    :param str contact_name: The contact name.
    :param Sequence[str] ids: A list of Alert Contact Group IDs.
    :param str name_regex: A regex string to filter results by Alert Contact Group name.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    """
    __args__ = dict()
    __args__['alertContactGroupName'] = alert_contact_group_name
    __args__['contactId'] = contact_id
    __args__['contactName'] = contact_name
    __args__['ids'] = ids
    __args__['nameRegex'] = name_regex
    __args__['outputFile'] = output_file
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('alicloud:arms/getAlertContactGroups:getAlertContactGroups', __args__, opts=opts, typ=GetAlertContactGroupsResult).value

    return AwaitableGetAlertContactGroupsResult(
        alert_contact_group_name=pulumi.get(__ret__, 'alert_contact_group_name'),
        contact_id=pulumi.get(__ret__, 'contact_id'),
        contact_name=pulumi.get(__ret__, 'contact_name'),
        groups=pulumi.get(__ret__, 'groups'),
        id=pulumi.get(__ret__, 'id'),
        ids=pulumi.get(__ret__, 'ids'),
        name_regex=pulumi.get(__ret__, 'name_regex'),
        names=pulumi.get(__ret__, 'names'),
        output_file=pulumi.get(__ret__, 'output_file'))


@_utilities.lift_output_func(get_alert_contact_groups)
def get_alert_contact_groups_output(alert_contact_group_name: Optional[pulumi.Input[Optional[str]]] = None,
                                    contact_id: Optional[pulumi.Input[Optional[str]]] = None,
                                    contact_name: Optional[pulumi.Input[Optional[str]]] = None,
                                    ids: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                                    name_regex: Optional[pulumi.Input[Optional[str]]] = None,
                                    output_file: Optional[pulumi.Input[Optional[str]]] = None,
                                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAlertContactGroupsResult]:
    """
    This data source provides the Arms Alert Contact Groups of the current Alibaba Cloud user.

    > **NOTE:** Available in v1.131.0+.

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    name_regex = alicloud.arms.get_alert_contact_groups(name_regex="^my-AlertContactGroup")
    pulumi.export("armsAlertContactGroupId", name_regex.groups[0].id)
    ```


    :param str alert_contact_group_name: The name of the resource.
    :param str contact_id: The contact id.
    :param str contact_name: The contact name.
    :param Sequence[str] ids: A list of Alert Contact Group IDs.
    :param str name_regex: A regex string to filter results by Alert Contact Group name.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    """
    ...
