# 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 as _builtins
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__ = [
    'GetPartnersResult',
    'AwaitableGetPartnersResult',
    'get_partners',
    'get_partners_output',
]

@pulumi.output_type
class GetPartnersResult:
    """
    A collection of values returned by getPartners.
    """
    def __init__(__self__, id=None, partners=None, pop_ids=None, region=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if partners and not isinstance(partners, list):
            raise TypeError("Expected argument 'partners' to be a list")
        pulumi.set(__self__, "partners", partners)
        if pop_ids and not isinstance(pop_ids, list):
            raise TypeError("Expected argument 'pop_ids' to be a list")
        pulumi.set(__self__, "pop_ids", pop_ids)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)

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

    @_builtins.property
    @pulumi.getter
    def partners(self) -> Sequence['outputs.GetPartnersPartnerResult']:
        """
        List of partners matching the filters. Each entry contains:
        """
        return pulumi.get(self, "partners")

    @_builtins.property
    @pulumi.getter(name="popIds")
    def pop_ids(self) -> Optional[Sequence[_builtins.str]]:
        return pulumi.get(self, "pop_ids")

    @_builtins.property
    @pulumi.getter
    def region(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "region")


class AwaitableGetPartnersResult(GetPartnersResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPartnersResult(
            id=self.id,
            partners=self.partners,
            pop_ids=self.pop_ids,
            region=self.region)


def get_partners(pop_ids: Optional[Sequence[_builtins.str]] = None,
                 region: Optional[_builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPartnersResult:
    """
    Gets information about multiple Interlink Partners.

    A partner is an organization that provides shared connections at PoPs. Use this data source to list and filter available partners for creating hosted links.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # List all partners in a region
    all = scaleway.interlink.get_partners(region="fr-par")
    # List partners available at specific PoPs
    at_pops = scaleway.interlink.get_partners(pop_ids=[main["id"]])
    ```


    :param Sequence[_builtins.str] pop_ids: Filter for partners present (offering a connection) in one of these PoPs.
    :param _builtins.str region: `region`) The region to list partners from.
    """
    __args__ = dict()
    __args__['popIds'] = pop_ids
    __args__['region'] = region
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:interlink/getPartners:getPartners', __args__, opts=opts, typ=GetPartnersResult).value

    return AwaitableGetPartnersResult(
        id=pulumi.get(__ret__, 'id'),
        partners=pulumi.get(__ret__, 'partners'),
        pop_ids=pulumi.get(__ret__, 'pop_ids'),
        region=pulumi.get(__ret__, 'region'))
def get_partners_output(pop_ids: Optional[pulumi.Input[Optional[Sequence[_builtins.str]]]] = None,
                        region: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPartnersResult]:
    """
    Gets information about multiple Interlink Partners.

    A partner is an organization that provides shared connections at PoPs. Use this data source to list and filter available partners for creating hosted links.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # List all partners in a region
    all = scaleway.interlink.get_partners(region="fr-par")
    # List partners available at specific PoPs
    at_pops = scaleway.interlink.get_partners(pop_ids=[main["id"]])
    ```


    :param Sequence[_builtins.str] pop_ids: Filter for partners present (offering a connection) in one of these PoPs.
    :param _builtins.str region: `region`) The region to list partners from.
    """
    __args__ = dict()
    __args__['popIds'] = pop_ids
    __args__['region'] = region
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:interlink/getPartners:getPartners', __args__, opts=opts, typ=GetPartnersResult)
    return __ret__.apply(lambda __response__: GetPartnersResult(
        id=pulumi.get(__response__, 'id'),
        partners=pulumi.get(__response__, 'partners'),
        pop_ids=pulumi.get(__response__, 'pop_ids'),
        region=pulumi.get(__response__, 'region')))
