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

__all__ = [
    'GetDelegatedAdministratorsResult',
    'AwaitableGetDelegatedAdministratorsResult',
    'get_delegated_administrators',
    'get_delegated_administrators_output',
]

@pulumi.output_type
class GetDelegatedAdministratorsResult:
    """
    A collection of values returned by getDelegatedAdministrators.
    """
    def __init__(__self__, administrators=None, id=None, ids=None, output_file=None, page_number=None, page_size=None, service_principal=None):
        if administrators and not isinstance(administrators, list):
            raise TypeError("Expected argument 'administrators' to be a list")
        pulumi.set(__self__, "administrators", administrators)
        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 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)
        if page_number and not isinstance(page_number, int):
            raise TypeError("Expected argument 'page_number' to be a int")
        pulumi.set(__self__, "page_number", page_number)
        if page_size and not isinstance(page_size, int):
            raise TypeError("Expected argument 'page_size' to be a int")
        pulumi.set(__self__, "page_size", page_size)
        if service_principal and not isinstance(service_principal, str):
            raise TypeError("Expected argument 'service_principal' to be a str")
        pulumi.set(__self__, "service_principal", service_principal)

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

    @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="outputFile")
    def output_file(self) -> Optional[str]:
        return pulumi.get(self, "output_file")

    @property
    @pulumi.getter(name="pageNumber")
    def page_number(self) -> Optional[int]:
        return pulumi.get(self, "page_number")

    @property
    @pulumi.getter(name="pageSize")
    def page_size(self) -> Optional[int]:
        return pulumi.get(self, "page_size")

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


class AwaitableGetDelegatedAdministratorsResult(GetDelegatedAdministratorsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDelegatedAdministratorsResult(
            administrators=self.administrators,
            id=self.id,
            ids=self.ids,
            output_file=self.output_file,
            page_number=self.page_number,
            page_size=self.page_size,
            service_principal=self.service_principal)


def get_delegated_administrators(ids: Optional[Sequence[str]] = None,
                                 output_file: Optional[str] = None,
                                 page_number: Optional[int] = None,
                                 page_size: Optional[int] = None,
                                 service_principal: Optional[str] = None,
                                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDelegatedAdministratorsResult:
    """
    This data source provides the Resource Manager Delegated Administrators of the current Alibaba Cloud user.

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

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    ids = alicloud.resourcemanager.get_delegated_administrators(ids=["example_value"])
    pulumi.export("resourceManagerDelegatedAdministratorId1", ids.administrators[0].id)
    ```


    :param Sequence[str] ids: A list of Delegated Administrator IDs.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    :param str service_principal: The identification of the trusted service.
    """
    __args__ = dict()
    __args__['ids'] = ids
    __args__['outputFile'] = output_file
    __args__['pageNumber'] = page_number
    __args__['pageSize'] = page_size
    __args__['servicePrincipal'] = service_principal
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('alicloud:resourcemanager/getDelegatedAdministrators:getDelegatedAdministrators', __args__, opts=opts, typ=GetDelegatedAdministratorsResult).value

    return AwaitableGetDelegatedAdministratorsResult(
        administrators=pulumi.get(__ret__, 'administrators'),
        id=pulumi.get(__ret__, 'id'),
        ids=pulumi.get(__ret__, 'ids'),
        output_file=pulumi.get(__ret__, 'output_file'),
        page_number=pulumi.get(__ret__, 'page_number'),
        page_size=pulumi.get(__ret__, 'page_size'),
        service_principal=pulumi.get(__ret__, 'service_principal'))
def get_delegated_administrators_output(ids: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                                        output_file: Optional[pulumi.Input[Optional[str]]] = None,
                                        page_number: Optional[pulumi.Input[Optional[int]]] = None,
                                        page_size: Optional[pulumi.Input[Optional[int]]] = None,
                                        service_principal: Optional[pulumi.Input[Optional[str]]] = None,
                                        opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDelegatedAdministratorsResult]:
    """
    This data source provides the Resource Manager Delegated Administrators of the current Alibaba Cloud user.

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

    ## Example Usage

    Basic Usage

    ```python
    import pulumi
    import pulumi_alicloud as alicloud

    ids = alicloud.resourcemanager.get_delegated_administrators(ids=["example_value"])
    pulumi.export("resourceManagerDelegatedAdministratorId1", ids.administrators[0].id)
    ```


    :param Sequence[str] ids: A list of Delegated Administrator IDs.
    :param str output_file: File name where to save data source results (after running `pulumi preview`).
    :param str service_principal: The identification of the trusted service.
    """
    __args__ = dict()
    __args__['ids'] = ids
    __args__['outputFile'] = output_file
    __args__['pageNumber'] = page_number
    __args__['pageSize'] = page_size
    __args__['servicePrincipal'] = service_principal
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('alicloud:resourcemanager/getDelegatedAdministrators:getDelegatedAdministrators', __args__, opts=opts, typ=GetDelegatedAdministratorsResult)
    return __ret__.apply(lambda __response__: GetDelegatedAdministratorsResult(
        administrators=pulumi.get(__response__, 'administrators'),
        id=pulumi.get(__response__, 'id'),
        ids=pulumi.get(__response__, 'ids'),
        output_file=pulumi.get(__response__, 'output_file'),
        page_number=pulumi.get(__response__, 'page_number'),
        page_size=pulumi.get(__response__, 'page_size'),
        service_principal=pulumi.get(__response__, 'service_principal')))
