# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetOrganizationBillingGroupListResult',
    'AwaitableGetOrganizationBillingGroupListResult',
    'get_organization_billing_group_list',
    'get_organization_billing_group_list_output',
]

@pulumi.output_type
class GetOrganizationBillingGroupListResult:
    """
    A collection of values returned by getOrganizationBillingGroupList.
    """
    def __init__(__self__, billing_groups=None, id=None, organization_id=None, timeouts=None):
        if billing_groups and not isinstance(billing_groups, list):
            raise TypeError("Expected argument 'billing_groups' to be a list")
        pulumi.set(__self__, "billing_groups", billing_groups)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_id)
        if timeouts and not isinstance(timeouts, dict):
            raise TypeError("Expected argument 'timeouts' to be a dict")
        pulumi.set(__self__, "timeouts", timeouts)

    @property
    @pulumi.getter(name="billingGroups")
    def billing_groups(self) -> Optional[Sequence['outputs.GetOrganizationBillingGroupListBillingGroupResult']]:
        """
        A list of all billing groups belonging to the organization.
        """
        return pulumi.get(self, "billing_groups")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Resource ID, equal to `organization_id`.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> builtins.str:
        """
        ID of an organization.
        """
        return pulumi.get(self, "organization_id")

    @property
    @pulumi.getter
    def timeouts(self) -> Optional['outputs.GetOrganizationBillingGroupListTimeoutsResult']:
        return pulumi.get(self, "timeouts")


class AwaitableGetOrganizationBillingGroupListResult(GetOrganizationBillingGroupListResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOrganizationBillingGroupListResult(
            billing_groups=self.billing_groups,
            id=self.id,
            organization_id=self.organization_id,
            timeouts=self.timeouts)


def get_organization_billing_group_list(billing_groups: Optional[Sequence[Union['GetOrganizationBillingGroupListBillingGroupArgs', 'GetOrganizationBillingGroupListBillingGroupArgsDict']]] = None,
                                        organization_id: Optional[builtins.str] = None,
                                        timeouts: Optional[Union['GetOrganizationBillingGroupListTimeoutsArgs', 'GetOrganizationBillingGroupListTimeoutsArgsDict']] = None,
                                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOrganizationBillingGroupListResult:
    """
    Lists billing groups for an organization.

    **This resource is in the beta stage and may change without notice.** Set
    the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.


    :param Sequence[Union['GetOrganizationBillingGroupListBillingGroupArgs', 'GetOrganizationBillingGroupListBillingGroupArgsDict']] billing_groups: A list of all billing groups belonging to the organization.
    :param builtins.str organization_id: ID of an organization.
    """
    __args__ = dict()
    __args__['billingGroups'] = billing_groups
    __args__['organizationId'] = organization_id
    __args__['timeouts'] = timeouts
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getOrganizationBillingGroupList:getOrganizationBillingGroupList', __args__, opts=opts, typ=GetOrganizationBillingGroupListResult).value

    return AwaitableGetOrganizationBillingGroupListResult(
        billing_groups=pulumi.get(__ret__, 'billing_groups'),
        id=pulumi.get(__ret__, 'id'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        timeouts=pulumi.get(__ret__, 'timeouts'))
def get_organization_billing_group_list_output(billing_groups: Optional[pulumi.Input[Optional[Sequence[Union['GetOrganizationBillingGroupListBillingGroupArgs', 'GetOrganizationBillingGroupListBillingGroupArgsDict']]]]] = None,
                                               organization_id: Optional[pulumi.Input[builtins.str]] = None,
                                               timeouts: Optional[pulumi.Input[Optional[Union['GetOrganizationBillingGroupListTimeoutsArgs', 'GetOrganizationBillingGroupListTimeoutsArgsDict']]]] = None,
                                               opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOrganizationBillingGroupListResult]:
    """
    Lists billing groups for an organization.

    **This resource is in the beta stage and may change without notice.** Set
    the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.


    :param Sequence[Union['GetOrganizationBillingGroupListBillingGroupArgs', 'GetOrganizationBillingGroupListBillingGroupArgsDict']] billing_groups: A list of all billing groups belonging to the organization.
    :param builtins.str organization_id: ID of an organization.
    """
    __args__ = dict()
    __args__['billingGroups'] = billing_groups
    __args__['organizationId'] = organization_id
    __args__['timeouts'] = timeouts
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('aiven:index/getOrganizationBillingGroupList:getOrganizationBillingGroupList', __args__, opts=opts, typ=GetOrganizationBillingGroupListResult)
    return __ret__.apply(lambda __response__: GetOrganizationBillingGroupListResult(
        billing_groups=pulumi.get(__response__, 'billing_groups'),
        id=pulumi.get(__response__, 'id'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        timeouts=pulumi.get(__response__, 'timeouts')))
