# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetServiceResult:
    """
    A collection of values returned by getService.
    """
    def __init__(__self__, alias=None, auto_approval_subscription_ids=None, load_balancer_frontend_ip_configuration_ids=None, location=None, name=None, nat_ip_configuration=None, network_interface_ids=None, resource_group_name=None, tags=None, visibility_subscription_ids=None, id=None):
        if alias and not isinstance(alias, str):
            raise TypeError("Expected argument 'alias' to be a str")
        __self__.alias = alias
        """
        The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
        """
        if auto_approval_subscription_ids and not isinstance(auto_approval_subscription_ids, list):
            raise TypeError("Expected argument 'auto_approval_subscription_ids' to be a list")
        __self__.auto_approval_subscription_ids = auto_approval_subscription_ids
        """
        The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
        """
        if load_balancer_frontend_ip_configuration_ids and not isinstance(load_balancer_frontend_ip_configuration_ids, list):
            raise TypeError("Expected argument 'load_balancer_frontend_ip_configuration_ids' to be a list")
        __self__.load_balancer_frontend_ip_configuration_ids = load_balancer_frontend_ip_configuration_ids
        """
        The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
        """
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        __self__.location = location
        """
        The supported Azure location where the resource exists.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        """
        The name of private link service NAT IP configuration.
        """
        if nat_ip_configuration and not isinstance(nat_ip_configuration, dict):
            raise TypeError("Expected argument 'nat_ip_configuration' to be a dict")
        __self__.nat_ip_configuration = nat_ip_configuration
        """
        The `nat_ip_configuration` block as defined below.
        """
        if network_interface_ids and not isinstance(network_interface_ids, list):
            raise TypeError("Expected argument 'network_interface_ids' to be a list")
        __self__.network_interface_ids = network_interface_ids
        if resource_group_name and not isinstance(resource_group_name, str):
            raise TypeError("Expected argument 'resource_group_name' to be a str")
        __self__.resource_group_name = resource_group_name
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        __self__.tags = tags
        """
        A mapping of tags to assign to the resource.
        """
        if visibility_subscription_ids and not isinstance(visibility_subscription_ids, list):
            raise TypeError("Expected argument 'visibility_subscription_ids' to be a list")
        __self__.visibility_subscription_ids = visibility_subscription_ids
        """
        The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        id is the provider-assigned unique ID for this managed resource.
        """
class AwaitableGetServiceResult(GetServiceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetServiceResult(
            alias=self.alias,
            auto_approval_subscription_ids=self.auto_approval_subscription_ids,
            load_balancer_frontend_ip_configuration_ids=self.load_balancer_frontend_ip_configuration_ids,
            location=self.location,
            name=self.name,
            nat_ip_configuration=self.nat_ip_configuration,
            network_interface_ids=self.network_interface_ids,
            resource_group_name=self.resource_group_name,
            tags=self.tags,
            visibility_subscription_ids=self.visibility_subscription_ids,
            id=self.id)

def get_service(name=None,resource_group_name=None,opts=None):
    """
    Use this data source to access information about an existing Private Link Service.
    
    > **NOTE** Private Link is currently in Public Preview.
    
    :param str name: The name of the private link service.
    :param str resource_group_name: The name of the resource group in which the private link service resides.

    > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/private_link_service.html.markdown.
    """
    __args__ = dict()

    __args__['name'] = name
    __args__['resourceGroupName'] = resource_group_name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('azure:privatelink/getService:getService', __args__, opts=opts).value

    return AwaitableGetServiceResult(
        alias=__ret__.get('alias'),
        auto_approval_subscription_ids=__ret__.get('autoApprovalSubscriptionIds'),
        load_balancer_frontend_ip_configuration_ids=__ret__.get('loadBalancerFrontendIpConfigurationIds'),
        location=__ret__.get('location'),
        name=__ret__.get('name'),
        nat_ip_configuration=__ret__.get('natIpConfiguration'),
        network_interface_ids=__ret__.get('networkInterfaceIds'),
        resource_group_name=__ret__.get('resourceGroupName'),
        tags=__ret__.get('tags'),
        visibility_subscription_ids=__ret__.get('visibilitySubscriptionIds'),
        id=__ret__.get('id'))
