# 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 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__, hostname=None, id=None, ip_address=None, location=None, name=None, primary_access_key=None, primary_connection_string=None, public_port=None, resource_group_name=None, secondary_access_key=None, secondary_connection_string=None, server_port=None, tags=None):
        if hostname and not isinstance(hostname, str):
            raise TypeError("Expected argument 'hostname' to be a str")
        __self__.hostname = hostname
        """
        The FQDN of the SignalR service.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if ip_address and not isinstance(ip_address, str):
            raise TypeError("Expected argument 'ip_address' to be a str")
        __self__.ip_address = ip_address
        """
        The publicly accessible IP of the SignalR service.
        """
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        __self__.location = location
        """
        Specifies the supported Azure location where the SignalR service exists.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if primary_access_key and not isinstance(primary_access_key, str):
            raise TypeError("Expected argument 'primary_access_key' to be a str")
        __self__.primary_access_key = primary_access_key
        """
        The primary access key of the SignalR service.
        """
        if primary_connection_string and not isinstance(primary_connection_string, str):
            raise TypeError("Expected argument 'primary_connection_string' to be a str")
        __self__.primary_connection_string = primary_connection_string
        """
        The primary connection string of the SignalR service.
        """
        if public_port and not isinstance(public_port, float):
            raise TypeError("Expected argument 'public_port' to be a float")
        __self__.public_port = public_port
        """
        The publicly accessible port of the SignalR service which is designed for browser/client use.
        """
        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 secondary_access_key and not isinstance(secondary_access_key, str):
            raise TypeError("Expected argument 'secondary_access_key' to be a str")
        __self__.secondary_access_key = secondary_access_key
        """
        The secondary access key of the SignalR service.
        """
        if secondary_connection_string and not isinstance(secondary_connection_string, str):
            raise TypeError("Expected argument 'secondary_connection_string' to be a str")
        __self__.secondary_connection_string = secondary_connection_string
        """
        The secondary connection string of the SignalR service.
        """
        if server_port and not isinstance(server_port, float):
            raise TypeError("Expected argument 'server_port' to be a float")
        __self__.server_port = server_port
        """
        The publicly accessible port of the SignalR service which is designed for customer server side use.
        """
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        __self__.tags = tags
class AwaitableGetServiceResult(GetServiceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetServiceResult(
            hostname=self.hostname,
            id=self.id,
            ip_address=self.ip_address,
            location=self.location,
            name=self.name,
            primary_access_key=self.primary_access_key,
            primary_connection_string=self.primary_connection_string,
            public_port=self.public_port,
            resource_group_name=self.resource_group_name,
            secondary_access_key=self.secondary_access_key,
            secondary_connection_string=self.secondary_connection_string,
            server_port=self.server_port,
            tags=self.tags)

def get_service(name=None,resource_group_name=None,opts=None):
    """
    Use this data source to access information about an existing Azure SignalR service.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.signalr.get_service(name="test-signalr",
        resource_group_name="signalr-resource-group")
    ```


    :param str name: Specifies the name of the SignalR service.
    :param str resource_group_name: Specifies the name of the resource group the SignalR service is located in.
    """
    __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:signalr/getService:getService', __args__, opts=opts).value

    return AwaitableGetServiceResult(
        hostname=__ret__.get('hostname'),
        id=__ret__.get('id'),
        ip_address=__ret__.get('ipAddress'),
        location=__ret__.get('location'),
        name=__ret__.get('name'),
        primary_access_key=__ret__.get('primaryAccessKey'),
        primary_connection_string=__ret__.get('primaryConnectionString'),
        public_port=__ret__.get('publicPort'),
        resource_group_name=__ret__.get('resourceGroupName'),
        secondary_access_key=__ret__.get('secondaryAccessKey'),
        secondary_connection_string=__ret__.get('secondaryConnectionString'),
        server_port=__ret__.get('serverPort'),
        tags=__ret__.get('tags'))
