# 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 pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetManagedApiResult',
    'AwaitableGetManagedApiResult',
    'get_managed_api',
    'get_managed_api_output',
]

@pulumi.output_type
class GetManagedApiResult:
    """
    A collection of values returned by getManagedApi.
    """
    def __init__(__self__, id=None, location=None, name=None, tags=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        pulumi.set(__self__, "location", location)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        pulumi.set(__self__, "tags", tags)

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

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def tags(self) -> Mapping[str, str]:
        return pulumi.get(self, "tags")


class AwaitableGetManagedApiResult(GetManagedApiResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetManagedApiResult(
            id=self.id,
            location=self.location,
            name=self.name,
            tags=self.tags)


def get_managed_api(location: Optional[str] = None,
                    name: Optional[str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetManagedApiResult:
    """
    Uses this data source to access information about an existing Managed API.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.connections.get_managed_api(name="servicebus",
        location="West Europe")
    pulumi.export("id", example.id)
    ```


    :param str location: The Azure location for this Managed API.
    :param str name: Specifies the name of the Managed API.
    """
    __args__ = dict()
    __args__['location'] = location
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure:connections/getManagedApi:getManagedApi', __args__, opts=opts, typ=GetManagedApiResult).value

    return AwaitableGetManagedApiResult(
        id=pulumi.get(__ret__, 'id'),
        location=pulumi.get(__ret__, 'location'),
        name=pulumi.get(__ret__, 'name'),
        tags=pulumi.get(__ret__, 'tags'))


@_utilities.lift_output_func(get_managed_api)
def get_managed_api_output(location: Optional[pulumi.Input[str]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetManagedApiResult]:
    """
    Uses this data source to access information about an existing Managed API.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.connections.get_managed_api(name="servicebus",
        location="West Europe")
    pulumi.export("id", example.id)
    ```


    :param str location: The Azure location for this Managed API.
    :param str name: Specifies the name of the Managed API.
    """
    ...
