# 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 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

__all__ = [
    'GetAccountTeamResult',
    'AwaitableGetAccountTeamResult',
    'get_account_team',
    'get_account_team_output',
]

@pulumi.output_type
class GetAccountTeamResult:
    """
    A collection of values returned by getAccountTeam.
    """
    def __init__(__self__, account_id=None, create_time=None, id=None, name=None, team_id=None, update_time=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if team_id and not isinstance(team_id, str):
            raise TypeError("Expected argument 'team_id' to be a str")
        pulumi.set(__self__, "team_id", team_id)
        if update_time and not isinstance(update_time, str):
            raise TypeError("Expected argument 'update_time' to be a str")
        pulumi.set(__self__, "update_time", update_time)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> str:
        """
        The unique account id
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> str:
        """
        Time of creation
        """
        return pulumi.get(self, "create_time")

    @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 name(self) -> str:
        """
        The account team name
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="teamId")
    def team_id(self) -> str:
        """
        The auto-generated unique account team id
        """
        return pulumi.get(self, "team_id")

    @property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> str:
        """
        Time of last update
        """
        return pulumi.get(self, "update_time")


class AwaitableGetAccountTeamResult(GetAccountTeamResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAccountTeamResult(
            account_id=self.account_id,
            create_time=self.create_time,
            id=self.id,
            name=self.name,
            team_id=self.team_id,
            update_time=self.update_time)


def get_account_team(account_id: Optional[str] = None,
                     name: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAccountTeamResult:
    """
    The Account Team data source provides information about the existing Account Team.

    !> **Teams have been deprecated and are being migrated to groups**
    **On 30 September 2024** the Account Owners team will transition to super admin. Super admin have full access to the organization.
    The Account Owners and super admin are synced, so the removal of the Account Owners team will have no impact on existing permissions.
    **From 4 November 2024** you won't be able to create new teams or update existing ones. Existing teams will be migrated to groups after
    this date. **On 2 December 2024** all teams will be deleted and the teams feature will be completely removed. View the
    migration guide for more information on the changes and migrating to groups.

    > **Important**
    You can't delete the Account Owners team. **Deleting all other teams in your organization will disable the teams feature.**
    You won't be able to create new teams or access your Account Owners team.


    :param str account_id: The unique account id
    :param str name: The account team name
    """
    __args__ = dict()
    __args__['accountId'] = account_id
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getAccountTeam:getAccountTeam', __args__, opts=opts, typ=GetAccountTeamResult).value

    return AwaitableGetAccountTeamResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        create_time=pulumi.get(__ret__, 'create_time'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        team_id=pulumi.get(__ret__, 'team_id'),
        update_time=pulumi.get(__ret__, 'update_time'))
def get_account_team_output(account_id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAccountTeamResult]:
    """
    The Account Team data source provides information about the existing Account Team.

    !> **Teams have been deprecated and are being migrated to groups**
    **On 30 September 2024** the Account Owners team will transition to super admin. Super admin have full access to the organization.
    The Account Owners and super admin are synced, so the removal of the Account Owners team will have no impact on existing permissions.
    **From 4 November 2024** you won't be able to create new teams or update existing ones. Existing teams will be migrated to groups after
    this date. **On 2 December 2024** all teams will be deleted and the teams feature will be completely removed. View the
    migration guide for more information on the changes and migrating to groups.

    > **Important**
    You can't delete the Account Owners team. **Deleting all other teams in your organization will disable the teams feature.**
    You won't be able to create new teams or access your Account Owners team.


    :param str account_id: The unique account id
    :param str name: The account team name
    """
    __args__ = dict()
    __args__['accountId'] = account_id
    __args__['name'] = name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('aiven:index/getAccountTeam:getAccountTeam', __args__, opts=opts, typ=GetAccountTeamResult)
    return __ret__.apply(lambda __response__: GetAccountTeamResult(
        account_id=pulumi.get(__response__, 'account_id'),
        create_time=pulumi.get(__response__, 'create_time'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        team_id=pulumi.get(__response__, 'team_id'),
        update_time=pulumi.get(__response__, 'update_time')))
