# 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 warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import _utilities, _tables


class GetAccountResult:
    """
    A collection of values returned by getAccount.
    """
    def __init__(__self__, account_id=None, id=None, name=None, scope=None):
        if account_id and not isinstance(account_id, float):
            raise TypeError("Expected argument 'account_id' to be a float")
        __self__.account_id = account_id
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if scope and not isinstance(scope, str):
            raise TypeError("Expected argument 'scope' to be a str")
        __self__.scope = scope


class AwaitableGetAccountResult(GetAccountResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAccountResult(
            account_id=self.account_id,
            id=self.id,
            name=self.name,
            scope=self.scope)


def get_account(account_id=None, name=None, scope=None, opts=None):
    """
    Use this data source to get information about a specific account in New Relic.
    Accounts can be located by ID or name.  Exactly one of the two attributes is
    required.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_newrelic as newrelic

    acc = newrelic.get_account(scope="global")
    ```


    :param float account_id: The account ID in New Relic.
    :param str name: The account name in New Relic.
    :param str scope: The scope of the account in New Relic.  Valid values are "global" and "in_region".  Defaults to "in_region".
    """
    __args__ = dict()
    __args__['accountId'] = account_id
    __args__['name'] = name
    __args__['scope'] = scope
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('newrelic:index/getAccount:getAccount', __args__, opts=opts).value

    return AwaitableGetAccountResult(
        account_id=__ret__.get('accountId'),
        id=__ret__.get('id'),
        name=__ret__.get('name'),
        scope=__ret__.get('scope'))
